diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 0e6033035f7297..32fbcef6f52a44 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -45,7 +45,12 @@ jobs: uses: ./.github/actions/checkout-submodules-and-bootstrap with: platform: linux - + # Java formatting requires a newer java to run ktfmt + # TODO: this should be eventually inside Docker files + - name: Update java + run: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -fy --fix-missing openjdk-17-jre - name: Generate all run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py - name: Ensure git works in current working directory diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 6aa824bdcba6f3..8dc09e91131be2 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -132,6 +132,10 @@ if(CHIP_CODEGEN_PREGEN_DIR) chip_gn_arg_append("chip_code_pre_generated_directory" "\"${CHIP_CODEGEN_PREGEN_DIR}\"") endif() +if(CONFIG_ENABLE_ICD_SERVER) + chip_gn_arg_append("chip_enable_icd_server" "true") +endif() + if(CONFIG_ENABLE_PW_RPC) string(APPEND chip_gn_args "import(\"//build_overrides/pigweed.gni\")\n") chip_gn_arg_append("remove_default_configs" "[\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:toolchain_cpp_standard\"]") diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 5c871c2d043a30..30c152eff480fa 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -292,6 +292,31 @@ menu "CHIP Device Layer" help Enables or Disables the support for Commissionable Device Type. + config ENABLE_ICD_SERVER + bool "Enable ICD server" + depends on OPENTHREAD_MTD + default n + help + Enables or Disables ICD server + + config ICD_SLOW_POLL_INTERVAL + int "ICD Slow Polling Interval" + depends on ENABLE_ICD_SERVER + default 5000 + help + The value defines the fastest frequency at which the device will typically receive + messages in Idle Mode. The Slow Polling interval MAY be the same as the Idle Mode + Interval. + + config ICD_FAST_POLL_INTERVAL + int "ICD Fast Polling Interval" + depends on ENABLE_ICD_SERVER + default 200 + help + Fast Polling defines the fastest frequency at which the device can receive messages + in Active Mode. The Fast Polling interval SHALL be smaller than the Active Mode + Interval. + config ENABLE_BG_EVENT_PROCESSING bool "Enable Background event processing" default n @@ -435,39 +460,6 @@ menu "CHIP Device Layer" The amount of time (in milliseconds) to wait for Internet connectivity to be established on the device's WiFi station interface during a Network Provisioning TestConnectivity operation. - choice WIFI_POWER_SAVE_MODE - prompt "WiFi power-saving mode" - default WIFI_POWER_SAVE_MIN - depends on ENABLE_WIFI_STATION && !ENABLE_WIFI_AP - help - The Modem-sleep mode which refers to the legacy power-saving mode in the IEEE 802.11 protocol. - - config WIFI_POWER_SAVE_MIN - bool "Minimal power-saving mode" - help - In minimum power-saving mode, station wakes up every DTIM to receive beacon. - - config WIFI_POWER_SAVE_MAX - bool "Maximum power-saving mode" - help - In maximum power-saving mode, station wakes up in every listen interval to receive beacon. - Listen interval can be configured by calling API 'esp_wifi_set_config()' before connecting - to AP. - - config WIFI_POWER_SAVE_NONE - bool "No power-saving" - help - No power save - - endchoice - - config WIFI_PS_LISTEN_INTERVAL - int "Listen interval for maximum power-saving mode" - depends on WIFI_POWER_SAVE_MAX - default 3 - help - Interval for station to listen to beacon from AP. The unit of listen interval is one beacon interval. - endmenu menu "WiFi AP Options" diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index ef57e61ca3c3ac..66f6931192cca3 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -22,21 +22,22 @@ step. [v5.1 release](https://github.com/espressif/esp-idf/releases/tag/v5.1) ``` - $ git clone -b v5.1 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git - $ cd esp-idf - $ ./install.sh + git clone -b v5.1 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git + cd esp-idf + ./install.sh ``` - To update an existing esp-idf toolchain to v5.1: ``` - $ cd path/to/esp-idf - $ git fetch origin - $ git checkout v5.1 - $ git reset --hard origin/v5.1 - $ git submodule update --recursive --init - $ git clean -fdx - $ ./install.sh + cd path/to/esp-idf + git fetch --depth 1 origin v5.1 + git reset --hard FETCH_HEAD + git submodule update --depth 1 --recursive --init + + # -ff is for cleaning untracked files as well as submodules + git clean -ffdx + ./install.sh ``` ## Setup Matter environment diff --git a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h index 935fdb626bfd14..939213d296ad53 100644 --- a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h +++ b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include #include #include diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 1b4b6ff21e6296..b5435325459417 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -125,6 +125,11 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" ) endif (CONFIG_ENABLE_PW_RPC) +if (CONFIG_ENABLE_ICD_SERVER) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/icd") + list(APPEND SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/icd") +endif() + set(PRIV_REQUIRES_LIST chip QRCode bt app_update nvs_flash spi_flash openthread) if(${IDF_TARGET} STREQUAL "esp32") diff --git a/examples/all-clusters-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-app/esp32/main/Kconfig.projbuild index fb2eb7d6c3b46f..2cec0c32093734 100644 --- a/examples/all-clusters-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-app/esp32/main/Kconfig.projbuild @@ -54,6 +54,9 @@ menu "Demo" config DEVICE_TYPE_ESP32_C6_DEVKITC bool "ESP32C6-DevKitC" depends on IDF_TARGET_ESP32C6 + config DEVICE_TYPE_ESP32_H2_DEVKITM + bool "ESP32H2-DevKitM" + depends on IDF_TARGET_ESP32H2 endchoice choice @@ -84,7 +87,7 @@ menu "Demo" config TFT_PREDEFINED_DISPLAY_TYPE int range 0 5 - default 0 if DEVICE_TYPE_ESP32_DEVKITC + default 0 if DEVICE_TYPE_ESP32_DEVKITC || DEVICE_TYPE_ESP32_H2_DEVKITM default 0 if DEVICE_TYPE_ESP32_C3_DEVKITM || DEVICE_TYPE_ESP32_C2_DEVKITM || DEVICE_TYPE_ESP32_C6_DEVKITC default 3 if DEVICE_TYPE_M5STACK default 4 if DEVICE_TYPE_ESP32_WROVER_KIT @@ -115,7 +118,7 @@ menu "Demo" range 0 40 default 2 if DEVICE_TYPE_ESP32_DEVKITC #Use LED1 (blue LED) as status LED on DevKitC default 2 if DEVICE_TYPE_ESP32_ETHERNET_KIT - default 8 if DEVICE_TYPE_ESP32_C3_DEVKITM || DEVICE_TYPE_ESP32_C2_DEVKITM || DEVICE_TYPE_ESP32_C6_DEVKITC + default 8 if DEVICE_TYPE_ESP32_C3_DEVKITM || DEVICE_TYPE_ESP32_C2_DEVKITM || DEVICE_TYPE_ESP32_C6_DEVKITC || DEVICE_TYPE_ESP32_H2_DEVKITM default 26 if DEVICE_TYPE_ESP32_WROVER_KIT default 40 if DEVICE_TYPE_M5STACK help diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index ecca799c81d07b..2ea1710ad7ebd5 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -52,12 +53,6 @@ #include "Rpc.h" #endif -#if CONFIG_OPENTHREAD_ENABLED -#include -#include -#include -#endif - #if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER #include #endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER @@ -71,6 +66,7 @@ using namespace ::chip; using namespace ::chip::Shell; using namespace ::chip::DeviceManager; +using namespace ::chip::DeviceLayer; using namespace ::chip::Credentials; // Used to indicate that an IP address has been added to the QRCode @@ -206,25 +202,7 @@ extern "C" void app_main() { ESP_LOGE(TAG, "GetAppTask().StartAppTask() failed : %" CHIP_ERROR_FORMAT, error.Format()); } -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD - esp_openthread_platform_config_t config = { - .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), - .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), - .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), - }; - set_openthread_platform_config(&config); - - if (DeviceLayer::ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to initialize Thread stack"); - return; - } - if (DeviceLayer::ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to launch Thread task"); - return; - } -#endif + ESPOpenThreadInit(); chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); } diff --git a/examples/all-clusters-app/esp32/sdkconfig.defaults.esp32h2 b/examples/all-clusters-app/esp32/sdkconfig.defaults.esp32h2 new file mode 100644 index 00000000000000..f415104a665ec2 --- /dev/null +++ b/examples/all-clusters-app/esp32/sdkconfig.defaults.esp32h2 @@ -0,0 +1,78 @@ +CONFIG_IDF_TARGET="esp32h2" +CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2=y + +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHFREQ="40m" +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 + +# libsodium +CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y + + +# NIMBLE +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_EXT_ADV=n +CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n + +# Enable OpenThread +CONFIG_OPENTHREAD_ENABLED=y +CONFIG_OPENTHREAD_SRP_CLIENT=y +CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n +CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y +CONFIG_OPENTHREAD_CLI=n +CONFIG_OPENTHREAD_DNS_CLIENT=y + +# Disable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=n + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" + +# LwIP config for OpenThread +CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 +CONFIG_LWIP_MULTICAST_PING=y + +# mbedTLS +CONFIG_MBEDTLS_HARDWARE_AES=n +CONFIG_MBEDTLS_HARDWARE_MPI=n +CONFIG_MBEDTLS_HARDWARE_SHA=n +CONFIG_MBEDTLS_HARDWARE_ECC=y +CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN=n +CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY=n +CONFIG_MBEDTLS_CMAC_C=y +CONFIG_MBEDTLS_SSL_PROTO_DTLS=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE=y + +# rtc clk for ble +# CONFIG_ESP32H2_RTC_CLK_SRC_EXT_CRYS=y + +# MDNS platform +CONFIG_USE_MINIMAL_MDNS=n +CONFIG_ENABLE_EXTENDED_DISCOVERY=y + +# FreeRTOS should use legacy API +CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y + +# Disable STA and AP for ESP32H2 +CONFIG_ENABLE_WIFI_STATION=n +CONFIG_ENABLE_WIFI_AP=n +# Enable this to avoid implicit declaration of function 'esp_send_assoc_resp' +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y + +# Enable OTA Requestor +CONFIG_ENABLE_OTA_REQUESTOR=y + +# Enable chip shell +CONFIG_ENABLE_CHIP_SHELL=y + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y diff --git a/examples/all-clusters-minimal-app/esp32/main/main.cpp b/examples/all-clusters-minimal-app/esp32/main/main.cpp index a673a706291a58..5b2af4cc4b2232 100644 --- a/examples/all-clusters-minimal-app/esp32/main/main.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/main.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -51,12 +52,6 @@ #include "Rpc.h" #endif -#if CONFIG_OPENTHREAD_ENABLED -#include -#include -#include -#endif - #if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER #include #endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER @@ -188,25 +183,7 @@ extern "C" void app_main() ESP_LOGE(TAG, "GetAppTask().StartAppTask() failed : %" CHIP_ERROR_FORMAT, error.Format()); } -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD - esp_openthread_platform_config_t config = { - .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), - .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), - .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), - }; - set_openthread_platform_config(&config); - - if (DeviceLayer::ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to initialize Thread stack"); - return; - } - if (DeviceLayer::ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to launch Thread task"); - return; - } -#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD + ESPOpenThreadInit(); chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); } diff --git a/examples/dishwasher-app/dishwasher-common/include/operational-state-delegate-impl.h b/examples/dishwasher-app/dishwasher-common/include/operational-state-delegate-impl.h index 935fdb626bfd14..939213d296ad53 100644 --- a/examples/dishwasher-app/dishwasher-common/include/operational-state-delegate-impl.h +++ b/examples/dishwasher-app/dishwasher-common/include/operational-state-delegate-impl.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include #include #include diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp index a33d783a98439c..38d9ea040b05fe 100644 --- a/examples/lighting-app/esp32/main/main.cpp +++ b/examples/lighting-app/esp32/main/main.cpp @@ -20,6 +20,7 @@ #include "AppTask.h" #include #include +#include #include "esp_log.h" #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) @@ -46,11 +47,6 @@ #include "Rpc.h" #endif -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD -#include -#include -#endif - #include "DeviceWithDisplay.h" #if CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER @@ -162,25 +158,7 @@ extern "C" void app_main() #endif SetDeviceAttestationCredentialsProvider(get_dac_provider()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD - esp_openthread_platform_config_t config = { - .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), - .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), - .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), - }; - set_openthread_platform_config(&config); - - if (ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to initialize Thread stack"); - return; - } - if (ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to launch Thread task"); - return; - } -#endif + ESPOpenThreadInit(); chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); diff --git a/examples/placeholder/linux/apps/app1/ciTests.json b/examples/placeholder/linux/apps/app1/ciTests.json index 6313a9621b7290..66abad400a442f 100644 --- a/examples/placeholder/linux/apps/app1/ciTests.json +++ b/examples/placeholder/linux/apps/app1/ciTests.json @@ -1,28 +1,7 @@ { "Test": [ - "Test_TC_ACT_3_1_Simulated", - "Test_TC_BOOL_3_1_Simulated", - "Test_TC_DESC_2_2_Simulated", - "Test_TC_DGETH_3_1_Simulated", - "Test_TC_DGSW_3_1_Simulated", - "Test_TC_DGWIFI_3_1_Simulated", - "Test_TC_FLW_3_1_Simulated", - "Test_TC_G_3_1_Simulated", - "Test_TC_I_3_1_Simulated", - "Test_TC_PRS_3_1_Simulated", - "Test_TC_PSCFG_3_1_Simulated", - "Test_TC_RH_3_1_Simulated", - "Test_TC_SWTCH_3_1_Simulated", "Test_TC_WNCV_5_1_Simulated", - "Test_TC_LCFG_3_1_Simulated", - "Test_TC_LUNIT_1_1_Simulated", - "Test_TC_LUNIT_2_1_Simulated", - "Test_TC_OCC_2_2_Simulated", "Test_TC_OCC_2_4_Simulated", - "Test_TC_ULABEL_3_1_Simulated", - "Test_TC_FLABEL_3_1_Simulated", - "Test_TC_LTIME_1_1_Simulated", - "Test_TC_ILL_3_1_Simulated", "Test_TC_DGSW_3_2_Simulated", "Test_TC_DGETH_3_2_Simulated", "Test_TC_DGWIFI_3_2_Simulated", @@ -34,18 +13,9 @@ "Test_TC_CC_6_4_Simulated", "Test_TC_CC_7_5_Simulated", "Test_TC_CC_9_4_Simulated", - "Test_TC_DGTHREAD_3_2_Simulated", - "Test_TC_DGTHREAD_3_3_Simulated", "Test_TC_DGTHREAD_3_4_Simulated", "Test_TC_LVL_2_3_Simulated", - "Test_TC_OO_3_1_Simulated", - "Test_TC_OO_3_2_Simulated", - "Test_TC_TSUIC_3_1_Simulated", - "Test_TC_PCC_3_1_Simulated", - "Test_TC_TMP_3_1_Simulated", - "Test_TC_CC_2_2_Simulated", - "Test_TC_DGTHREAD_3_1_Simulated", - "Test_TC_DRLK_3_1_Simulated" + "Test_TC_OO_3_2_Simulated" ], "collection": ["Test"] } diff --git a/examples/platform/esp32/common/Esp32AppServer.cpp b/examples/platform/esp32/common/Esp32AppServer.cpp index 06bb0d9a6c6c0b..db787d09867b68 100644 --- a/examples/platform/esp32/common/Esp32AppServer.cpp +++ b/examples/platform/esp32/common/Esp32AppServer.cpp @@ -18,11 +18,15 @@ #include "Esp32AppServer.h" #include "CHIPDeviceManager.h" +#include #include #include #include #include #include +#if CONFIG_ENABLE_ICD_SERVER +#include +#endif #include using namespace chip; @@ -50,6 +54,9 @@ static uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLe 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; #endif +#if CONFIG_ENABLE_ICD_SERVER +static ICDSubscriptionCallback sICDSubscriptionHandler; +#endif } // namespace #if CONFIG_TEST_EVENT_TRIGGER_ENABLED @@ -113,6 +120,10 @@ void Esp32AppServer::Init(AppDelegate * sAppDelegate) initParams.appDelegate = sAppDelegate; } chip::Server::GetInstance().Init(initParams); +#if CONFIG_ENABLE_ICD_SERVER + // Register ICD subscription callback to match subscription max intervals to its idle time interval + chip::app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&sICDSubscriptionHandler); +#endif // CONFIG_ENABLE_ICD_SERVER #if CHIP_DEVICE_CONFIG_ENABLE_WIFI sWiFiNetworkCommissioningInstance.Init(); diff --git a/examples/platform/esp32/common/Esp32ThreadInit.cpp b/examples/platform/esp32/common/Esp32ThreadInit.cpp new file mode 100644 index 00000000000000..6964598649e519 --- /dev/null +++ b/examples/platform/esp32/common/Esp32ThreadInit.cpp @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Esp32ThreadInit.h" +#include +#if CONFIG_OPENTHREAD_ENABLED +#include +#include +#endif // CONFIG_OPENTHREAD_ENABLED + +#include +#if CONFIG_PM_ENABLE +#include "esp_pm.h" +#endif + +using namespace ::chip::DeviceLayer; + +static constexpr char TAG[] = "Esp32ThreadInit"; + +void ESPOpenThreadInit() +{ +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + esp_openthread_platform_config_t config = { + .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), + .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), + .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), + }; + set_openthread_platform_config(&config); + + if (ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to initialize Thread stack"); + return; + } +#if CHIP_DEVICE_CONFIG_THREAD_FTD + if (ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_Router) != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to set the Thread device type"); + return; + } +#elif CHIP_CONFIG_ENABLE_ICD_SERVER +#if CONFIG_PM_ENABLE + esp_pm_config_t pm_config = { + .max_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, + .min_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, +#if CONFIG_FREERTOS_USE_TICKLESS_IDLE + .light_sleep_enable = true +#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE + }; + esp_pm_configure(&pm_config); +#endif // CONFIG_PM_ENABLE + if (ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_SleepyEndDevice) != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to set the Thread device type"); + return; + } +#else + if (ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice) != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to set the Thread device type"); + return; + } +#endif // CHIP_DEVICE_CONFIG_THREAD_FTD + + if (ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to launch Thread task"); + return; + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD +} diff --git a/examples/platform/esp32/common/OpenthreadConfig.h b/examples/platform/esp32/common/Esp32ThreadInit.h similarity index 85% rename from examples/platform/esp32/common/OpenthreadConfig.h rename to examples/platform/esp32/common/Esp32ThreadInit.h index 2a29e68fe9ecf5..f6edba24b2b82f 100644 --- a/examples/platform/esp32/common/OpenthreadConfig.h +++ b/examples/platform/esp32/common/Esp32ThreadInit.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2022 Project CHIP Authors + * 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. @@ -17,6 +17,9 @@ #pragma once +#include + +#if CONFIG_OPENTHREAD_ENABLED #include "esp_openthread_types.h" #define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ @@ -31,5 +34,8 @@ #define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ { \ - .storage_partition_name = "ot_storage", .netif_queue_size = 10, .task_queue_size = 10, \ + .storage_partition_name = "nvs", .netif_queue_size = 10, .task_queue_size = 10, \ } +#endif // CONFIG_OPENTHREAD_ENABLED + +void ESPOpenThreadInit(); diff --git a/examples/platform/esp32/icd/ICDSubscriptionCallback.cpp b/examples/platform/esp32/icd/ICDSubscriptionCallback.cpp new file mode 100644 index 00000000000000..eba28968085d60 --- /dev/null +++ b/examples/platform/esp32/icd/ICDSubscriptionCallback.cpp @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ICDSubscriptionCallback.h" +#include + +CHIP_ERROR ICDSubscriptionCallback::OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, + chip::Transport::SecureSession & aSecureSession) +{ + using namespace chip::System::Clock; + + Seconds32 interval_s32 = std::chrono::duration_cast(CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL); + + if (interval_s32 > Seconds16::max()) + { + interval_s32 = Seconds16::max(); + } + uint32_t decidedMaxInterval = interval_s32.count(); + + uint16_t requestedMinInterval = 0; + uint16_t requestedMaxInterval = 0; + aReadHandler.GetReportingIntervals(requestedMinInterval, requestedMaxInterval); + + // If requestedMinInterval is greater than IdleTimeInterval, select next wake up time as max interval + if (requestedMinInterval > decidedMaxInterval) + { + uint16_t ratio = requestedMinInterval / decidedMaxInterval; + if (requestedMinInterval % decidedMaxInterval) + { + ratio++; + } + + decidedMaxInterval *= ratio; + } + + // Verify that decidedMaxInterval is an acceptable value + if (decidedMaxInterval > Seconds16::max().count()) + { + decidedMaxInterval = Seconds16::max().count(); + } + + // Verify that the decidedMaxInterval respects MAX(SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT, MaxIntervalCeiling) + uint16_t maximumMaxInterval = std::max(kSubscriptionMaxIntervalPublisherLimit, requestedMaxInterval); + if (decidedMaxInterval > maximumMaxInterval) + { + decidedMaxInterval = maximumMaxInterval; + } + + return aReadHandler.SetMaxReportingInterval(decidedMaxInterval); +} diff --git a/examples/platform/esp32/icd/ICDSubscriptionCallback.h b/examples/platform/esp32/icd/ICDSubscriptionCallback.h new file mode 100644 index 00000000000000..c9f77e6df2a3c6 --- /dev/null +++ b/examples/platform/esp32/icd/ICDSubscriptionCallback.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include + +/** + * @brief The goal of the ICDSubscriptionCallback class is to negotiate the max interval subscription to match the idle interval of + * the IC device. When a subscription is requested, the device will change the requested max interval to match its idle time + * interval through the OnSubscriptionRequested function. + */ +class ICDSubscriptionCallback : public chip::app::ReadHandler::ApplicationCallback +{ + /** + * @brief Function called when a subscription is requested. + * An ICD will use this function to negotiate the subscription max interval to match its idle time interval + */ + CHIP_ERROR OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, + chip::Transport::SecureSession & aSecureSession) override; +}; diff --git a/kotlin-detect-config.yaml b/kotlin-detect-config.yaml index f6d723a9b638ac..3af04f5b389369 100644 --- a/kotlin-detect-config.yaml +++ b/kotlin-detect-config.yaml @@ -38,6 +38,8 @@ style: - "**/src/controller/java/src/chip/tlv/values.kt" - "**/src/controller/java/src/chip/WildcardImport examples/android/CHIPTest/app/src/androidTest/java/com/tcl/chip/chiptest/ExampleInstrumentedTest.kt" + - "**/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt" + - "**/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt" - "**/src/controller/java/tests/chip/jsontlv/JsonToTlvToJsonTest.kt" - "**/src/controller/java/tests/chip/onboardingpayload/ManualCodeTest.kt" - "**/src/controller/java/tests/chip/onboardingpayload/QRCodeTest.kt" @@ -58,6 +60,7 @@ style: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/SelectActionFragment.kt" - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/BarcodeFragment.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/Main.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/jsontlv/JsonToTlv.kt" - "**/src/controller/java/src/chip/jsontlv/TlvToJson.kt" - "**/src/controller/java/tests/chip/jsontlv/JsonToTlvToJsonTest.kt" @@ -123,6 +126,7 @@ style: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/MatterCommand.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairingCommand.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImSubscribeCommand.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/jsontlv/TlvToJson.kt" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadGenerator.kt" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt" @@ -133,12 +137,14 @@ style: UnusedParameter: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/bluetooth/BluetoothManager.kt" + - "**/src/controller/java/generated/java/**/*" ReturnCount: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt" - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/SensorClientFragment.kt" - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/EnterNetworkFragment.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/CommandManager.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/Verhoeff.kt" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" UnusedPrivateProperty: @@ -162,6 +168,7 @@ style: ThrowsCount: excludes: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/CommandManager.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/tlv/TlvReader.kt" - "**/src/controller/java/src/chip/jsontlv/JsonToTlv.kt" - "**/src/controller/java/src/chip/jsontlv/TlvToJson.kt" @@ -174,13 +181,16 @@ style: UnusedPrivateMember: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/BarcodeFragment.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" UseCheckOrError: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/tlv/tags.kt" - "**/src/controller/java/src/chip/tlv/types.kt" UseRequire: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/jsontlv/JsonToTlv.kt" - "**/src/controller/java/src/chip/onboardingpayload/Verhoeff10.kt" UtilityClassWithPublicConstructor: @@ -188,9 +198,11 @@ style: - "**/src/controller/java/src/chip/onboardingpayload/Verhoeff.kt" MayBeConst: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/Base38.kt" FunctionOnlyReturningConstant: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/QRCodeOnboardingPayloadGenerator.kt" exceptions: @@ -202,6 +214,7 @@ exceptions: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/BarcodeFragment.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/Argument.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/Main.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/tests/chip/onboardingpayload/ManualCodeTest.kt" - "**/src/controller/java/tests/chip/onboardingpayload/QRCodeTest.kt" SwallowedException: @@ -211,14 +224,17 @@ exceptions: TooGenericExceptionThrown: excludes: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/discover/DiscoverCommissionablesCommand.kt" + - "**/src/controller/java/generated/java/**/*" ThrowingExceptionsWithoutMessageOrCause: excludes: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/CommandManager.kt" + - "**/src/controller/java/generated/java/**/*" naming: FunctionNaming: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/SelectActionFragment.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/tests/chip/tlv/TlvReadWriteTest.kt" - "**/src/controller/java/tests/chip/tlv/TlvWriterTest.kt" - "**/src/controller/java/tests/chip/tlv/TlvReaderTest.kt" @@ -229,21 +245,26 @@ naming: ConstructorParameterNaming: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/HistoryCommandAdapter.kt" + - "**/src/controller/java/generated/java/**/*" TopLevelPropertyNaming: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" performance: SpreadOperator: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/tests/chip/tlv/TlvReaderTest.kt" potential-bugs: EqualsWithHashCodeExist: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" ImplicitDefaultLocale: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadGenerator.kt" @@ -262,6 +283,7 @@ complexity: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/Command.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/CommandManager.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairingCommand.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/jsontlv/JsonToTlv.kt" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" - "**/src/controller/java/src/chip/tlv/TlvReader.kt" @@ -273,15 +295,18 @@ complexity: NestedBlockDepth: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt" + - "**/src/controller/java/generated/java/**/*" LongParameterList: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/Command.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" LongMethod: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/AddressCommissioningFragment.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/CommandManager.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/Base38.kt" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadGenerator.kt" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt" @@ -291,15 +316,18 @@ complexity: - "**/src/controller/java/tests/chip/tlv/TlvReaderTest.kt" LargeClass: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/tests/chip/tlv/TlvReadWriteTest.kt" - "**/src/controller/java/tests/chip/jsontlv/JsonToTlvToJsonTest.kt" CyclomaticComplexMethod: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/tlv/TlvReader.kt" - "**/src/controller/java/src/chip/tlv/types.kt" - "**/src/controller/java/src/chip/jsontlv/TlvToJson.kt" ComplexCondition: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadGenerator.kt" empty-blocks: @@ -324,3 +352,4 @@ empty-blocks: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkShortCommand.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkVendorCommand.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/UnpairCommand.kt" + - "**/src/controller/java/generated/java/**/*" diff --git a/scripts/build/builders/android.py b/scripts/build/builders/android.py index cd358798c218fc..7b12090b9f15f5 100644 --- a/scripts/build/builders/android.py +++ b/scripts/build/builders/android.py @@ -235,6 +235,8 @@ def copyToSrcAndroid(self): "OnboardingPayload.jar": "src/controller/java/OnboardingPayload.jar", "AndroidPlatform.jar": "src/platform/android/AndroidPlatform.jar", "libCHIPTlv.jar": "src/controller/java/libCHIPTlv.jar", + "CHIPClusters.jar": "src/controller/java/CHIPClusters.jar", + "CHIPClusterID.jar": "src/controller/java/CHIPClusterID.jar", } for jarName in jars.keys(): @@ -573,6 +575,16 @@ def build_outputs(self): "lib", "src/controller/java/OnboardingPayload.jar", ), + "CHIPClusters.jar": os.path.join( + self.output_dir, + "lib", + "src/controller/java/CHIPClusters.jar", + ), + "CHIPClusterID.jar": os.path.join( + self.output_dir, + "lib", + "src/controller/java/CHIPClusterID.jar", + ), "jni/%s/libCHIPController.so" % self.board.AbiName(): os.path.join( self.output_dir, diff --git a/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt b/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt index b62ee9eb522803..766a82be3bb318 100644 --- a/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt +++ b/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt @@ -31,5 +31,9 @@ cp {out}/android-arm64-chip-tool/lib/src/platform/android/AndroidPlatform.jar {r cp {out}/android-arm64-chip-tool/lib/src/controller/java/libCHIPTlv.jar {root}/examples/android/CHIPTool/app/libs/libCHIPTlv.jar +cp {out}/android-arm64-chip-tool/lib/src/controller/java/CHIPClusters.jar {root}/examples/android/CHIPTool/app/libs/CHIPClusters.jar + +cp {out}/android-arm64-chip-tool/lib/src/controller/java/CHIPClusterID.jar {root}/examples/android/CHIPTool/app/libs/CHIPClusterID.jar + # Building APP android-arm64-chip-tool {root}/examples/android/CHIPTool/gradlew -p {root}/examples/android/CHIPTool -PmatterBuildSrcDir={out}/android-arm64-chip-tool -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-chip-tool assembleDebug diff --git a/scripts/py_matter_idl/files.gni b/scripts/py_matter_idl/files.gni index 1f7a7b0271196d..bfcfd27aec6fcd 100644 --- a/scripts/py_matter_idl/files.gni +++ b/scripts/py_matter_idl/files.gni @@ -10,8 +10,10 @@ matter_idl_generator_templates = [ "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja", + "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/CHIPGlobalCallbacks_cpp.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja", + "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ClusterIDMapping.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ClusterReadMapping.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ClusterWriteMapping.jinja", diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja index 96572922054095..f5e4c228419ebd 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja @@ -27,7 +27,7 @@ extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME {%- for attr in cluster.attributes | attributesWithCallback(typeLookup) %} -JNI_METHOD(void, {{cluster.name | capitalcase}}Cluster, read{{attr.definition.name | capitalcase}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, {{cluster.name | capitalcase}}Cluster, read{{attr.definition.name | capitalcase}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback{% if attr | isFabricScopedList(typeLookup) %}, jboolean isFabricFiltered{% endif %}) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::{{cluster.name | capitalcase}}::Attributes::{{attr.definition.name | capitalcase}}::TypeInfo; @@ -44,7 +44,7 @@ JNI_METHOD(void, {{cluster.name | capitalcase}}Cluster, read{{attr.definition.na auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall{% if attr | isFabricScopedList(typeLookup) %}, isFabricFiltered{% endif %}); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); onSuccess.release(); diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja new file mode 100644 index 00000000000000..4ce1f2f19d5861 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja @@ -0,0 +1,153 @@ +{%- macro encode_value(source, encodable, depth) -%} + {%- if encodable.is_nullable -%} + {{encode_value(source, encodable.without_nullable(), depth + 1)}}? + {%- elif encodable.is_optional -%} + Optional<{{encode_value(source, encodable.without_optional(), depth + 1)}}> + {%- elif encodable.is_list -%} + List<{{encode_value(source, encodable.without_list(), depth + 1)}}> + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + chip.devicecontroller.cluster.structs.{{source.name}}Cluster{{struct.name}} + {%- else -%} + {{encodable.kotlin_type}} + {%- endif -%} +{%- endmacro -%} + +{%- macro encode_tlv(encodable, tag, name, depth) %} + {%- if encodable.is_nullable -%} + if ({{name}} != null) { + {{encode_tlv(encodable.without_nullable(), tag, name, depth + 1)}} + } else { + putNull({{tag}}) + } + {%- elif encodable.is_optional -%} + if ({{name}}.isPresent) { + val opt{{name}} = {{name}}.get() + {{encode_tlv(encodable.without_optional(), tag, "opt" + name, depth + 1)}} + } + {%- elif encodable.is_list -%} + startList({{tag}}) + for (item in {{name}}.iterator()) { + {{encode_tlv(encodable.without_list(), "AnonymousTag", "item", depth + 1)}} + } + endList() + {%- elif encodable.is_struct -%} + {{name}}.toTlv({{tag}}, this) + {%- else -%} + put({{tag}}, {{name}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro decode_tlv(source, encodable, tag, depth) %} + {%- if encodable.is_nullable -%} + if (!tlvReader.isNull()) { + {{decode_tlv(source, encodable.without_nullable(), tag, depth + 1)}} + } else { + tlvReader.getNull({{tag}}) + null + } + {%- elif encodable.is_optional -%} + if (tlvReader.isNextTag({{tag}})) { + Optional.of({{decode_tlv(source, encodable.without_optional(), tag, depth + 1)}}) + } else { + Optional.empty() + } + {%- elif encodable.is_list -%} + {%- set encodablewithoutlist = encodable.without_list() -%} + buildList <{{encode_value(source, encodablewithoutlist, depth + 1)}}> { + tlvReader.enterList({{tag}}) + while(!tlvReader.isEndOfContainer()) { + this.add({{decode_tlv(source, encodablewithoutlist, "AnonymousTag", depth + 1)}}) + } + tlvReader.exitContainer() + } + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + chip.devicecontroller.cluster.structs.{{source.name}}Cluster{{struct.name}}.fromTlv({{tag}}, tlvReader) + {%- else -%} + tlvReader.get{{encodable.kotlin_type}}({{tag}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro contextSpecificTag(field) -%} + ContextSpecificTag(TAG_{{field.name | constcase}}) +{%- endmacro -%} + +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvParsingException +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +import java.util.Optional + +class {{cluster.name}}Cluster{{event.name}}Event ( + {%- for field in event.fields -%} + {%- set encodable = field | asEncodable(typeLookup) %} + val {{field.name}}: {{encode_value(cluster, encodable, 0)}} + {%- if loop.index0 < loop.length - 1 -%}{{","}}{%- endif -%} + {%- endfor -%}) { + override fun toString(): String = buildString { + append("{{cluster.name}}Cluster{{event.name}}Event {\n") + {%- for field in event.fields %} + append("\t{{field.name}} : ${{field.name}}\n") + {%- endfor %} + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + {% for field in event.fields %} + {%- set encodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + {{encode_tlv(encodable, tag, field.name, 0)}} + {% endfor -%} + endStructure() + } + } + + companion object { + {%- for field in event.fields %} + private const val TAG_{{field.name | constcase}} = {{field.code}} + {%- endfor %} + + fun fromTlv(tag: Tag, tlvReader: TlvReader) : {{cluster.name}}Cluster{{event.name}}Event { + tlvReader.enterStructure(tag) + {% for field in event.fields %} + {%- set decodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + val {{field.name}} = {{decode_tlv(cluster, decodable, tag, 0)}} + {% endfor %} + tlvReader.exitContainer() + + return {{cluster.name}}Cluster{{event.name}}Event( + {%- for field in event.fields -%} + {%- set encodable = field | asEncodable(typeLookup) -%} + {{field.name}} + {%- if loop.index0 < loop.length - 1 -%}{{", "}}{%- endif -%} + {%- endfor -%} + ) + } + } +} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja new file mode 100644 index 00000000000000..7463e6f26c7a2c --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja @@ -0,0 +1,153 @@ +{%- macro encode_value(source, encodable, depth) -%} + {%- if encodable.is_nullable -%} + {{encode_value(source, encodable.without_nullable(), depth + 1)}}? + {%- elif encodable.is_optional -%} + Optional<{{encode_value(source, encodable.without_optional(), depth + 1)}}> + {%- elif encodable.is_list -%} + List<{{encode_value(source, encodable.without_list(), depth + 1)}}> + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + {{source.name}}Cluster{{struct.name}} + {%- else -%} + {{encodable.kotlin_type}} + {%- endif -%} +{%- endmacro -%} + +{%- macro encode_tlv(encodable, tag, name, depth) %} + {%- if encodable.is_nullable -%} + if ({{name}} != null) { + {{encode_tlv(encodable.without_nullable(), tag, name, depth + 1)}} + } else { + putNull({{tag}}) + } + {%- elif encodable.is_optional -%} + if ({{name}}.isPresent) { + val opt{{name}} = {{name}}.get() + {{encode_tlv(encodable.without_optional(), tag, "opt" + name, depth + 1)}} + } + {%- elif encodable.is_list -%} + startList({{tag}}) + for (item in {{name}}.iterator()) { + {{encode_tlv(encodable.without_list(), "AnonymousTag", "item", depth + 1)}} + } + endList() + {%- elif encodable.is_struct -%} + {{name}}.toTlv({{tag}}, this) + {%- else -%} + put({{tag}}, {{name}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro decode_tlv(source, encodable, tag, depth) %} + {%- if encodable.is_nullable -%} + if (!tlvReader.isNull()) { + {{decode_tlv(source, encodable.without_nullable(), tag, depth + 1)}} + } else { + tlvReader.getNull({{tag}}) + null + } + {%- elif encodable.is_optional -%} + if (tlvReader.isNextTag({{tag}})) { + Optional.of({{decode_tlv(source, encodable.without_optional(), tag, depth + 1)}}) + } else { + Optional.empty() + } + {%- elif encodable.is_list -%} + {%- set encodablewithoutlist = encodable.without_list() -%} + buildList<{{encode_value(source, encodablewithoutlist, depth + 1)}}> { + tlvReader.enterList({{tag}}) + while(!tlvReader.isEndOfContainer()) { + add({{decode_tlv(source, encodablewithoutlist, "AnonymousTag", depth + 1)}}) + } + tlvReader.exitContainer() + } + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + {{source.name}}Cluster{{struct.name}}.fromTlv({{tag}}, tlvReader) + {%- else -%} + tlvReader.get{{encodable.kotlin_type}}({{tag}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro contextSpecificTag(field) -%} + ContextSpecificTag(TAG_{{field.name | constcase}}) +{%- endmacro -%} + +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvParsingException +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +import java.util.Optional + +class {{cluster.name}}Cluster{{struct.name}} ( + {%- for field in struct.fields %} + {%- set encodable = field | asEncodable(typeLookup) %} + val {{field.name}}: {{encode_value(cluster, encodable, 0)}} + {%- if loop.index0 < loop.length - 1 -%}{{","}}{%- endif -%} + {%- endfor -%}) { + override fun toString(): String = buildString { + append("{{cluster.name}}Cluster{{struct.name}} {\n") + {%- for field in struct.fields %} + append("\t{{field.name}} : ${{field.name}}\n") + {%- endfor %} + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + {% for field in struct.fields %} + {%- set encodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + {{encode_tlv(encodable, tag, field.name, 0)}} + {% endfor -%} + endStructure() + } + } + + companion object { + {%- for field in struct.fields %} + private const val TAG_{{field.name | constcase}} = {{field.code}} + {%- endfor %} + + fun fromTlv(tag: Tag, tlvReader: TlvReader) : {{cluster.name}}Cluster{{struct.name}} { + tlvReader.enterStructure(tag) + {% for field in struct.fields %} + {%- set decodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + val {{field.name}} = {{decode_tlv(cluster, decodable, tag, 0)}} + {% endfor %} + tlvReader.exitContainer() + + return {{cluster.name}}Cluster{{struct.name}}( + {%- for field in struct.fields -%} + {%- set encodable = field | asEncodable(typeLookup) -%} + {{field.name}} + {%- if loop.index0 < loop.length - 1 -%}{{", "}}{%- endif -%} + {%- endfor -%} + ) + } + } +} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py index 3f974d3b2d8d18..5abc912ebabd34 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py @@ -23,7 +23,7 @@ from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType, ParseDataType, TypeLookupContext) from matter_idl.matter_idl_types import (Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl, Struct, - StructTag) + StructQuality, StructTag) from stringcase import capitalcase @@ -478,6 +478,43 @@ def boxed_java_type(self): else: return "Object" + @property + def kotlin_type(self): + t = ParseDataType(self.data_type, self.context) + + if isinstance(t, FundamentalType): + if t == FundamentalType.BOOL: + return "Boolean" + elif t == FundamentalType.FLOAT: + return "Float" + elif t == FundamentalType.DOUBLE: + return "Double" + else: + raise Exception("Unknown fundamental type") + elif isinstance(t, BasicInteger): + # the >= 3 will include int24_t to be considered "long" + if t.byte_count >= 3: + return "Long" + else: + return "Int" + elif isinstance(t, BasicString): + if t.is_binary: + return "ByteArray" + else: + return "String" + elif isinstance(t, IdlEnumType): + if t.base_type.byte_count >= 3: + return "Long" + else: + return "Int" + elif isinstance(t, IdlBitmapType): + if t.base_type.byte_count >= 3: + return "Long" + else: + return "Int" + else: + return "Any" + @property def unboxed_java_signature(self): if self.is_optional or self.is_list: @@ -601,6 +638,14 @@ def CanGenerateSubscribe(attr: Attribute, lookup: TypeLookupContext) -> bool: return not lookup.is_struct_type(attr.definition.data_type.name) +def IsFabricScopedList(attr: Attribute, lookup: TypeLookupContext) -> bool: + if not attr.definition.is_list: + return False + + struct = lookup.find_struct(attr.definition.data_type.name) + return struct and struct.qualities == StructQuality.FABRIC_SCOPED + + def IsResponseStruct(s: Struct) -> bool: return s.tag == StructTag.RESPONSE @@ -632,6 +677,7 @@ def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs): self.jinja_env.filters['createLookupContext'] = CreateLookupContext self.jinja_env.filters['canGenerateSubscribe'] = CanGenerateSubscribe self.jinja_env.filters['decodableJniType'] = DecodableJniType + self.jinja_env.filters['isFabricScopedList'] = IsFabricScopedList self.jinja_env.tests['is_response_struct'] = IsResponseStruct self.jinja_env.tests['is_using_global_callback'] = _IsUsingGlobalCallback @@ -743,3 +789,43 @@ def internal_render_all(self): 'clientClusters': clientClusters, } ) + + # Every cluster has its own impl, to avoid + # very large compilations (running out of RAM) + for cluster in self.idl.clusters: + if cluster.side != ClusterSide.CLIENT: + continue + + for struct in cluster.structs: + if struct.tag: + continue + + output_name = "java/chip/devicecontroller/cluster/structs/{cluster_name}Cluster{struct_name}.kt" + self.internal_render_one_output( + template_path="ChipStructs.jinja", + output_file_name=output_name.format( + cluster_name=cluster.name, + struct_name=struct.name), + vars={ + 'cluster': cluster, + 'struct': struct, + 'typeLookup': TypeLookupContext(self.idl, cluster), + } + ) + + for event in cluster.events: + if not event.fields: + continue + + output_name = "java/chip/devicecontroller/cluster/eventstructs/{cluster_name}Cluster{event_name}Event.kt" + self.internal_render_one_output( + template_path="ChipEventStructs.jinja", + output_file_name=output_name.format( + cluster_name=cluster.name, + event_name=event.name), + vars={ + 'cluster': cluster, + 'event': event, + 'typeLookup': TypeLookupContext(self.idl, cluster), + } + ) diff --git a/scripts/py_matter_idl/matter_idl/test_generators.py b/scripts/py_matter_idl/matter_idl/test_generators.py index 0576f3222e8bd5..31f95bbdfff0ac 100755 --- a/scripts/py_matter_idl/matter_idl/test_generators.py +++ b/scripts/py_matter_idl/matter_idl/test_generators.py @@ -164,6 +164,7 @@ def build_tests(yaml_data) -> List[GeneratorTest]: class TestGenerators(unittest.TestCase): def test_generators(self): + self.maxDiff = None with open(os.path.join(TESTS_DIR, "available_tests.yaml"), 'rt') as stream: yaml_data = yaml.safe_load(stream) diff --git a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml index 3a50ebc076dcb8..de117835790d10 100644 --- a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml +++ b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml @@ -52,6 +52,7 @@ java-jni: java-class: inputs/several_clusters.matter: + java/chip/devicecontroller/cluster/structs/SecondClusterFabricDescriptorStruct.kt: outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt java/chip/devicecontroller/ClusterWriteMapping.java: outputs/several_clusters/java/ClusterWriteMapping.java java/chip/devicecontroller/ClusterReadMapping.java: outputs/several_clusters/java/ClusterReadMapping.java java/chip/devicecontroller/ClusterIDMapping.java: outputs/several_clusters/java/ClusterIDMapping.java diff --git a/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter b/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter index 4451abbe828d69..39e5227ba3dc8b 100644 --- a/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter +++ b/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter @@ -3,6 +3,16 @@ client cluster First = 1 { } client cluster Second = 2 { + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + readonly attribute FabricDescriptorStruct fabrics[] = 0; readonly attribute octet_string<32> someBytes = 123; } diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/proto/second_cluster.proto b/scripts/py_matter_idl/matter_idl/tests/outputs/proto/second_cluster.proto index 1ac9be7447c174..e0d99270b10304 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/proto/second_cluster.proto +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/proto/second_cluster.proto @@ -15,7 +15,33 @@ message SecondCluster { CLUSTER_ID = 2; } + // Structs + message FabricDescriptorStruct { + /** octet_string Type: 5 IsList: 0 FieldId: 1 */ + bytes root_public_key = 2621441; + /** vendor_id Type: 1 IsList: 0 FieldId: 2 */ + uint32 vendor_id = 524290; + /** fabric_id Type: 1 IsList: 0 FieldId: 3 */ + uint64 fabric_id = 524291; + /** node_id Type: 1 IsList: 0 FieldId: 4 */ + uint64 node_id = 524292; + /** char_string Type: 4 IsList: 0 FieldId: 5 */ + string label = 2097157; + /** fabric_idx Type: 1 IsList: 0 FieldId: 254 */ + uint32 fabric_index = 524542; + } + + // Attributes + /** FabricDescriptorStruct Type: 6 IsList: 1 FieldId: 0 */ + FabricDescriptorStruct fabrics = 3145728; + /* + [(attribute) = { + is_subscribable: true, + }]; + */ + + /** octet_string Type: 5 IsList: 0 FieldId: 123 */ bytes some_bytes = 2621563; /* diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java index 86cdd093afe959..22493a3a4ace9b 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java @@ -140,6 +140,7 @@ public long getID() { } public enum Attribute { + Fabrics(0L), SomeBytes(123L),; private final long id; Attribute(long id) { diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterReadMapping.java b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterReadMapping.java index e57dd4a37828d9..a5c86be6fc291d 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterReadMapping.java +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterReadMapping.java @@ -41,7 +41,18 @@ private static Map readFirstInteractionInfo() { return result; } private static Map readSecondInteractionInfo() { - Map result = new LinkedHashMap<>();Map readSecondSomeBytesCommandParams = new LinkedHashMap(); + Map result = new LinkedHashMap<>();Map readSecondFabricsCommandParams = new LinkedHashMap(); + InteractionInfo readSecondFabricsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.SecondCluster) cluster).readFabricsAttribute( + (ChipClusters.SecondCluster.FabricsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedSecondClusterFabricsAttributeCallback(), + readSecondFabricsCommandParams + ); + result.put("readFabricsAttribute", readSecondFabricsAttributeInteractionInfo); + Map readSecondSomeBytesCommandParams = new LinkedHashMap(); InteractionInfo readSecondSomeBytesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.SecondCluster) cluster).readSomeBytesAttribute( diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt new file mode 100644 index 00000000000000..e86ce5788fd642 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvParsingException +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +import java.util.Optional + +class SecondClusterFabricDescriptorStruct ( + val rootPublicKey: ByteArray, + val vendorID: Int, + val fabricID: Long, + val nodeID: Long, + val label: String, + val fabricIndex: Int) { + override fun toString(): String = buildString { + append("SecondClusterFabricDescriptorStruct {\n") + append("\trootPublicKey : $rootPublicKey\n") + append("\tvendorID : $vendorID\n") + append("\tfabricID : $fabricID\n") + append("\tnodeID : $nodeID\n") + append("\tlabel : $label\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY), rootPublicKey) + put(ContextSpecificTag(TAG_VENDOR_I_D), vendorID) + put(ContextSpecificTag(TAG_FABRIC_I_D), fabricID) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ROOT_PUBLIC_KEY = 1 + private const val TAG_VENDOR_I_D = 2 + private const val TAG_FABRIC_I_D = 3 + private const val TAG_NODE_I_D = 4 + private const val TAG_LABEL = 5 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SecondClusterFabricDescriptorStruct { + tlvReader.enterStructure(tag) + val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) + val vendorID = tlvReader.getInt(ContextSpecificTag(TAG_VENDOR_I_D)) + val fabricID = tlvReader.getLong(ContextSpecificTag(TAG_FABRIC_I_D)) + val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return SecondClusterFabricDescriptorStruct(rootPublicKey, vendorID, fabricID, nodeID, label, fabricIndex) + } + } +} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h index 9b4ea4e30e366f..d32e68fbfda3ab 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h @@ -24,6 +24,7 @@ typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); typedef void (*CHIPFirstClusterSomeIntegerAttributeCallbackType)(void *, chip::app::Clusters::First::Attributes::SomeInteger::TypeInfo::DecodableArgType); +typedef void (*CHIPSecondClusterFabricsAttributeCallbackType)(void *, const chip::app::Clusters::Second::Attributes::Fabrics::TypeInfo::DecodableType &); typedef void (*CHIPSecondClusterSomeBytesAttributeCallbackType)(void *, chip::app::Clusters::Second::Attributes::SomeBytes::TypeInfo::DecodableArgType); typedef void (*CHIPThirdClusterSomeEnumAttributeCallbackType)(void *, chip::app::Clusters::Third::Attributes::SomeEnum::TypeInfo::DecodableArgType); typedef void (*CHIPThirdClusterOptionsAttributeCallbackType)(void *, chip::app::Clusters::Third::Attributes::Options::TypeInfo::DecodableArgType); diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h index 5cc0fa52eea6af..60603103b8f692 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h @@ -340,6 +340,32 @@ class CHIPOctetStringAttributeCallback : public chip::Callback::Callback +{ +public: + CHIPSecondFabricsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPSecondFabricsAttributeCallback(); + + static void maybeDestroy(CHIPSecondFabricsAttributeCallback * callback) { + if (!callback->keepAlive) { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + + class CHIPThirdSomeEnumAttributeCallback : public chip::Callback::Callback diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp index f5330797d97be8..f123a5407e0170 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp @@ -34,7 +34,28 @@ JNI_METHOD(jlong, SecondCluster, initWithDevice)(JNIEnv * env, jobject self, jlo return reinterpret_cast(cppCluster); } -JNI_METHOD(void, SecondCluster, subscribeSomeBytesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, SecondCluster, subscribeFabricsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ClusterBase * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Second::Attributes::Fabrics::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPSecondFabricsAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +}JNI_METHOD(void, SecondCluster, subscribeSomeBytesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp index 9f718035cd39f5..714790e2c9d28e 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp @@ -12,6 +12,30 @@ #define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME +JNI_METHOD(void, SecondCluster, readFabricsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jboolean isFabricFiltered) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Second::Attributes::Fabrics::TypeInfo; + std::unique_ptr onSuccess(chip::Platform::New(callback, false), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, isFabricFiltered); + VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + + JNI_METHOD(void, SecondCluster, readSomeBytesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index c00d1ce6735d91..e3d2f25d2db368 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -171,6 +171,9 @@ def _GetChipReplUnsupportedTests() -> Set[str]: "Test_TC_ACE_1_6.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27910#issuecomment-1632485584 "Test_TC_IDM_1_2.yaml", # chip-repl does not support AnyCommands (19/07/2023) "TestGroupKeyManagementCluster.yaml", # chip-repl does not support EqualityCommands (2023-08-04) + "Test_TC_S_2_2.yaml", # chip-repl does not support scenes cluster commands + "Test_TC_S_2_3.yaml", # chip-repl does not support scenes cluster commands + "Test_TC_S_2_4.yaml", # chip-repl does not support scenes cluster commands } diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 2dca8db565480b..03a1ee12b20753 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -19,11 +19,14 @@ import logging import multiprocessing import os +import os.path import shutil import subprocess import sys import tempfile import time +import traceback +import urllib.request from dataclasses import dataclass from enum import Flag, auto from pathlib import Path @@ -270,11 +273,43 @@ def __init__(self, generator: str, output_directory: str, idl_path: str): self.command = ["./scripts/codegen.py", "--output-dir", output_directory, "--generator", generator, idl_path] + def formatKotlinFiles(self, paths): + try: + logging.info("Prettifying %d kotlin files:", len(paths)) + for name in paths: + logging.info(" %s" % name) + + VERSION = "0.44" + JAR_NAME = f"ktfmt-{VERSION}-jar-with-dependencies.jar" + jar_url = f"https://repo1.maven.org/maven2/com/facebook/ktfmt/{VERSION}/{JAR_NAME}" + + with tempfile.TemporaryDirectory(prefix='ktfmt') as tmpdir: + path, http_message = urllib.request.urlretrieve(jar_url, Path(tmpdir).joinpath(JAR_NAME).as_posix()) + subprocess.check_call(['java', '-jar', path, '--google-style'] + paths) + except Exception: + traceback.print_exc() + + def codeFormat(self): + outputs = subprocess.check_output(["./scripts/codegen.py", "--name-only", "--generator", + self.generator, "--log-level", "fatal", self.idl_path]).decode("utf8").split("\n") + outputs = [os.path.join(self.output_directory, name) for name in outputs if name] + + # Split output files by extension, + name_dict = {} + for name in outputs: + _, extension = os.path.splitext(name) + name_dict[extension] = name_dict.get(extension, []) + [name] + + if '.kt' in name_dict: + self.formatKotlinFiles(name_dict['.kt']) + def generate(self) -> TargetRunStats: generate_start = time.time() subprocess.check_call(self.command) + self.codeFormat() + generate_end = time.time() return TargetRunStats( diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 23aaf9d85d03be..a86dd4b98aed9e 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -615,14 +615,14 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest // Walk through all existing subscriptions and shut down those whose subscriber matches // that which just came in. // - mReadHandlers.ForEachActiveObject([this, apExchangeContext](ReadHandler * handler) { + mReadHandlers.ForEachActiveObject([apExchangeContext](ReadHandler * handler) { if (handler->IsFromSubscriber(*apExchangeContext)) { ChipLogProgress(InteractionModel, "Deleting previous subscription from NodeId: " ChipLogFormatX64 ", FabricIndex: %u", ChipLogValueX64(apExchangeContext->GetSessionHandle()->AsSecureSession()->GetPeerNodeId()), apExchangeContext->GetSessionHandle()->GetFabricIndex()); - mReadHandlers.ReleaseObject(handler); + handler->Close(); } return Loop::Continue; diff --git a/src/app/SafeAttributePersistenceProvider.h b/src/app/SafeAttributePersistenceProvider.h index c6cba4e9f7135d..ed02d6039043ad 100644 --- a/src/app/SafeAttributePersistenceProvider.h +++ b/src/app/SafeAttributePersistenceProvider.h @@ -54,7 +54,14 @@ class SafeAttributePersistenceProvider { uint8_t value[sizeof(T)]; auto w = Encoding::LittleEndian::BufferWriter(value, sizeof(T)); - w.EndianPut(uint64_t(aValue), sizeof(T)); + if constexpr (std::is_signed_v) + { + w.EndianPutSigned(aValue, sizeof(T)); + } + else + { + w.EndianPut(aValue, sizeof(T)); + } return SafeWriteValue(aPath, ByteSpan(value)); } @@ -76,7 +83,7 @@ class SafeAttributePersistenceProvider return err; } - chip::Encoding::LittleEndian::Reader r(tempVal.data(), tempVal.size()); + Encoding::LittleEndian::Reader r(tempVal.data(), tempVal.size()); r.RawReadLowLevelBeCareful(&aValue); return r.StatusCode(); } diff --git a/src/app/StatusResponse.h b/src/app/StatusResponse.h index 7021e3868bcb5a..93f2557b679854 100644 --- a/src/app/StatusResponse.h +++ b/src/app/StatusResponse.h @@ -22,10 +22,11 @@ #include #include #include +#include namespace chip { namespace app { -static constexpr size_t kMaxSecureSduLengthBytes = 1024; +static constexpr size_t kMaxSecureSduLengthBytes = kMaxAppMessageLen + kMaxTagLen; class StatusResponse { diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 20b1f9d0e18e1e..d484d7ce654e9b 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -267,7 +267,7 @@ template("chip_data_model") { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp", "${_app_root}/clusters/${cluster}/${cluster}.h", - "${_app_root}/clusters/${cluster}/operational-state-delegate.h", + "${_app_root}/clusters/${cluster}/operational-state-cluster-objects.h", ] } else if (cluster == "dishwasher-alarm-server") { sources += [ diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index 4495e728fc7ecb..b5b8a403b9ba3e 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -39,104 +39,22 @@ namespace app { namespace Clusters { namespace ModeBase { -void Instance::RegisterInstance() -{ - if (!gModeBaseAliasesInstances.Contains(this)) - { - gModeBaseAliasesInstances.PushBack(this); - } -} - -void Instance::UnregisterInstance() -{ - gModeBaseAliasesInstances.Remove(this); -} - -bool Instance::HasFeature(Feature feature) const +Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeature) : + CommandHandlerInterface(Optional(aEndpointId), aClusterId), + AttributeAccessInterface(Optional(aEndpointId), aClusterId), mDelegate(aDelegate), mEndpointId(aEndpointId), + mClusterId(aClusterId), + mCurrentMode(0), // This is a temporary value and may not be valid. We will change this to the value of the first + // mode in the list at the start of the Init function to ensure that it represents a valid mode. + mFeature(aFeature) { - return (mFeature & to_underlying(feature)) != 0; + mDelegate->SetInstance(this); } -void Instance::LoadPersistentAttributes() +Instance::~Instance() { - // Load Current Mode - uint8_t tempCurrentMode; - CHIP_ERROR err = GetSafeAttributePersistenceProvider()->ReadScalarValue( - ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentMode::Id), tempCurrentMode); - if (err == CHIP_NO_ERROR) - { - Status status = UpdateCurrentMode(tempCurrentMode); - if (status == Status::Success) - { - ChipLogDetail(Zcl, "ModeBase: Loaded CurrentMode as %u", GetCurrentMode()); - } - else - { - ChipLogError(Zcl, "ModeBase: Could not update CurrentMode to %u: %u", tempCurrentMode, to_underlying(status)); - } - } - else - { - // If we cannot find the previous CurrentMode, we will assume it to be the first mode in the - // list, as was initialised in the constructor. - ChipLogDetail(Zcl, "ModeBase: Unable to load the CurrentMode from the KVS. Assuming %u", GetCurrentMode()); - } - - // Load Start-Up Mode - DataModel::Nullable tempStartUpMode; - err = GetSafeAttributePersistenceProvider()->ReadScalarValue( - ConcreteAttributePath(mEndpointId, mClusterId, Attributes::StartUpMode::Id), tempStartUpMode); - if (err == CHIP_NO_ERROR) - { - Status status = UpdateStartUpMode(tempStartUpMode); - if (status == Status::Success) - { - if (GetStartUpMode().IsNull()) - { - ChipLogDetail(Zcl, "ModeBase: Loaded StartUpMode as null"); - } - else - { - ChipLogDetail(Zcl, "ModeBase: Loaded StartUpMode as %u", GetStartUpMode().Value()); - } - } - else - { - ChipLogError(Zcl, "ModeBase: Could not update StartUpMode: %u", to_underlying(status)); - } - } - else - { - ChipLogDetail(Zcl, "ModeBase: Unable to load the StartUpMode from the KVS. Assuming null"); - } - - // Load On Mode - DataModel::Nullable tempOnMode; - err = GetSafeAttributePersistenceProvider()->ReadScalarValue( - ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id), tempOnMode); - if (err == CHIP_NO_ERROR) - { - Status status = UpdateOnMode(tempOnMode); - if (status == Status::Success) - { - if (GetOnMode().IsNull()) - { - ChipLogDetail(Zcl, "ModeBase: Loaded OnMode as null"); - } - else - { - ChipLogDetail(Zcl, "ModeBase: Loaded OnMode as %u", GetOnMode().Value()); - } - } - else - { - ChipLogError(Zcl, "ModeBase: Could not update OnMode: %u", to_underlying(status)); - } - } - else - { - ChipLogDetail(Zcl, "ModeBase: Unable to load the OnMode from the KVS. Assuming null"); - } + UnregisterInstance(); + chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this); + unregisterAttributeAccessOverride(this); } CHIP_ERROR Instance::Init() @@ -194,6 +112,7 @@ CHIP_ERROR Instance::Init() } } } + #ifdef EMBER_AF_PLUGIN_ON_OFF_SERVER // OnMode with Power Up // If the On/Off feature is supported and the On/Off cluster attribute StartUpOnOff is present, with a @@ -229,9 +148,110 @@ CHIP_ERROR Instance::Init() } } #endif // EMBER_AF_PLUGIN_ON_OFF_SERVER + return CHIP_NO_ERROR; } +Status Instance::UpdateCurrentMode(uint8_t aNewMode) +{ + if (!IsSupportedMode(aNewMode)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + uint8_t oldMode = mCurrentMode; + mCurrentMode = aNewMode; + if (mCurrentMode != oldMode) + { + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentMode::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mCurrentMode); + MatterReportingAttributeChangeCallback(path); + } + return Protocols::InteractionModel::Status::Success; +} + +Status Instance::UpdateStartUpMode(DataModel::Nullable aNewStartUpMode) +{ + if (!aNewStartUpMode.IsNull()) + { + if (!IsSupportedMode(aNewStartUpMode.Value())) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + DataModel::Nullable oldStartUpMode = mStartUpMode; + mStartUpMode = aNewStartUpMode; + if (mStartUpMode != oldStartUpMode) + { + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::StartUpMode::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mStartUpMode); + MatterReportingAttributeChangeCallback(path); + } + return Protocols::InteractionModel::Status::Success; +} + +Status Instance::UpdateOnMode(DataModel::Nullable aNewOnMode) +{ + if (!aNewOnMode.IsNull()) + { + if (!IsSupportedMode(aNewOnMode.Value())) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + DataModel::Nullable oldOnMode = mOnMode; + mOnMode = aNewOnMode; + if (mOnMode != oldOnMode) + { + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mOnMode); + MatterReportingAttributeChangeCallback(path); + } + return Protocols::InteractionModel::Status::Success; +} + +uint8_t Instance::GetCurrentMode() const +{ + return mCurrentMode; +} + +DataModel::Nullable Instance::GetStartUpMode() const +{ + return mStartUpMode; +} + +DataModel::Nullable Instance::GetOnMode() const +{ + return mOnMode; +} + +void Instance::ReportSupportedModesChange() +{ + MatterReportingAttributeChangeCallback(ConcreteAttributePath(mEndpointId, mClusterId, Attributes::SupportedModes::Id)); +} + +bool Instance::HasFeature(Feature feature) const +{ + return (mFeature & to_underlying(feature)) != 0; +} + +bool Instance::IsSupportedMode(uint8_t modeValue) +{ + uint8_t value; + for (uint8_t i = 0; mDelegate->GetModeValueByIndex(i, value) != CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; i++) + { + if (value == modeValue) + { + return true; + } + } + ChipLogDetail(Zcl, "Cannot find a mode with value %u", modeValue); + return false; +} + +// private methods template void Instance::HandleCommand(HandlerContext & handlerContext, FuncT func) { @@ -257,31 +277,6 @@ void Instance::HandleCommand(HandlerContext & handlerContext, FuncT func) } } -void Instance::HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeToMode::DecodableType & commandData) -{ - uint8_t newMode = commandData.newMode; - - Commands::ChangeToModeResponse::Type response; - - if (!IsSupportedMode(newMode)) - { - ChipLogError(Zcl, "ModeBase: Failed to find the option with mode %u", newMode); - response.status = to_underlying(StatusCode::kUnsupportedMode); - ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); - return; - } - - mDelegate->HandleChangeToMode(newMode, response); - - if (response.status == to_underlying(StatusCode::kSuccess)) - { - UpdateCurrentMode(newMode); - ChipLogProgress(Zcl, "ModeBase: HandleChangeToMode changed to mode %u", newMode); - } - - ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); -} - // This function is called by the interaction model engine when a command destined for this instance is received. void Instance::InvokeCommand(HandlerContext & handlerContext) { @@ -310,38 +305,6 @@ CHIP_ERROR Instance::EnumerateGeneratedCommands(const ConcreteClusterPath & clus return CHIP_NO_ERROR; } -CHIP_ERROR Instance::EncodeSupportedModes(const AttributeValueEncoder::ListEncodeHelper & encoder) -{ - for (uint8_t i = 0; true; i++) - { - ModeOptionStructType mode; - - // Get the mode label - char buffer[kMaxModeLabelSize]; - MutableCharSpan label(buffer); - auto err = mDelegate->GetModeLabelByIndex(i, label); - if (err == CHIP_ERROR_PROVIDER_LIST_EXHAUSTED) - { - return CHIP_NO_ERROR; - } - ReturnErrorOnFailure(err); - - mode.label = label; - - // Get the mode value - ReturnErrorOnFailure(mDelegate->GetModeValueByIndex(i, mode.mode)); - - // Get the mode tags - ModeTagStructType tagsBuffer[kMaxNumOfModeTags]; - DataModel::List tags(tagsBuffer); - ReturnErrorOnFailure(mDelegate->GetModeTagsByIndex(i, tags)); - mode.modeTags = tags; - - ReturnErrorOnFailure(encoder.Encode(mode)); - } - return CHIP_NO_ERROR; -} - // Implements the read functionality for complex attributes. CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { @@ -387,111 +350,156 @@ CHIP_ERROR Instance::Write(const ConcreteDataAttributePath & attributePath, Attr return CHIP_ERROR_INCORRECT_STATE; } -Status Instance::UpdateCurrentMode(uint8_t aNewMode) +void Instance::RegisterInstance() { - if (!IsSupportedMode(aNewMode)) + if (!gModeBaseAliasesInstances.Contains(this)) { - return Protocols::InteractionModel::Status::ConstraintError; + gModeBaseAliasesInstances.PushBack(this); } - uint8_t oldMode = mCurrentMode; - mCurrentMode = aNewMode; - if (mCurrentMode != oldMode) +} + +void Instance::UnregisterInstance() +{ + gModeBaseAliasesInstances.Remove(this); +} + +void Instance::HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeToMode::DecodableType & commandData) +{ + uint8_t newMode = commandData.newMode; + + Commands::ChangeToModeResponse::Type response; + + if (!IsSupportedMode(newMode)) { - // Write new value to persistent storage. - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentMode::Id); - GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mCurrentMode); - MatterReportingAttributeChangeCallback(path); + ChipLogError(Zcl, "ModeBase: Failed to find the option with mode %u", newMode); + response.status = to_underlying(StatusCode::kUnsupportedMode); + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); + return; } - return Protocols::InteractionModel::Status::Success; + + mDelegate->HandleChangeToMode(newMode, response); + + if (response.status == to_underlying(StatusCode::kSuccess)) + { + UpdateCurrentMode(newMode); + ChipLogProgress(Zcl, "ModeBase: HandleChangeToMode changed to mode %u", newMode); + } + + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); } -Status Instance::UpdateStartUpMode(DataModel::Nullable aNewStartUpMode) +void Instance::LoadPersistentAttributes() { - if (!aNewStartUpMode.IsNull()) + // Load Current Mode + uint8_t tempCurrentMode; + CHIP_ERROR err = GetSafeAttributePersistenceProvider()->ReadScalarValue( + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentMode::Id), tempCurrentMode); + if (err == CHIP_NO_ERROR) { - if (!IsSupportedMode(aNewStartUpMode.Value())) + Status status = UpdateCurrentMode(tempCurrentMode); + if (status == Status::Success) { - return Protocols::InteractionModel::Status::ConstraintError; + ChipLogDetail(Zcl, "ModeBase: Loaded CurrentMode as %u", GetCurrentMode()); + } + else + { + ChipLogError(Zcl, "ModeBase: Could not update CurrentMode to %u: %u", tempCurrentMode, to_underlying(status)); } } - DataModel::Nullable oldStartUpMode = mStartUpMode; - mStartUpMode = aNewStartUpMode; - if (mStartUpMode != oldStartUpMode) + else { - // Write new value to persistent storage. - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::StartUpMode::Id); - GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mStartUpMode); - MatterReportingAttributeChangeCallback(path); + // If we cannot find the previous CurrentMode, we will assume it to be the first mode in the + // list, as was initialised in the constructor. + ChipLogDetail(Zcl, "ModeBase: Unable to load the CurrentMode from the KVS. Assuming %u", GetCurrentMode()); } - return Protocols::InteractionModel::Status::Success; -} -Status Instance::UpdateOnMode(DataModel::Nullable aNewOnMode) -{ - if (!aNewOnMode.IsNull()) + // Load Start-Up Mode + DataModel::Nullable tempStartUpMode; + err = GetSafeAttributePersistenceProvider()->ReadScalarValue( + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::StartUpMode::Id), tempStartUpMode); + if (err == CHIP_NO_ERROR) { - if (!IsSupportedMode(aNewOnMode.Value())) + Status status = UpdateStartUpMode(tempStartUpMode); + if (status == Status::Success) { - return Protocols::InteractionModel::Status::ConstraintError; + if (GetStartUpMode().IsNull()) + { + ChipLogDetail(Zcl, "ModeBase: Loaded StartUpMode as null"); + } + else + { + ChipLogDetail(Zcl, "ModeBase: Loaded StartUpMode as %u", GetStartUpMode().Value()); + } + } + else + { + ChipLogError(Zcl, "ModeBase: Could not update StartUpMode: %u", to_underlying(status)); } } - DataModel::Nullable oldOnMode = mOnMode; - mOnMode = aNewOnMode; - if (mOnMode != oldOnMode) + else { - // Write new value to persistent storage. - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id); - GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mOnMode); - MatterReportingAttributeChangeCallback(path); + ChipLogDetail(Zcl, "ModeBase: Unable to load the StartUpMode from the KVS. Assuming null"); } - return Protocols::InteractionModel::Status::Success; -} -DataModel::Nullable Instance::GetStartUpMode() const -{ - return mStartUpMode; -} - -DataModel::Nullable Instance::GetOnMode() const -{ - return mOnMode; -} - -uint8_t Instance::GetCurrentMode() const -{ - return mCurrentMode; -} - -bool Instance::IsSupportedMode(uint8_t modeValue) -{ - uint8_t value; - for (uint8_t i = 0; mDelegate->GetModeValueByIndex(i, value) != CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; i++) + // Load On Mode + DataModel::Nullable tempOnMode; + err = GetSafeAttributePersistenceProvider()->ReadScalarValue( + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id), tempOnMode); + if (err == CHIP_NO_ERROR) { - if (value == modeValue) + Status status = UpdateOnMode(tempOnMode); + if (status == Status::Success) { - return true; + if (GetOnMode().IsNull()) + { + ChipLogDetail(Zcl, "ModeBase: Loaded OnMode as null"); + } + else + { + ChipLogDetail(Zcl, "ModeBase: Loaded OnMode as %u", GetOnMode().Value()); + } + } + else + { + ChipLogError(Zcl, "ModeBase: Could not update OnMode: %u", to_underlying(status)); } } - ChipLogDetail(Zcl, "Cannot find a mode with value %u", modeValue); - return false; + else + { + ChipLogDetail(Zcl, "ModeBase: Unable to load the OnMode from the KVS. Assuming null"); + } } -Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeature) : - CommandHandlerInterface(Optional(aEndpointId), aClusterId), - AttributeAccessInterface(Optional(aEndpointId), aClusterId), mDelegate(aDelegate), mEndpointId(aEndpointId), - mClusterId(aClusterId), - mCurrentMode(0), // This is a temporary value and may not be valid. We will change this to the value of the first - // mode in the list at the start of the Init function to ensure that it represents a valid mode. - mFeature(aFeature) +CHIP_ERROR Instance::EncodeSupportedModes(const AttributeValueEncoder::ListEncodeHelper & encoder) { - mDelegate->SetInstance(this); -} + for (uint8_t i = 0; true; i++) + { + ModeOptionStructType mode; -Instance::~Instance() -{ - UnregisterInstance(); - chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this); - unregisterAttributeAccessOverride(this); + // Get the mode label + char buffer[kMaxModeLabelSize]; + MutableCharSpan label(buffer); + auto err = mDelegate->GetModeLabelByIndex(i, label); + if (err == CHIP_ERROR_PROVIDER_LIST_EXHAUSTED) + { + return CHIP_NO_ERROR; + } + ReturnErrorOnFailure(err); + + mode.label = label; + + // Get the mode value + ReturnErrorOnFailure(mDelegate->GetModeValueByIndex(i, mode.mode)); + + // Get the mode tags + ModeTagStructType tagsBuffer[kMaxNumOfModeTags]; + DataModel::List tags(tagsBuffer); + ReturnErrorOnFailure(mDelegate->GetModeTagsByIndex(i, tags)); + mode.modeTags = tags; + + ReturnErrorOnFailure(encoder.Encode(mode)); + } + return CHIP_NO_ERROR; } IntrusiveList & GetModeBaseInstanceList() diff --git a/src/app/clusters/mode-base-server/mode-base-server.h b/src/app/clusters/mode-base-server/mode-base-server.h index b75eeb85e67481..10a2a97c07080f 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.h +++ b/src/app/clusters/mode-base-server/mode-base-server.h @@ -34,55 +34,20 @@ class Delegate; class Instance : public CommandHandlerInterface, public AttributeAccessInterface, public IntrusiveListNodeBase<> { -private: - Delegate * mDelegate; - - EndpointId mEndpointId{}; - ClusterId mClusterId{}; - - // Attribute data store - uint8_t mCurrentMode; - DataModel::Nullable mStartUpMode; - DataModel::Nullable mOnMode; - uint32_t mFeature; - - // CommandHandlerInterface - void InvokeCommand(HandlerContext & ctx) override; - CHIP_ERROR EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; - CHIP_ERROR EnumerateGeneratedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; - - // AttributeAccessInterface - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; - - /** - * Register this ModeBase instance. - */ - void RegisterInstance(); - - /** - * Unregister this ModeBase instance. - */ - void UnregisterInstance(); - - /** - * Internal change-to-mode command handler function. - */ - void HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeToMode::DecodableType & req); - +public: /** - * Helper function that loads all the persistent attributes from the KVS. These attributes are CurrentMode, - * StartUpMode and OnMode. + * Creates a mode base cluster instance. The Init() function needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * @param aDelegate A pointer to the delegate to be used by this server. + * Note: the caller must ensure that the delegate lives throughout the instance's lifetime. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aClusterId The ID of the ModeBase derived cluster to be instantiated. + * @param aFeature The bitmask value that identifies which features are supported by this instance. */ - void LoadPersistentAttributes(); + Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeature); - /** - * Helper function that encodes the supported modes. - * @param encoder The encoder to encode the supported modes into. - */ - CHIP_ERROR EncodeSupportedModes(const AttributeValueEncoder::ListEncodeHelper & encoder); + ~Instance() override; -public: /** * Initialise the ModeBase server instance. * @return Returns an error if the given endpoint and cluster ID have not been enabled in zap, if the @@ -91,6 +56,13 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface CHIP_ERROR Init(); // Attribute setters + /** + * Sets the Current-Mode attribute. Note, this also handles writing the new value into non-volatile storage. + * @param aNewMode The value to which the Current-Mode mode is to be set. + * @return Returns a ConstraintError if the aNewMode value is not valid. Returns Success otherwise. + */ + Protocols::InteractionModel::Status UpdateCurrentMode(uint8_t aNewMode); + /** * Sets the Start-Up attribute. Note, this also handles writing the new value into non-volatile storage. * @param aNewStartUpMode The value to which the Start-Up mode is to be set. @@ -105,14 +77,12 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface */ Protocols::InteractionModel::Status UpdateOnMode(DataModel::Nullable aNewOnMode); + // Attribute getters. /** - * Sets the Current-Mode attribute. Note, this also handles writing the new value into non-volatile storage. - * @param aNewMode The value to which the Current-Mode mode is to be set. - * @return Returns a ConstraintError if the aNewMode value is not valid. Returns Success otherwise. + * @return The Current mode. */ - Protocols::InteractionModel::Status UpdateCurrentMode(uint8_t aNewMode); + uint8_t GetCurrentMode() const; - // Attribute getters. /** * @return The Start-Up mode. */ @@ -123,11 +93,6 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface */ DataModel::Nullable GetOnMode() const; - /** - * @return The Current mode. - */ - uint8_t GetCurrentMode() const; - /** * @return The endpoint ID. */ @@ -137,6 +102,13 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface static constexpr uint8_t kMaxModeLabelSize = 64; static constexpr uint8_t kMaxNumOfModeTags = 8; + // List change reporting + /** + * Reports that the contents of the supported modes attribute have changed. + * The device SHALL call this method whenever it changes the list of supported modes. + */ + void ReportSupportedModesChange(); + /** * Returns true if the feature is supported. * @param feature the feature to check. @@ -149,19 +121,56 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface */ bool IsSupportedMode(uint8_t mode); - /** - * Creates a mode base cluster instance. The Init() function needs to be called for this instance to be registered and - * called by the interaction model at the appropriate times. - * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. - * @param aClusterId The ID of the ModeBase aliased cluster to be instantiated. - * @param aFeature The bitmask value that identifies which features are supported by this instance. - */ - Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeature); +private: + Delegate * mDelegate; - ~Instance() override; + EndpointId mEndpointId{}; + ClusterId mClusterId{}; + + // Attribute data store + uint8_t mCurrentMode; + DataModel::Nullable mStartUpMode; + DataModel::Nullable mOnMode; + uint32_t mFeature; template void HandleCommand(HandlerContext & handlerContext, FuncT func); + + // CommandHandlerInterface + void InvokeCommand(HandlerContext & ctx) override; + CHIP_ERROR EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; + CHIP_ERROR EnumerateGeneratedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; + + // AttributeAccessInterface + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + + /** + * Register this ModeBase instance. + */ + void RegisterInstance(); + + /** + * Unregister this ModeBase instance. + */ + void UnregisterInstance(); + + /** + * Internal change-to-mode command handler function. + */ + void HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeToMode::DecodableType & req); + + /** + * Helper function that loads all the persistent attributes from the KVS. These attributes are CurrentMode, + * StartUpMode and OnMode. + */ + void LoadPersistentAttributes(); + + /** + * Helper function that encodes the supported modes. + * @param encoder The encoder to encode the supported modes into. + */ + CHIP_ERROR EncodeSupportedModes(const AttributeValueEncoder::ListEncodeHelper & encoder); }; class Delegate @@ -194,6 +203,9 @@ class Delegate * CopyCharSpanToMutableCharSpan to copy into the MutableCharSpan. * @return Returns a CHIP_NO_ERROR if there was no error and the label was returned successfully. * CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the modeIndex in beyond the list of available labels. + * + * Note: This is used by the SDK to populate the supported modes attribute. If the contents of this list change, + * the device SHALL call the Instance's ReportSupportedModesChange method to report that this attribute has changed. */ virtual CHIP_ERROR GetModeLabelByIndex(uint8_t modeIndex, MutableCharSpan & label) = 0; @@ -203,6 +215,9 @@ class Delegate * @param value a reference to the uint8_t variable that is to contain the mode value. * @return Returns a CHIP_NO_ERROR if there was no error and the value was returned successfully. * CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the modeIndex in beyond the list of available values. + * + * Note: This is used by the SDK to populate the supported modes attribute. If the contents of this list change, + * the device SHALL call the Instance's ReportSupportedModesChange method to report that this attribute has changed. */ virtual CHIP_ERROR GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) = 0; @@ -218,6 +233,9 @@ class Delegate * to copy into the buffer. * @return Returns a CHIP_NO_ERROR if there was no error and the mode tags were returned successfully. * CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the modeIndex in beyond the list of available mode tags. + * + * Note: This is used by the SDK to populate the supported modes attribute. If the contents of this list change, + * the device SHALL call the Instance's ReportSupportedModesChange method to report that this attribute has changed. */ virtual CHIP_ERROR GetModeTagsByIndex(uint8_t modeIndex, DataModel::List & modeTags) = 0; diff --git a/src/app/clusters/operational-state-server/operational-state-delegate.h b/src/app/clusters/operational-state-server/operational-state-cluster-objects.h similarity index 60% rename from src/app/clusters/operational-state-server/operational-state-delegate.h rename to src/app/clusters/operational-state-server/operational-state-cluster-objects.h index 34bbe2d1ba10c0..d7159791964915 100644 --- a/src/app/clusters/operational-state-server/operational-state-delegate.h +++ b/src/app/clusters/operational-state-server/operational-state-cluster-objects.h @@ -188,118 +188,54 @@ struct GenericOperationalPhase }; /** - * A delegate to handle application logic of the Operational State aliased Cluster. - * The delegate API assumes there will be separate delegate objects for each cluster instance. - * (i.e. each separate operational state cluster derivation, on each separate endpoint), - * since the delegate methods are not handed the cluster id or endpoint. + * A class which represents the operational error event of an Operational State cluster derivation instance. */ -class Delegate +class GenericErrorEvent : private app::Clusters::OperationalState::Events::OperationalError::Type { -public: - /** - * Get the current operational state. - * @return The current operational state value - */ - virtual uint8_t GetCurrentOperationalState() = 0; - - /** - * Get the list of supported operational states. - * Fills in the provided GenericOperationalState with the state at index `index` if there is one, - * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of states. - * @param index The index of the state, with 0 representing the first state. - * @param operationalState The GenericOperationalState is filled. - */ - virtual CHIP_ERROR GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) = 0; - - /** - * Get the list of supported operational phases. - * Fills in the provided GenericOperationalPhase with the phase at index `index` if there is one, - * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of phases. - * @param index The index of the phase, with 0 representing the first phase. - * @param operationalPhase The GenericOperationalPhase is filled. - */ - virtual CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, GenericOperationalPhase & operationalPhase) = 0; - - /** - * Get current operational error. - * @param error The GenericOperationalError to fill with the current operational error value - */ - virtual void GetCurrentOperationalError(GenericOperationalError & error) = 0; - - /** - * Get current phase - * @param phase The app::DataModel::Nullable to fill with the current phase value - */ - virtual void GetCurrentPhase(app::DataModel::Nullable & phase) = 0; - - /** - * Get countdown time - * @param time The app::DataModel::Nullable to fill with the coutdown time value - */ - virtual void GetCountdownTime(app::DataModel::Nullable & time) = 0; + using super = app::Clusters::OperationalState::Events::OperationalError::Type; - /** - * Set current operational state. - * @param opState The operational state that should now be the current one. - */ - virtual CHIP_ERROR SetOperationalState(uint8_t opState) = 0; - - /** - * Set operational error. - * @param opErrState The new operational error. - */ - virtual CHIP_ERROR SetOperationalError(const GenericOperationalError & opErrState) = 0; - - /** - * Set operational phase. - * @param phase The operational phase that should now be the current one. - */ - virtual CHIP_ERROR SetPhase(const app::DataModel::Nullable & phase) = 0; - - /** - * Set coutdown time. - * @param time The coutdown time that should now be the current one. - */ - virtual CHIP_ERROR SetCountdownTime(const app::DataModel::Nullable & time) = 0; - - // command callback - /** - * Handle Command Callback in application: Pause - * @param[out] get operational error after callback. - */ - virtual void HandlePauseStateCallback(GenericOperationalError & err) = 0; - - /** - * Handle Command Callback in application: Resume - * @param[out] get operational error after callback. - */ - virtual void HandleResumeStateCallback(GenericOperationalError & err) = 0; +public: + GenericErrorEvent(ClusterId aClusterId, const Structs::ErrorStateStruct::Type & aError) : mClusterId(aClusterId) + { + errorState = aError; + } + using super::GetEventId; + using super::GetPriorityLevel; + ClusterId GetClusterId() const { return mClusterId; } + using super::Encode; + using super::kIsFabricScoped; - /** - * Handle Command Callback in application: Start - * @param[out] get operational error after callback. - */ - virtual void HandleStartStateCallback(GenericOperationalError & err) = 0; +private: + ClusterId mClusterId; +}; - /** - * Handle Command Callback in application: Stop - * @param[out] get operational error after callback. - */ - virtual void HandleStopStateCallback(GenericOperationalError & err) = 0; +/** + * A class which represents the operational completion event of an Operational State cluster derivation instance. + */ +class GenericOperationCompletionEvent : private app::Clusters::OperationalState::Events::OperationCompletion::Type +{ + using super = app::Clusters::OperationalState::Events::OperationCompletion::Type; - Delegate() = default; +public: + GenericOperationCompletionEvent(ClusterId aClusterId, uint8_t aCompletionErrorCode, + const Optional> & aTotalOperationalTime = NullOptional, + const Optional> & aPausedTime = NullOptional) : + mClusterId(aClusterId) + { + completionErrorCode = aCompletionErrorCode; + totalOperationalTime = aTotalOperationalTime; + pausedTime = aPausedTime; + } + using super::GetEventId; + using super::GetPriorityLevel; + ClusterId GetClusterId() const { return mClusterId; } + using super::Encode; + using super::kIsFabricScoped; - virtual ~Delegate() = default; +private: + ClusterId mClusterId; }; -// @brief Instance getter for the delegate for the given operational state alias cluster on the given endpoint. -// The delegate API assumes there will be separate delegate objects for each cluster instance. -// (i.e. each separate operational state cluster derivation, on each separate endpoint) -// @note This API should always be called prior to using the delegate and the return pointer should never be cached. -// This should be implemented by the application. -// @return Default global delegate instance. -Delegate * GetOperationalStateDelegate(EndpointId endpointId, ClusterId clusterId); - } // namespace OperationalState } // namespace Clusters } // namespace app diff --git a/src/app/clusters/operational-state-server/operational-state-server.cpp b/src/app/clusters/operational-state-server/operational-state-server.cpp index 5fa7473f0e1641..f818c63c5cc14f 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.cpp +++ b/src/app/clusters/operational-state-server/operational-state-server.cpp @@ -20,7 +20,6 @@ * @brief Implementation for the Operational State Server Cluster ***************************************************************************/ #include "operational-state-server.h" -#include "operational-state-delegate.h" #include #include #include @@ -45,55 +44,6 @@ using namespace chip::app::Clusters::OperationalState::Attributes; using Status = Protocols::InteractionModel::Status; -/** - * A class which represents the operational error event of an Operational State cluster derivation instance. - */ -class GenericErrorEvent : private app::Clusters::OperationalState::Events::OperationalError::Type -{ - using super = app::Clusters::OperationalState::Events::OperationalError::Type; - -public: - GenericErrorEvent(ClusterId aClusterId, const Structs::ErrorStateStruct::Type & aError) : mClusterId(aClusterId) - { - errorState = aError; - } - using super::GetEventId; - using super::GetPriorityLevel; - ClusterId GetClusterId() const { return mClusterId; } - using super::Encode; - using super::kIsFabricScoped; - -private: - ClusterId mClusterId; -}; - -/** - * A class which represents the operational completion event of an Operational State cluster derivation instance. - */ -class GenericOperationCompletionEvent : private app::Clusters::OperationalState::Events::OperationCompletion::Type -{ - using super = app::Clusters::OperationalState::Events::OperationCompletion::Type; - -public: - GenericOperationCompletionEvent(ClusterId aClusterId, uint8_t aCompletionErrorCode, - const Optional> & aTotalOperationalTime = NullOptional, - const Optional> & aPausedTime = NullOptional) : - mClusterId(aClusterId) - { - completionErrorCode = aCompletionErrorCode; - totalOperationalTime = aTotalOperationalTime; - pausedTime = aPausedTime; - } - using super::GetEventId; - using super::GetPriorityLevel; - ClusterId GetClusterId() const { return mClusterId; } - using super::Encode; - using super::kIsFabricScoped; - -private: - ClusterId mClusterId; -}; - CHIP_ERROR OperationalStateServer::Init() { // Check if the cluster has been selected in zap diff --git a/src/app/clusters/operational-state-server/operational-state-server.h b/src/app/clusters/operational-state-server/operational-state-server.h index 5bb50d3b5df6ef..3e96fa6ca03405 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.h +++ b/src/app/clusters/operational-state-server/operational-state-server.h @@ -17,6 +17,8 @@ */ #pragma once + +#include "operational-state-cluster-objects.h" #include #include #include @@ -45,6 +47,23 @@ class Uncopyable class OperationalStateServer : public CommandHandlerInterface, public AttributeAccessInterface, public Uncopyable { public: + /** + * Creates an operational state cluster instance. The Init() function needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aClusterId The ID of the operational state aliased cluster to be instantiated. + */ + OperationalStateServer(EndpointId aEndpointId, ClusterId aClusterId) : + CommandHandlerInterface(MakeOptional(aEndpointId), aClusterId), + AttributeAccessInterface(MakeOptional(aEndpointId), aClusterId) + { + + mEndpointId = aEndpointId; + mClusterId = aClusterId; + } + + ~OperationalStateServer() override {} + /** * Init the operational state server. * This function must be called after defining a OperationalStateServer class object. @@ -76,23 +95,6 @@ class OperationalStateServer : public CommandHandlerInterface, public AttributeA const Optional> & aTotalOperationalTime = NullOptional, const Optional> & aPausedTime = NullOptional); - /** - * Creates an operational state cluster instance. The Init() function needs to be called for this instance to be registered and - * called by the interaction model at the appropriate times. - * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. - * @param aClusterId The ID of the operational state aliased cluster to be instantiated. - */ - OperationalStateServer(EndpointId aEndpointId, ClusterId aClusterId) : - CommandHandlerInterface(MakeOptional(aEndpointId), aClusterId), - AttributeAccessInterface(MakeOptional(aEndpointId), aClusterId) - { - - mEndpointId = aEndpointId; - mClusterId = aClusterId; - } - - ~OperationalStateServer() override {} - private: // Inherited from CommandHandlerInterface template @@ -129,6 +131,120 @@ class OperationalStateServer : public CommandHandlerInterface, public AttributeA EndpointId mEndpointId; ClusterId mClusterId; }; + +/** + * A delegate to handle application logic of the Operational State aliased Cluster. + * The delegate API assumes there will be separate delegate objects for each cluster instance. + * (i.e. each separate operational state cluster derivation, on each separate endpoint), + * since the delegate methods are not handed the cluster id or endpoint. + */ +class Delegate +{ +public: + /** + * Get the current operational state. + * @return The current operational state value + */ + virtual uint8_t GetCurrentOperationalState() = 0; + + /** + * Get the list of supported operational states. + * Fills in the provided GenericOperationalState with the state at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of states. + * @param index The index of the state, with 0 representing the first state. + * @param operationalState The GenericOperationalState is filled. + */ + virtual CHIP_ERROR GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) = 0; + + /** + * Get the list of supported operational phases. + * Fills in the provided GenericOperationalPhase with the phase at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of phases. + * @param index The index of the phase, with 0 representing the first phase. + * @param operationalPhase The GenericOperationalPhase is filled. + */ + virtual CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, GenericOperationalPhase & operationalPhase) = 0; + + /** + * Get current operational error. + * @param error The GenericOperationalError to fill with the current operational error value + */ + virtual void GetCurrentOperationalError(GenericOperationalError & error) = 0; + + /** + * Get current phase + * @param phase The app::DataModel::Nullable to fill with the current phase value + */ + virtual void GetCurrentPhase(app::DataModel::Nullable & phase) = 0; + + /** + * Get countdown time + * @param time The app::DataModel::Nullable to fill with the coutdown time value + */ + virtual void GetCountdownTime(app::DataModel::Nullable & time) = 0; + + /** + * Set current operational state. + * @param opState The operational state that should now be the current one. + */ + virtual CHIP_ERROR SetOperationalState(uint8_t opState) = 0; + + /** + * Set operational error. + * @param opErrState The new operational error. + */ + virtual CHIP_ERROR SetOperationalError(const GenericOperationalError & opErrState) = 0; + + /** + * Set operational phase. + * @param phase The operational phase that should now be the current one. + */ + virtual CHIP_ERROR SetPhase(const app::DataModel::Nullable & phase) = 0; + + /** + * Set coutdown time. + * @param time The coutdown time that should now be the current one. + */ + virtual CHIP_ERROR SetCountdownTime(const app::DataModel::Nullable & time) = 0; + + // command callback + /** + * Handle Command Callback in application: Pause + * @param[out] get operational error after callback. + */ + virtual void HandlePauseStateCallback(GenericOperationalError & err) = 0; + + /** + * Handle Command Callback in application: Resume + * @param[out] get operational error after callback. + */ + virtual void HandleResumeStateCallback(GenericOperationalError & err) = 0; + + /** + * Handle Command Callback in application: Start + * @param[out] get operational error after callback. + */ + virtual void HandleStartStateCallback(GenericOperationalError & err) = 0; + + /** + * Handle Command Callback in application: Stop + * @param[out] get operational error after callback. + */ + virtual void HandleStopStateCallback(GenericOperationalError & err) = 0; + + Delegate() = default; + + virtual ~Delegate() = default; +}; + +// @brief Instance getter for the delegate for the given operational state alias cluster on the given endpoint. +// The delegate API assumes there will be separate delegate objects for each cluster instance. +// (i.e. each separate operational state cluster derivation, on each separate endpoint) +// @note This API should always be called prior to using the delegate and the return pointer should never be cached. +// This should be implemented by the application. +// @return Default global delegate instance. +Delegate * GetOperationalStateDelegate(EndpointId endpointId, ClusterId clusterId); + } // namespace OperationalState } // namespace Clusters } // namespace app diff --git a/src/app/server/Dnssd.cpp b/src/app/server/Dnssd.cpp index 17c9b4a459af9e..86a70a0a8c69e2 100644 --- a/src/app/server/Dnssd.cpp +++ b/src/app/server/Dnssd.cpp @@ -152,6 +152,11 @@ CHIP_ERROR DnssdServer::AdvertiseOperational() for (const FabricInfo & fabricInfo : *mFabricTable) { + if (!fabricInfo.ShouldAdvertiseIdentity()) + { + continue; + } + uint8_t macBuffer[DeviceLayer::ConfigurationManager::kPrimaryMACAddressLength]; MutableByteSpan mac(macBuffer); if (chip::DeviceLayer::ConfigurationMgr().GetPrimaryMACAddress(mac) != CHIP_NO_ERROR) diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 9078702fb983e9..65ea68ff53eee4 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -109,7 +109,7 @@ source_set("scenes-table-test-srcs") { } source_set("operational-state-test-srcs") { - sources = [ "${chip_root}/src/app/clusters/operational-state-server/operational-state-delegate.h" ] + sources = [ "${chip_root}/src/app/clusters/operational-state-server/operational-state-cluster-objects.h" ] public_deps = [ "${chip_root}/src/app/common:cluster-objects", @@ -143,7 +143,7 @@ chip_test_suite("tests") { "TestInteractionModelEngine.cpp", "TestMessageDef.cpp", "TestNumericAttributeTraits.cpp", - "TestOperationalStateDelegate.cpp", + "TestOperationalStateClusterObjects.cpp", "TestPendingNotificationMap.cpp", "TestPowerSourceCluster.cpp", "TestReadInteraction.cpp", diff --git a/src/app/tests/TestOperationalStateDelegate.cpp b/src/app/tests/TestOperationalStateClusterObjects.cpp similarity index 99% rename from src/app/tests/TestOperationalStateDelegate.cpp rename to src/app/tests/TestOperationalStateClusterObjects.cpp index e82f80bbdaff84..493d02f8ae1935 100644 --- a/src/app/tests/TestOperationalStateDelegate.cpp +++ b/src/app/tests/TestOperationalStateClusterObjects.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include +#include #include #include @@ -579,13 +579,13 @@ int TestTearDown(void * inContext) } // namespace -int TestOperationalStateDelegate() +int TestOperationalStateClusterObjects() { - nlTestSuite theSuite = { "Test Operational State delegate tests", &sTests[0], TestSetup, TestTearDown }; + nlTestSuite theSuite = { "Test Operational State Cluster Objects tests", &sTests[0], TestSetup, TestTearDown }; // Run test suit againt one context. nlTestRunner(&theSuite, nullptr); return nlTestRunnerStats(&theSuite); } -CHIP_REGISTER_TEST_SUITE(TestOperationalStateDelegate) +CHIP_REGISTER_TEST_SUITE(TestOperationalStateClusterObjects) diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 0026b1567abb66..0f907567ee44f4 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -67,6 +67,9 @@ chip::EndpointId kInvalidTestEndpointId = 3; chip::DataVersion kTestDataVersion1 = 3; chip::DataVersion kTestDataVersion2 = 5; +// Number of items in the list for MockAttributeId(4). +constexpr int kMockAttribute4ListLength = 6; + static chip::System::Clock::Internal::MockClock gMockClock; static chip::System::Clock::ClockBase * gRealClock; @@ -1214,7 +1217,8 @@ void TestReadInteraction::TestReadChunking(nlTestSuite * apSuite, void * apConte NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); chip::app::AttributePathParams attributePathParams[1]; - // Mock Attribute 4 is a big attribute, with 6 large OCTET_STRING + // Mock Attribute 4 is a big attribute, with kMockAttribute4ListLength large + // OCTET_STRING elements. attributePathParams[0].mEndpointId = Test::kMockEndpoint3; attributePathParams[0].mClusterId = Test::MockClusterId(2); attributePathParams[0].mAttributeId = Test::MockAttributeId(4); @@ -1234,8 +1238,10 @@ void TestReadInteraction::TestReadChunking(nlTestSuite * apSuite, void * apConte ctx.DrainAndServiceIO(); - // We get one chunk with 3 array elements, and then one chunk per element. - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 4); + // We get one chunk with 4 array elements, and then one chunk per + // element, and the total size of the array is + // kMockAttribute4ListLength. + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1 + (kMockAttribute4ListLength - 4)); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 6); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, !delegate.mReadError); @@ -1380,13 +1386,16 @@ void TestReadInteraction::TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void ctx.DrainAndServiceIO(); - // We should receive another (3 + 1) = 4 attribute reports represeting 6 - // array items, since the underlying path iterator should be reset to - // the beginning of the cluster it is currently iterating. + // Our list has length kMockAttribute4ListLength. Since the underlying + // path iterator should be reset to the beginning of the cluster it is + // currently iterating, we expect to get another value for our + // attribute. The way the packet boundaries happen to fall, that value + // will encode 4 items in the first IB and then one IB per item. + const int expectedIBs = 1 + (kMockAttribute4ListLength - 4); ChipLogError(DataManagement, "OLD: %d\n", currentAttributeResponsesWhenSetDirty); ChipLogError(DataManagement, "NEW: %d\n", delegate.mNumAttributeResponse); - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == currentAttributeResponsesWhenSetDirty + 4); - NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == currentArrayItemsWhenSetDirty + 6); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == currentAttributeResponsesWhenSetDirty + expectedIBs); + NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == currentArrayItemsWhenSetDirty + kMockAttribute4ListLength); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, !delegate.mReadError); // By now we should have closed all exchanges and sent all pending acks, so @@ -2341,7 +2350,7 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // paths, for a total of 58 attributes. // // Attribute 0xFFFC::0xFFF1'FC02::0xFFF1'0004 (kMockEndpoint3::MockClusterId(2)::MockAttributeId(4)) - // is a list of 6 elements of size 256 bytes each, which cannot fit in a single + // is a list of kMockAttribute4ListLength elements of size 256 bytes each, which cannot fit in a single // packet, so gets list chunking applied to it. // // Because delegate.mNumAttributeResponse counts AttributeDataIB instances, not attributes, @@ -2350,21 +2359,16 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // in the response, there will be one AttributeDataIB for the start of the list (which will include // some number of 256-byte elements), then one AttributeDataIB for each of the remaining elements. // - // When EventList is enabled, for the first report for the list attribute we receive two - // of its items in the initial list, then 4 additional items. For the second report we - // receive 3 items in the initial list followed by 3 additional items. - // - // Thus we should receive 29*2 + 4 + 3 = 65 attribute data in total. - constexpr size_t kExpectedAttributeResponse = 65; + // When EventList is enabled, for the first report for the list attribute we receive three + // of its items in the initial list, then the remaining items. For the second report we + // receive 2 items in the initial list followed by the remaining items. + constexpr size_t kExpectedAttributeResponse = 29 * 2 + (kMockAttribute4ListLength - 3) + (kMockAttribute4ListLength - 2); #else // When EventList is not enabled, the packet boundaries shift and for the first - // report for the list attribute we receive two of its items in the initial list, - // then 4 additional items. For the second report we receive 3 items in - // the initial list followed by 3 additional items. - // - // Thus we should receive 29*2 + 4 + 3 = 65 attribute data when the eventlist - // attribute is not available. - constexpr size_t kExpectedAttributeResponse = 65; + // report for the list attribute we receive four of its items in the initial list, + // then additional items. For the second report we receive 4 items in + // the initial list followed by additional items. + constexpr size_t kExpectedAttributeResponse = 29 * 2 + (kMockAttribute4ListLength - 4) + (kMockAttribute4ListLength - 4); #endif NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == kExpectedAttributeResponse); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 12); @@ -3460,9 +3464,10 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(10)); } } - // Two chunked reports carry 4 attributeDataIB: 1 with a list of 3 items, - // and then one per remaining item. - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 4); + // We get one chunk with 4 array elements, and then one chunk per + // element, and the total size of the array is + // kMockAttribute4ListLength. + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1 + (kMockAttribute4ListLength - 4)); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 6); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadClients() == 0); diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index a8f5d27979c152..19d0d49c940ad9 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -579,8 +579,9 @@ void TestWriteInteraction::TestWriteHandlerReceiveInvalidMessage(nlTestSuite * a err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + // Reserve all except the last 128 bytes, so that we make sure to chunk. app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(900) /* reserved buffer size */); + static_cast(kMaxSecureSduLengthBytes - 128) /* reserved buffer size */); ByteSpan list[5]; @@ -647,8 +648,9 @@ void TestWriteInteraction::TestWriteHandlerInvalidateFabric(nlTestSuite * apSuit err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + // Reserve all except the last 128 bytes, so that we make sure to chunk. app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(900) /* reserved buffer size */); + static_cast(kMaxSecureSduLengthBytes - 128) /* reserved buffer size */); ByteSpan list[5]; diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index dce34aca81dbcd..6afdb3f929d185 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -336,6 +336,11 @@ PICS: "Does commissionee provide a Firmware Information field in the AttestationResponse?" id: MCORE.DA.ATTESTELEMENT_FW_INFO + # + #IDM + # + - label: "Does the device implement the ICD Management cluster as a server?" + id: ICDM.S - label: "Is the device a Server" id: MCORE.IDM.S @@ -1847,6 +1852,11 @@ PICS: - label: "Does the device implement the DISHM cluster as a server?" id: DISHM.S + - label: + "Id of mode the device will fail to transition to, given its current + state" + id: PIXIT.DISHM.CAN_TEST_MODE_FAILURE + # # server / features # @@ -1890,27 +1900,6 @@ PICS: - label: "Does the device implement the Descriptor cluster as a client?" id: DESC.C - #DESC -- Global Attributes - - label: "Does the device implement the ClusterRevision(DESC) attribute?" - id: DESC.S.Afffd - - - label: "Does the device implement the FeatureMap(DESC) attribute?" - id: DESC.S.Afffc - - - label: "Does the device implement the AttributeList(DESC) attribute?" - id: DESC.S.Afffb - - - label: "Does the device implement the EventList(DESC) attribute?" - id: DESC.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(DESC) attribute?" - id: DESC.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(DESC) attribute?" - id: DESC.S.Afff8 - # # server / attributes # @@ -1926,6 +1915,9 @@ PICS: - label: "Does the DUT(server) support the PARTSLIST attribute?" id: DESC.S.A0003 + - label: "Does the DUT(server) support the TAGLIST attribute?" + id: DESC.S.A0004 + # # client / attributes # @@ -5946,6 +5938,15 @@ PICS: - label: "Does the device implement the Scene Names feature?" id: S.S.F00 + - label: "Does the device implement the Scene Explicit feature?" + id: S.S.F01 + + - label: "Does the device implement the Scene TableSize feature?" + id: S.S.F02 + + - label: "Does the device implement the Scene FabricScenes feature?" + id: S.S.F03 + # # server / manually # @@ -5988,6 +5989,11 @@ PICS: - label: "Does the device implement sending the CopyScene command?" id: S.C.C42.Tx + - label: + "Does the device process the TransitionTime parameter of the + RecallScene command?" + id: PICS_SC_RECALL_SCENE_TRANSITION_TIME + # # client / manually # @@ -6563,6 +6569,9 @@ PICS: - label: "Supports a System Mode of Auto" id: TSTAT.S.F05 + - label: "Supports a local temperature not exposed" + id: TSTAT.S.F06 + # # server / manually # @@ -8243,28 +8252,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: CDOCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: CDOCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: CDOCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: CDOCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: CDOCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: CDOCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: CDOCONC.S.Afffd - # Carbon Monoxide Concentration Measurement Cluster Test Plan - label: "Does the device implement the Carbon Monoxide Concentration @@ -8339,28 +8326,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: CMOCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: CMOCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: CMOCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: CMOCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: CMOCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: CMOCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: CMOCONC.S.Afffd - # Nitrogen Dioxide Concentration Measurement Cluster Test Plan - label: "Does the device implement the Nitrogen Dioxide Concentration @@ -8435,28 +8400,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: NDOCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: NDOCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: NDOCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: NDOCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: NDOCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: NDOCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: NDOCONC.S.Afffd - # Ozone Concentration Measurement Cluster Test Plan - label: "Does the device implement the Ozone Concentration Measurement Cluster @@ -8531,28 +8474,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: OZCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: OZCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: OZCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: OZCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: OZCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: OZCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: OZCONC.S.Afffd - # PM2.5 Concentration Measurement Cluster Test Plan - label: "Does the device implement the PM2.5 Concentration Measurement Cluster @@ -8627,28 +8548,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: PMICONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: PMICONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: PMICONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: PMICONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: PMICONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: PMICONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: PMICONC.S.Afffd - # Formaldehyde Concentration Measurement Cluster Test Plan - label: "Does the device implement the Formaldehyde Concentration Measurement @@ -8723,28 +8622,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: FLDCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: FLDCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: FLDCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: FLDCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: FLDCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: FLDCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: FLDCONC.S.Afffd - # PM1 Concentration Measurement Cluster Test Plan - label: "Does the device implement the PM1 Concentration Measurement Cluster @@ -8819,28 +8696,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: PMHCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: PMHCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: PMHCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: PMHCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: PMHCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: PMHCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: PMHCONC.S.Afffd - # PM10 Concentration Measurement Cluster Test Plan - label: "Does the device implement the PM10 Concentration Measurement Cluster @@ -8915,28 +8770,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: PMKCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: PMKCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: PMKCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: PMKCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: PMKCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: PMKCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: PMKCONC.S.Afffd - # Total Volatile Organic Compounds Concentration Measurement Cluster Test Plan - label: "Does the device implement the Total Volatile Organic Compounds @@ -9011,28 +8844,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: TVOCCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: TVOCCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: TVOCCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: TVOCCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: TVOCCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: TVOCCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: TVOCCONC.S.Afffd - # Radon Concentration Measurement Cluster Test Plan - label: "Does the device implement the Radon Concentration Measurement Cluster @@ -9107,28 +8918,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: RNCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: RNCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: RNCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: RNCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: RNCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: RNCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: RNCONC.S.Afffd - ## Fan control # Features @@ -9273,43 +9062,6 @@ PICS: command?" id: ICDM.C.C00.Rsp - # - #RVC Clean Mode Select - # - #Feature - - label: - "Does the device support depending on an On/Off cluster implemented on - the same DUT?" - id: RVCCLEANMS.S.F00 - - - label: "Does the device support the extended status feature?" - id: RVCCLEANMS.S.F01 - - - label: - "Does the device implementation deprecate the ChangeToMode command?" - id: RVCCLEANMS.S.F02 - - #Server Attributes - - label: "Does the device implement the StartUpMode attribute?" - id: RVCCLEANMS.S.A0004 - - - label: "Does the device implement the OnMode attribute?" - id: RVCCLEANMS.S.A0005 - - #Server Commands recived - - label: "Does the device implement receiving the ChangeToMode command?" - id: RVCCLEANMS.S.C00.Rsp - - - label: - "Does the device implement receiving the ChangeToModeWithStatus - command?" - id: RVCCLEANMS.S.C01.Rsp - - #server commands generated - - label: - "Does the device implement sending the ChangeToModeResponse command?" - id: RVCCLEANMS.S.C03.Tx - # #Operational State # @@ -9506,6 +9258,11 @@ PICS: - label: "Does the device implement the LWM cluster as a server?" id: LWM.S + - label: + "Id of mode the device will fail to transition to, given its current + state" + id: PIXIT.LWM.CAN_TEST_MODE_FAILURE + # # server / features # @@ -9586,12 +9343,22 @@ PICS: "Does the device implement sending the ChangeToModeResponse command?" id: RVCCLEANM.S.C01.Tx + - label: + "Id of mode the device will fail to transition to, given its current + state" + id: PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE + # #Temperature Controlled Cabinet Mode Cluster # - label: "Does the device implement the TCCM cluster as a server?" id: TCCM.S + - label: + "Id of mode the device will fail to transition to, given its current + state" + id: PIXIT.TCCM.CAN_TEST_MODE_FAILURE + #Features - label: "Does the device support depending on an On/Off cluster implemented on @@ -9725,6 +9492,11 @@ PICS: - label: "Does the device implement the RVCRUNM cluster as a server?" id: RVCRUNM.S + - label: + "Id of mode the device will fail to transition to, given its current + state" + id: PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE + #Features - label: "Does the device support depending on an On/Off cluster implemented on diff --git a/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml b/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml index e4038e0a627e28..877d116305da25 100644 --- a/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml @@ -188,7 +188,7 @@ tests: - name: "ms" value: 1000 - #Issue : https://github.com/project-chip/connectedhomeip/issues/27967 + #Issue : https://github.com/project-chip/connectedhomeip/issues/27982 - label: "Step 7: TH sends a AddGroup Command to the Groups cluster with the GroupID field set to 0x0105 and the GroupName set to an empty string. diff --git a/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml index 6fc09312d09a22..59284c86d30d55 100644 --- a/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml @@ -112,8 +112,8 @@ tests: - label: "Step 4c: Read the optional attribute InPlaceIndicator - (ACFREMON.S.A0002) in AttributeList" - PICS: ACFREMON.S.A0002 + (ACFREMON.S.A0003) in AttributeList" + PICS: ACFREMON.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -121,6 +121,28 @@ tests: type: list contains: [3] + - label: + "Step 4d: Read the optional attribute LastChangedTime + (ACFREMON.S.A0004) in AttributeList" + PICS: ACFREMON.S.A0004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: + "Step 4e: Read the optional attribute ReplacementProductList + (ACFREMON.S.F02) in AttributeList" + PICS: ACFREMON.S.F02 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + - label: "Step 5: TH reads EventList attribute from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml index 24e18d9207082c..a5aa622fe7aa3b 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml @@ -35,7 +35,7 @@ tests: value: nodeId - label: - "Step 2: TH reads DUT Descriptor cluster ServerList attribute from + "Step 2: TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0" cluster: "Descriptor" command: "readAttribute" @@ -46,7 +46,7 @@ tests: contains: [31] - label: - "Step 3: TH reads DUT Descriptor cluster ServerList attribute from + "Step 3: TH1 reads DUT Descriptor cluster ServerList attribute from every Endpoint except 0" endpoint: Endpoint_Except_Zero cluster: "Descriptor" diff --git a/src/app/tests/suites/certification/Test_TC_ACT_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_ACT_3_1_Simulated.yaml deleted file mode 100644 index ba30cad1ed39ac..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_ACT_3_1_Simulated.yaml +++ /dev/null @@ -1,562 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 77.2.3. [TC-ACT-3.1] GLobal attributes with client as DUT - -PICS: - - ACT.C - - ACT.C.AM-READ - - ACT.C.AO-READ - - ACT.C.AM-WRITE - - ACT.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Actions" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: ActionList" - PICS: ACT.C.AM-READ - wait: "readAttribute" - attribute: "ActionList" - - - label: "Read attribute: EndpointLists" - PICS: ACT.C.AM-READ - wait: "readAttribute" - attribute: "EndpointLists" - - - label: "Read attribute: SetupURL" - PICS: ACT.C.AO-READ - wait: "readAttribute" - attribute: "SetupURL" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - ./chip-tool actions read feature-map 1 1 - - Verify none of the optional feature of the server-side of the cluster is listed on TH(all-clusters-minnimal-app) Log - - [1666952667.233980][217377:217377] CHIP:IM: Received Read request - [1666952667.234042][217377:217377] CHIP:DMG: ReadRequestMessage = - [1666952667.234055][217377:217377] CHIP:DMG: { - [1666952667.234066][217377:217377] CHIP:DMG: AttributePathIBs = - [1666952667.234080][217377:217377] CHIP:DMG: [ - [1666952667.234092][217377:217377] CHIP:DMG: AttributePathIB = - [1666952667.234106][217377:217377] CHIP:DMG: { - [1666952667.234121][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952667.234135][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952667.234150][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666952667.234162][217377:217377] CHIP:DMG: } - [1666952667.234177][217377:217377] CHIP:DMG: - [1666952667.234189][217377:217377] CHIP:DMG: ], - [1666952667.234205][217377:217377] CHIP:DMG: - [1666952667.234218][217377:217377] CHIP:DMG: isFabricFiltered = true, - [1666952667.234230][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952667.234242][217377:217377] CHIP:DMG: }, - [1666952667.234299][217377:217377] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952667.234351][217377:217377] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952667.234366][217377:217377] CHIP:DMG: Cluster 25, Attribute fffc is dirty - [1666952667.234378][217377:217377] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1666952667.234396][217377:217377] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0025 e=1 p=v - [1666952667.234416][217377:217377] CHIP:DMG: AccessControl: allowed - [1666952667.234450][217377:217377] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952667.234672][217377:217377] CHIP:EM: <<< [E:30993r M:147872011 (Ack:47982410)] (S) Msg TX to 1:000000000001B669 [AE59] --- Type 0001:05 (IM:ReportData) - [1666952667.234702][217377:217377] CHIP:IN: (S) Sending msg 147872011 on secure session with LSID: 63117 - [1666952667.234980][217377:217377] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:60986 | 147872011 | [Interaction Model (1) / Report Data (0x05) / Session = 46893 / Exchange = 30993] - [1666952667.235009][217377:217377] CHIP:DMG: Header Flags = - [1666952667.235021][217377:217377] CHIP:DMG: { - [1666952667.235046][217377:217377] CHIP:DMG: Exchange (0x06) = - [1666952667.235058][217377:217377] CHIP:DMG: { - [1666952667.235072][217377:217377] CHIP:DMG: AckMsg = 47982410 - [1666952667.235084][217377:217377] CHIP:DMG: NeedsAck = true - [1666952667.235127][217377:217377] CHIP:DMG: } - [1666952667.235147][217377:217377] CHIP:DMG: } - [1666952667.235158][217377:217377] CHIP:DMG: - [1666952667.235175][217377:217377] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952667.235186][217377:217377] CHIP:DMG: { - [1666952667.235197][217377:217377] CHIP:DMG: data = 002db7000b59d0088ab820a8595145a1757b47b8f77026a7a93316c7d5ad7381b9aa5cc8f40b5855924b4832512700a6d52a6435b0ba5340e5cb92b95b512bfae5b4d6393b0a9f - [1666952667.235211][217377:217377] CHIP:DMG: buffer_ptr = 94384713812592 - [1666952667.235222][217377:217377] CHIP:DMG: } - [1666952667.235233][217377:217377] CHIP:DMG: - [1666952667.235262][217377:217377] CHIP:DMG: Decrypted Payload (37 bytes) = - [1666952667.235274][217377:217377] CHIP:DMG: { - [1666952667.235285][217377:217377] CHIP:DMG: data = 1536011535012600e0b2edc537012402012403252504fcff18240200181818290424ff0118 - [1666952667.235297][217377:217377] CHIP:DMG: } - [1666952667.235308][217377:217377] CHIP:DMG: - [1666952667.235365][217377:217377] CHIP:DMG: ReportDataMessage = - [1666952667.235379][217377:217377] CHIP:DMG: { - [1666952667.235391][217377:217377] CHIP:DMG: AttributeReportIBs = - [1666952667.235411][217377:217377] CHIP:DMG: [ - [1666952667.235423][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952667.235442][217377:217377] CHIP:DMG: { - [1666952667.235455][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952667.235471][217377:217377] CHIP:DMG: { - [1666952667.235486][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952667.235499][217377:217377] CHIP:DMG: AttributePathIB = - [1666952667.235514][217377:217377] CHIP:DMG: { - [1666952667.235529][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952667.235545][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952667.235564][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666952667.235580][217377:217377] CHIP:DMG: } - [1666952667.235598][217377:217377] CHIP:DMG: - [1666952667.235614][217377:217377] CHIP:DMG: Data = 0, - [1666952667.235630][217377:217377] CHIP:DMG: }, - [1666952667.235647][217377:217377] CHIP:DMG: - [1666952667.235659][217377:217377] CHIP:DMG: }, - [1666952667.235675][217377:217377] CHIP:DMG: - [1666952667.235687][217377:217377] CHIP:DMG: ], - [1666952667.235706][217377:217377] CHIP:DMG: - [1666952667.235719][217377:217377] CHIP:DMG: SuppressResponse = true, - [1666952667.235732][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952667.235744][217377:217377] CHIP:DMG: } - - - - ./chip-tool actions read attribute-list 1 1 - - Verify attribute-list attribute contains 7 entries on TH(all-clusters-minimal-app) - - [1666952338.541227][217377:217377] CHIP:DMG: ReportDataMessage = - [1666952338.541262][217377:217377] CHIP:DMG: { - [1666952338.541289][217377:217377] CHIP:DMG: AttributeReportIBs = - [1666952338.541330][217377:217377] CHIP:DMG: [ - [1666952338.541352][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.541390][217377:217377] CHIP:DMG: { - [1666952338.541412][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.541442][217377:217377] CHIP:DMG: { - [1666952338.541470][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.541502][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.541532][217377:217377] CHIP:DMG: { - [1666952338.541563][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.541595][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.541629][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.541659][217377:217377] CHIP:DMG: } - [1666952338.541693][217377:217377] CHIP:DMG: - [1666952338.541720][217377:217377] CHIP:DMG: Data = [ - [1666952338.541748][217377:217377] CHIP:DMG: - [1666952338.541784][217377:217377] CHIP:DMG: ], - [1666952338.541812][217377:217377] CHIP:DMG: }, - [1666952338.541847][217377:217377] CHIP:DMG: - [1666952338.541871][217377:217377] CHIP:DMG: }, - [1666952338.541916][217377:217377] CHIP:DMG: - [1666952338.541948][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.541990][217377:217377] CHIP:DMG: { - [1666952338.542013][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.542043][217377:217377] CHIP:DMG: { - [1666952338.542068][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.542096][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.542125][217377:217377] CHIP:DMG: { - [1666952338.542153][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.542186][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.542225][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.542256][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.542286][217377:217377] CHIP:DMG: } - [1666952338.542321][217377:217377] CHIP:DMG: - [1666952338.542353][217377:217377] CHIP:DMG: Data = 0, - [1666952338.542376][217377:217377] CHIP:DMG: }, - [1666952338.542413][217377:217377] CHIP:DMG: - [1666952338.542435][217377:217377] CHIP:DMG: }, - [1666952338.542482][217377:217377] CHIP:DMG: - [1666952338.542503][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.542540][217377:217377] CHIP:DMG: { - [1666952338.542562][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.542590][217377:217377] CHIP:DMG: { - [1666952338.542617][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.542641][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.542673][217377:217377] CHIP:DMG: { - [1666952338.542700][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.542733][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.542763][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.542793][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.542826][217377:217377] CHIP:DMG: } - [1666952338.542862][217377:217377] CHIP:DMG: - [1666952338.542890][217377:217377] CHIP:DMG: Data = 1, - [1666952338.542912][217377:217377] CHIP:DMG: }, - [1666952338.542950][217377:217377] CHIP:DMG: - [1666952338.542971][217377:217377] CHIP:DMG: }, - [1666952338.543018][217377:217377] CHIP:DMG: - [1666952338.543039][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.543076][217377:217377] CHIP:DMG: { - [1666952338.543128][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.543161][217377:217377] CHIP:DMG: { - [1666952338.543187][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.543218][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.543250][217377:217377] CHIP:DMG: { - [1666952338.543277][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.543311][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.543346][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.543381][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.543410][217377:217377] CHIP:DMG: } - [1666952338.543444][217377:217377] CHIP:DMG: - [1666952338.543473][217377:217377] CHIP:DMG: Data = 65528, - [1666952338.543499][217377:217377] CHIP:DMG: }, - [1666952338.543534][217377:217377] CHIP:DMG: - [1666952338.543556][217377:217377] CHIP:DMG: }, - [1666952338.543603][217377:217377] CHIP:DMG: - [1666952338.543624][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.543666][217377:217377] CHIP:DMG: { - [1666952338.543688][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.543716][217377:217377] CHIP:DMG: { - [1666952338.543743][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.543767][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.543797][217377:217377] CHIP:DMG: { - [1666952338.543826][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.543859][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.543893][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.543929][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.543955][217377:217377] CHIP:DMG: } - [1666952338.543990][217377:217377] CHIP:DMG: - [1666952338.544019][217377:217377] CHIP:DMG: Data = 65529, - [1666952338.544042][217377:217377] CHIP:DMG: }, - [1666952338.544077][217377:217377] CHIP:DMG: - [1666952338.544098][217377:217377] CHIP:DMG: }, - [1666952338.544145][217377:217377] CHIP:DMG: - [1666952338.544166][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.544204][217377:217377] CHIP:DMG: { - [1666952338.544225][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.544255][217377:217377] CHIP:DMG: { - [1666952338.544283][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.544311][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.544339][217377:217377] CHIP:DMG: { - [1666952338.544376][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.544405][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.544439][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.544474][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.544498][217377:217377] CHIP:DMG: } - [1666952338.544532][217377:217377] CHIP:DMG: - [1666952338.544566][217377:217377] CHIP:DMG: Data = 65531, - [1666952338.544592][217377:217377] CHIP:DMG: }, - [1666952338.544629][217377:217377] CHIP:DMG: - [1666952338.544651][217377:217377] CHIP:DMG: }, - [1666952338.544702][217377:217377] CHIP:DMG: - [1666952338.544717][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.544743][217377:217377] CHIP:DMG: { - [1666952338.544758][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.544777][217377:217377] CHIP:DMG: { - [1666952338.544796][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.544814][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.544834][217377:217377] CHIP:DMG: { - [1666952338.544856][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.544878][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.544901][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.544922][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.544945][217377:217377] CHIP:DMG: } - [1666952338.544971][217377:217377] CHIP:DMG: - [1666952338.544991][217377:217377] CHIP:DMG: Data = 65532, - [1666952338.545007][217377:217377] CHIP:DMG: }, - [1666952338.545032][217377:217377] CHIP:DMG: - [1666952338.545047][217377:217377] CHIP:DMG: }, - [1666952338.545081][217377:217377] CHIP:DMG: - [1666952338.545095][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.545122][217377:217377] CHIP:DMG: { - [1666952338.545136][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.545158][217377:217377] CHIP:DMG: { - [1666952338.545176][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.545193][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.545212][217377:217377] CHIP:DMG: { - [1666952338.545233][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.545254][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.545278][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.545306][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.545328][217377:217377] CHIP:DMG: } - [1666952338.545351][217377:217377] CHIP:DMG: - [1666952338.545374][217377:217377] CHIP:DMG: Data = 65533, - [1666952338.545391][217377:217377] CHIP:DMG: }, - [1666952338.545415][217377:217377] CHIP:DMG: - [1666952338.545429][217377:217377] CHIP:DMG: }, - [1666952338.545454][217377:217377] CHIP:DMG: - [1666952338.545468][217377:217377] CHIP:DMG: ], - [1666952338.545537][217377:217377] CHIP:DMG: - [1666952338.545557][217377:217377] CHIP:DMG: SuppressResponse = true, - [1666952338.545576][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952338.545592][217377:217377] CHIP:DMG: } - - - ./chip-tool actions read action-list 1 1 - - Verify read command is received on TH(all-clusters-minimal-app) Log - - [1666937311.802976][2651:2651] CHIP:EM: Handling via exchange: 38920r, Delegate: 0xaaaacd7f80e0 - [1666937311.803077][2651:2651] CHIP:IM: Received Read request - [1666937311.803295][2651:2651] CHIP:DMG: ReadRequestMessage = - [1666937311.803549][2651:2651] CHIP:DMG: { - [1666937311.803611][2651:2651] CHIP:DMG: AttributePathIBs = - [1666937311.803678][2651:2651] CHIP:DMG: [ - [1666937311.803739][2651:2651] CHIP:DMG: AttributePathIB = - [1666937311.803841][2651:2651] CHIP:DMG: { - [1666937311.803920][2651:2651] CHIP:DMG: Endpoint = 0x1, - [1666937311.804008][2651:2651] CHIP:DMG: Cluster = 0x25, - [1666937311.804120][2651:2651] CHIP:DMG: Attribute = 0x0000_0000, - [1666937311.804204][2651:2651] CHIP:DMG: } - [1666937311.804282][2651:2651] CHIP:DMG: - [1666937311.804374][2651:2651] CHIP:DMG: ], - [1666937311.804446][2651:2651] CHIP:DMG: - [1666937311.804539][2651:2651] CHIP:DMG: isFabricFiltered = true, - [1666937311.804603][2651:2651] CHIP:DMG: InteractionModelRevision = 1 - [1666937311.804663][2651:2651] CHIP:DMG: }, - [1666937311.804852][2651:2651] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666937311.805117][2651:2651] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666937311.805190][2651:2651] CHIP:DMG: Cluster 25, Attribute 0 is dirty - [1666937311.805274][2651:2651] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666937311.805343][2651:2651] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0025 e=1 p=v - [1666937311.805419][2651:2651] CHIP:DMG: AccessControl: allowed - [1666937311.805533][2651:2651] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666937311.806139][2651:2651] CHIP:EM: <<< [E:38920r M:78085855 (Ack:55508733)] (S) Msg TX to 1:000000000001B669 [A6ED] --- Type 0001:05 (IM:ReportData) - [1666937311.806241][2651:2651] CHIP:IN: (S) Sending msg 78085855 on secure session with LSID: 49558 - [1666937311.806996][2651:2651] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:38538 | 78085855 | [Interaction Model (1) / Report Data (0x05) / Session = 20559 / Exchange = 38920] - [1666937311.807095][2651:2651] CHIP:DMG: Header Flags = - [1666937311.807154][2651:2651] CHIP:DMG: { - [1666937311.807242][2651:2651] CHIP:DMG: Exchange (0x06) = - [1666937311.807300][2651:2651] CHIP:DMG: { - [1666937311.807359][2651:2651] CHIP:DMG: AckMsg = 55508733 - [1666937311.807439][2651:2651] CHIP:DMG: NeedsAck = true - [1666937311.807493][2651:2651] CHIP:DMG: } - [1666937311.807566][2651:2651] CHIP:DMG: } - [1666937311.807645][2651:2651] CHIP:DMG: - [1666937311.807713][2651:2651] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666937311.807768][2651:2651] CHIP:DMG: { - [1666937311.807847][2651:2651] CHIP:DMG: data = 004f5000df7ea7040f921e0e13849a6fa0d777922f58d03152781bd36b6cbf9f22d882cc1c7c6d8afbd1b63303ffb3fb09c08e7160a33fb680d7f74a7696a47c4fe7b213b3cc - [1666937311.807904][2651:2651] CHIP:DMG: buffer_ptr = 187651028908208 - [1666937311.807958][2651:2651] CHIP:DMG: } - [1666937311.808031][2651:2651] CHIP:DMG: - [1666937311.808216][2651:2651] CHIP:DMG: ReportDataMessage = - [1666937311.808282][2651:2651] CHIP:DMG: { - [1666937311.808337][2651:2651] CHIP:DMG: AttributeReportIBs = - [1666937311.808413][2651:2651] CHIP:DMG: [ - [1666937311.808503][2651:2651] CHIP:DMG: AttributeReportIB = - [1666937311.808593][2651:2651] CHIP:DMG: { - [1666937311.808664][2651:2651] CHIP:DMG: AttributeDataIB = - [1666937311.808752][2651:2651] CHIP:DMG: { - [1666937311.808842][2651:2651] CHIP:DMG: DataVersion = 0x8d1127c2, - [1666937311.808924][2651:2651] CHIP:DMG: AttributePathIB = - [1666937311.809007][2651:2651] CHIP:DMG: { - [1666937311.809101][2651:2651] CHIP:DMG: Endpoint = 0x1, - [1666937311.809201][2651:2651] CHIP:DMG: Cluster = 0x25, - [1666937311.809300][2651:2651] CHIP:DMG: Attribute = 0x0000_0000, - [1666937311.809384][2651:2651] CHIP:DMG: } - [1666937311.809481][2651:2651] CHIP:DMG: - [1666937311.809573][2651:2651] CHIP:DMG: Data = [ - [1666937311.809662][2651:2651] CHIP:DMG: - [1666937311.809759][2651:2651] CHIP:DMG: ], - [1666937311.809840][2651:2651] CHIP:DMG: }, - [1666937311.809927][2651:2651] CHIP:DMG: - [1666937311.809998][2651:2651] CHIP:DMG: }, - [1666937311.810080][2651:2651] CHIP:DMG: - [1666937311.810140][2651:2651] CHIP:DMG: ], - - ./chip-tool actions read endpoint-lists 1 1 - - Verify read command is received on TH(all-clusters-minimal-app) - - [1666952448.529080][217377:217377] CHIP:DMG: ReadRequestMessage = - [1666952448.529101][217377:217377] CHIP:DMG: { - [1666952448.529119][217377:217377] CHIP:DMG: AttributePathIBs = - [1666952448.529140][217377:217377] CHIP:DMG: [ - [1666952448.529159][217377:217377] CHIP:DMG: AttributePathIB = - [1666952448.529181][217377:217377] CHIP:DMG: { - [1666952448.529204][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952448.529226][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952448.529249][217377:217377] CHIP:DMG: Attribute = 0x0000_0001, - [1666952448.529269][217377:217377] CHIP:DMG: } - [1666952448.529293][217377:217377] CHIP:DMG: - [1666952448.529312][217377:217377] CHIP:DMG: ], - [1666952448.529337][217377:217377] CHIP:DMG: - [1666952448.529358][217377:217377] CHIP:DMG: isFabricFiltered = true, - [1666952448.529378][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952448.529396][217377:217377] CHIP:DMG: }, - [1666952448.529481][217377:217377] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952448.529543][217377:217377] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952448.529567][217377:217377] CHIP:DMG: Cluster 25, Attribute 1 is dirty - [1666952448.529586][217377:217377] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) - [1666952448.529611][217377:217377] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0025 e=1 p=v - [1666952448.529639][217377:217377] CHIP:DMG: AccessControl: allowed - [1666952448.529683][217377:217377] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666952448.530029][217377:217377] CHIP:EM: <<< [E:12078r M:26716965 (Ack:2683412)] (S) Msg TX to 1:000000000001B669 [AE59] --- Type 0001:05 (IM:ReportData) - [1666952448.530072][217377:217377] CHIP:IN: (S) Sending msg 26716965 on secure session with LSID: 63115 - [1666952448.530509][217377:217377] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:42342 | 26716965 | [Interaction Model (1) / Report Data (0x05) / Session = 61304 / Exchange = 12078] - [1666952448.530552][217377:217377] CHIP:DMG: Header Flags = - [1666952448.530570][217377:217377] CHIP:DMG: { - [1666952448.530612][217377:217377] CHIP:DMG: Exchange (0x06) = - [1666952448.530629][217377:217377] CHIP:DMG: { - [1666952448.530650][217377:217377] CHIP:DMG: AckMsg = 2683412 - [1666952448.530668][217377:217377] CHIP:DMG: NeedsAck = true - [1666952448.530686][217377:217377] CHIP:DMG: } - [1666952448.530716][217377:217377] CHIP:DMG: } - [1666952448.530733][217377:217377] CHIP:DMG: - [1666952448.530759][217377:217377] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666952448.530776][217377:217377] CHIP:DMG: { - [1666952448.530794][217377:217377] CHIP:DMG: data = 0078ef0025ab9701cea6e79a67f3a56ad0dea23004bc0e516962a4b2eb578d9045f381e0f31b8f574047477e5e60aa969bed78d1b51470f9bb8760c4ad7c937f6a9746493426 - [1666952448.530814][217377:217377] CHIP:DMG: buffer_ptr = 94384713812256 - [1666952448.530831][217377:217377] CHIP:DMG: } - [1666952448.530848][217377:217377] CHIP:DMG: - [1666952448.530880][217377:217377] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666952448.530897][217377:217377] CHIP:DMG: { - [1666952448.530915][217377:217377] CHIP:DMG: data = 1536011535012600e0b2edc5370124020124032524040118360218181818290424ff0118 - [1666952448.530934][217377:217377] CHIP:DMG: } - [1666952448.530950][217377:217377] CHIP:DMG: - [1666952448.531025][217377:217377] CHIP:DMG: ReportDataMessage = - [1666952448.531046][217377:217377] CHIP:DMG: { - [1666952448.531064][217377:217377] CHIP:DMG: AttributeReportIBs = - [1666952448.531445][217377:217377] CHIP:DMG: [ - [1666952448.531532][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952448.531565][217377:217377] CHIP:DMG: { - [1666952448.531585][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952448.531607][217377:217377] CHIP:DMG: { - [1666952448.531630][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952448.531652][217377:217377] CHIP:DMG: AttributePathIB = - [1666952448.531675][217377:217377] CHIP:DMG: { - [1666952448.531698][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952448.531722][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952448.531746][217377:217377] CHIP:DMG: Attribute = 0x0000_0001, - [1666952448.531768][217377:217377] CHIP:DMG: } - [1666952448.531794][217377:217377] CHIP:DMG: - [1666952448.531816][217377:217377] CHIP:DMG: Data = [ - [1666952448.531839][217377:217377] CHIP:DMG: - [1666952448.531868][217377:217377] CHIP:DMG: ], - [1666952448.531895][217377:217377] CHIP:DMG: }, - [1666952448.531925][217377:217377] CHIP:DMG: - [1666952448.531951][217377:217377] CHIP:DMG: }, - [1666952448.531990][217377:217377] CHIP:DMG: - [1666952448.532014][217377:217377] CHIP:DMG: ], - [1666952448.532047][217377:217377] CHIP:DMG: - [1666952448.532069][217377:217377] CHIP:DMG: SuppressResponse = true, - [1666952448.532092][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952448.532111][217377:217377] CHIP:DMG: } - [1666952448.532131][217377:217377] CHIP:DMG: - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - Optional attibute - - ./chip-tool actions read setup-url 1 1 - - Verify the Unsupported attribute on the TH(all-clusters-minnimal-app) Log - - [1666952609.343159][217377:217377] CHIP:DMG: ReadRequestMessage = - [1666952609.343185][217377:217377] CHIP:DMG: { - [1666952609.343205][217377:217377] CHIP:DMG: AttributePathIBs = - [1666952609.343228][217377:217377] CHIP:DMG: [ - [1666952609.343248][217377:217377] CHIP:DMG: AttributePathIB = - [1666952609.343272][217377:217377] CHIP:DMG: { - [1666952609.343296][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952609.343319][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952609.343344][217377:217377] CHIP:DMG: Attribute = 0x0000_0002, - [1666952609.343366][217377:217377] CHIP:DMG: } - [1666952609.343396][217377:217377] CHIP:DMG: - [1666952609.343414][217377:217377] CHIP:DMG: ], - [1666952609.343437][217377:217377] CHIP:DMG: - [1666952609.343456][217377:217377] CHIP:DMG: isFabricFiltered = true, - [1666952609.343474][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952609.343491][217377:217377] CHIP:DMG: }, - [1666952609.343573][217377:217377] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952609.343647][217377:217377] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952609.343671][217377:217377] CHIP:DMG: Cluster 25, Attribute 2 is dirty - [1666952609.343688][217377:217377] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_0002 (expanded=0) - [1666952609.343733][217377:217377] CHIP:DMG: Sending report (payload has 33 bytes)... - [1666952609.344066][217377:217377] CHIP:EM: <<< [E:37827r M:202875336 (Ack:199155625)] (S) Msg TX to 1:000000000001B669 [AE59] --- Type 0001:05 (IM:ReportData) - [1666952609.344128][217377:217377] CHIP:IN: (S) Sending msg 202875336 on secure session with LSID: 63116 - [1666952609.344547][217377:217377] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:46813 | 202875336 | [Interaction Model (1) / Report Data (0x05) / Session = 20214 / Exchange = 37827] - [1666952609.344601][217377:217377] CHIP:DMG: Header Flags = - [1666952609.344623][217377:217377] CHIP:DMG: { - [1666952609.344664][217377:217377] CHIP:DMG: Exchange (0x06) = - [1666952609.344681][217377:217377] CHIP:DMG: { - [1666952609.344703][217377:217377] CHIP:DMG: AckMsg = 199155625 - [1666952609.344723][217377:217377] CHIP:DMG: NeedsAck = true - [1666952609.344741][217377:217377] CHIP:DMG: } - [1666952609.344770][217377:217377] CHIP:DMG: } - [1666952609.344788][217377:217377] CHIP:DMG: - [1666952609.344816][217377:217377] CHIP:DMG: Encrypted Payload (67 bytes) = - [1666952609.344836][217377:217377] CHIP:DMG: { - [1666952609.344856][217377:217377] CHIP:DMG: data = 00f64e00c8a1170c0f5d4a4d9195a985ad54b3de870e336b0ecfaa7373615ca174138e2959606cb26476c70d8149a1435824f8e4446d9cc896de6c6d7b7275ea265d7c - [1666952609.344878][217377:217377] CHIP:DMG: buffer_ptr = 94384713812256 - [1666952609.344897][217377:217377] CHIP:DMG: } - [1666952609.344915][217377:217377] CHIP:DMG: - [1666952609.344947][217377:217377] CHIP:DMG: Decrypted Payload (33 bytes) = - [1666952609.344967][217377:217377] CHIP:DMG: { - [1666952609.344986][217377:217377] CHIP:DMG: data = 153601153500370024020124032524040218350124008618181818290424ff0118 - [1666952609.345007][217377:217377] CHIP:DMG: } - [1666952609.345024][217377:217377] CHIP:DMG: - [1666952609.345097][217377:217377] CHIP:DMG: ReportDataMessage = - [1666952609.345124][217377:217377] CHIP:DMG: { - [1666952609.345144][217377:217377] CHIP:DMG: AttributeReportIBs = - [1666952609.345174][217377:217377] CHIP:DMG: [ - [1666952609.345193][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952609.345224][217377:217377] CHIP:DMG: { - [1666952609.345244][217377:217377] CHIP:DMG: AttributeStatusIB = - [1666952609.345269][217377:217377] CHIP:DMG: { - [1666952609.345290][217377:217377] CHIP:DMG: AttributePathIB = - [1666952609.345320][217377:217377] CHIP:DMG: { - [1666952609.345346][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952609.345373][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952609.345403][217377:217377] CHIP:DMG: Attribute = 0x0000_0002, - [1666952609.345431][217377:217377] CHIP:DMG: } - [1666952609.345462][217377:217377] CHIP:DMG: - [1666952609.345489][217377:217377] CHIP:DMG: StatusIB = - [1666952609.345519][217377:217377] CHIP:DMG: { - [1666952609.345543][217377:217377] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1666952609.345570][217377:217377] CHIP:DMG: }, - [1666952609.345595][217377:217377] CHIP:DMG: - [1666952609.345617][217377:217377] CHIP:DMG: }, - [1666952609.345647][217377:217377] CHIP:DMG: - [1666952609.345668][217377:217377] CHIP:DMG: }, - [1666952609.345698][217377:217377] CHIP:DMG: - [1666952609.345718][217377:217377] CHIP:DMG: ], - [1666952609.345750][217377:217377] CHIP:DMG: - [1666952609.345771][217377:217377] CHIP:DMG: SuppressResponse = true, - [1666952609.345792][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952609.345811][217377:217377] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && ACT.C.AO-READ - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && ACT.C.AO-WRITE - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml index 4a916e5aecbb30..2ffa03aca52f0b 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml @@ -13,7 +13,7 @@ # 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: 68.2.2. [TC-BOOL-2.2] Primary functionality with server as DUT +name: 69.2.2. [TC-BOOL-2.2] Primary Functionality with Server as DUT PICS: - BOOL.S @@ -73,7 +73,7 @@ tests: - label: "Step 4a: Set up subscription to StateChange event." PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | - Need an SDK implementation required + This event is not supported in all clusters app, so there are no reference logs. Run the below command to start interactive mode ./chip-tool interactive start @@ -86,21 +86,23 @@ tests: - label: "Step 4b: Bring the DUT into a state so StateValue is FALSE." PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | - Verify the StateValue value is FALSE On TH(chip-tool), below is the sample log provided for the raspi platform + Verify the StateValue value is FALSE On TH(chip-tool), if the state-change event is generated disabled: true - label: "Step 4c: TH reads the StateValue attribute from the DUT." PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | + This event is not supported in all clusters app, so there are no reference logs. + booleanstate read state-value 1 1 - Verify the StateValue value is FALSE On TH(chip-tool), below is the sample log provided for the raspi platform + Verify the StateValue value is FALSE On TH(chip-tool) disabled: true - label: "Step 4d: Bring the DUT into a state so StateValue is TRUE." PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | - Verify the StateValue value is TRUE On TH(chip-tool), below is the sample log provided for the raspi platform + Verify the StateValue value is TRUE On TH(chip-tool), if the state-change event is generated disabled: true - label: "Step 4e: TH reads the StateValue attribute from the DUT." @@ -108,5 +110,5 @@ tests: verification: | booleanstate read state-value 1 1 - Verify the StateValue value is TRUE On TH(chip-tool), below is the sample log provided for the raspi platform + Verify the StateValue value is TRUE On TH(chip-tool) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_3_1_Simulated.yaml deleted file mode 100644 index dd6ad529382fc8..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_BOOL_3_1_Simulated.yaml +++ /dev/null @@ -1,356 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 68.3.1. [TC-BOOL-3.1] Attributes with Client as DUT - -PICS: - - BOOL.C - - BOOL.C.AM-READ - - BOOL.C.AO-READ - - BOOL.C.AM-WRITE - - BOOL.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Boolean State" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: StateValue" - PICS: BOOL.C.AM-READ - wait: "readAttribute" - attribute: "StateValue" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - ./chip-tool booleanstate read feature-map 1 1 - - Verify none of the optional feature of the server-side of the cluster is listed on TH(all-clusters-minnimal-app) Log - - [1666936223.132263][2546:2546] CHIP:EM: Handling via exchange: 56922r, Delegate: 0xaaaad02b0288 - [1666936223.132365][2546:2546] CHIP:IM: Received Read request - [1666936223.132562][2546:2546] CHIP:DMG: ReadRequestMessage = - [1666936223.132653][2546:2546] CHIP:DMG: { - [1666936223.132709][2546:2546] CHIP:DMG: AttributePathIBs = - [1666936223.132780][2546:2546] CHIP:DMG: [ - [1666936223.132844][2546:2546] CHIP:DMG: AttributePathIB = - [1666936223.132961][2546:2546] CHIP:DMG: { - [1666936223.133043][2546:2546] CHIP:DMG: Endpoint = 0x1, - [1666936223.133153][2546:2546] CHIP:DMG: Cluster = 0x45, - [1666936223.133238][2546:2546] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666936223.133340][2546:2546] CHIP:DMG: } - [1666936223.133421][2546:2546] CHIP:DMG: - [1666936223.133518][2546:2546] CHIP:DMG: ], - [1666936223.133592][2546:2546] CHIP:DMG: - [1666936223.133690][2546:2546] CHIP:DMG: isFabricFiltered = true, - [1666936223.133757][2546:2546] CHIP:DMG: InteractionModelRevision = 1 - [1666936223.133843][2546:2546] CHIP:DMG: }, - [1666936223.134040][2546:2546] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666936223.134302][2546:2546] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666936223.134381][2546:2546] CHIP:DMG: Cluster 45, Attribute fffc is dirty - [1666936223.134437][2546:2546] CHIP:DMG: Reading attribute: Cluster=0x0000_0045 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1666936223.134506][2546:2546] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0045 e=1 p=v - [1666936223.134610][2546:2546] CHIP:DMG: AccessControl: allowed - [1666936223.134803][2546:2546] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666936223.135460][2546:2546] CHIP:EM: <<< [E:56922r M:17358809 (Ack:120184015)] (S) Msg TX to 1:000000000001B669 [A6ED] --- Type 0001:05 (IM:ReportData) - [1666936223.135576][2546:2546] CHIP:IN: (S) Sending msg 17358809 on secure session with LSID: 15175 - [1666936223.136334][2546:2546] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:35992 | 17358809 | [Interaction Model (1) / Report Data (0x05) / Session = 13737 / Exchange = 56922] - [1666936223.136444][2546:2546] CHIP:DMG: Header Flags = - [1666936223.136503][2546:2546] CHIP:DMG: { - [1666936223.136592][2546:2546] CHIP:DMG: Exchange (0x06) = - [1666936223.136649][2546:2546] CHIP:DMG: { - [1666936223.136710][2546:2546] CHIP:DMG: AckMsg = 120184015 - [1666936223.136794][2546:2546] CHIP:DMG: NeedsAck = true - [1666936223.136852][2546:2546] CHIP:DMG: } - [1666936223.136926][2546:2546] CHIP:DMG: } - [1666936223.137005][2546:2546] CHIP:DMG: - [1666936223.137077][2546:2546] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666936223.137257][2546:2546] CHIP:DMG: { - [1666936223.137320][2546:2546] CHIP:DMG: data = 00a93500d9df0801fc3a3b7ec6f761c31f328854cd71ec11f2d3486635575b63f02c796af2820a3ea5eda769ed4b44fecdc89d2f050c1d0a325141f9fe1e941a5821abfbc01a45 - [1666936223.137404][2546:2546] CHIP:DMG: buffer_ptr = 187650953656928 - [1666936223.137459][2546:2546] CHIP:DMG: } - [1666936223.137513][2546:2546] CHIP:DMG: - [1666936223.137716][2546:2546] CHIP:DMG: ReportDataMessage = - [1666936223.137810][2546:2546] CHIP:DMG: { - [1666936223.137866][2546:2546] CHIP:DMG: AttributeReportIBs = - [1666936223.137968][2546:2546] CHIP:DMG: [ - [1666936223.138034][2546:2546] CHIP:DMG: AttributeReportIB = - [1666936223.138151][2546:2546] CHIP:DMG: { - [1666936223.138231][2546:2546] CHIP:DMG: AttributeDataIB = - [1666936223.138337][2546:2546] CHIP:DMG: { - [1666936223.138427][2546:2546] CHIP:DMG: DataVersion = 0x1e70d063, - [1666936223.138536][2546:2546] CHIP:DMG: AttributePathIB = - [1666936223.138625][2546:2546] CHIP:DMG: { - [1666936223.138803][2546:2546] CHIP:DMG: Endpoint = 0x1, - [1666936223.138899][2546:2546] CHIP:DMG: Cluster = 0x45, - [1666936223.139021][2546:2546] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666936223.139109][2546:2546] CHIP:DMG: } - [1666936223.139225][2546:2546] CHIP:DMG: - [1666936223.139318][2546:2546] CHIP:DMG: Data = 0, - [1666936223.139424][2546:2546] CHIP:DMG: }, - [1666936223.139514][2546:2546] CHIP:DMG: - [1666936223.139611][2546:2546] CHIP:DMG: }, - [1666936223.139698][2546:2546] CHIP:DMG: - [1666936223.139783][2546:2546] CHIP:DMG: ], - - ./chip-tool booleanstate read attribute-list 1 1 - - Verify none of the optional attributes of the server-side of the cluster is listed on TH(all-clusters-minnimal-app) Log - - [1665059548.735458][9263:9263] CHIP:DMG: ReportDataMessage = - [1665059548.735528][9263:9263] CHIP:DMG: { - [1665059548.735575][9263:9263] CHIP:DMG: AttributeReportIBs = - [1665059548.735699][9263:9263] CHIP:DMG: [ - [1665059548.735763][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.735840][9263:9263] CHIP:DMG: { - [1665059548.735906][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.735980][9263:9263] CHIP:DMG: { - [1665059548.736051][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.736125][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.736235][9263:9263] CHIP:DMG: { - [1665059548.736342][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.736451][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.736536][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.736614][9263:9263] CHIP:DMG: } - [1665059548.736718][9263:9263] CHIP:DMG: - [1665059548.736797][9263:9263] CHIP:DMG: Data = [ - [1665059548.736896][9263:9263] CHIP:DMG: - [1665059548.736981][9263:9263] CHIP:DMG: ], - [1665059548.737053][9263:9263] CHIP:DMG: }, - [1665059548.737151][9263:9263] CHIP:DMG: - [1665059548.737217][9263:9263] CHIP:DMG: }, - [1665059548.737331][9263:9263] CHIP:DMG: - [1665059548.737394][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.737499][9263:9263] CHIP:DMG: { - [1665059548.737718][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.737821][9263:9263] CHIP:DMG: { - [1665059548.737898][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.737995][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.738074][9263:9263] CHIP:DMG: { - [1665059548.738185][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.738269][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.738373][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.738464][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.738587][9263:9263] CHIP:DMG: } - [1665059548.738693][9263:9263] CHIP:DMG: - [1665059548.738778][9263:9263] CHIP:DMG: Data = 0, - [1665059548.738874][9263:9263] CHIP:DMG: }, - [1665059548.738950][9263:9263] CHIP:DMG: - [1665059548.739038][9263:9263] CHIP:DMG: }, - [1665059548.739130][9263:9263] CHIP:DMG: - [1665059548.739192][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.739295][9263:9263] CHIP:DMG: { - [1665059548.739365][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.739438][9263:9263] CHIP:DMG: { - [1665059548.739535][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.739605][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.739704][9263:9263] CHIP:DMG: { - [1665059548.739785][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.739891][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.739973][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.740052][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.740151][9263:9263] CHIP:DMG: } - [1665059548.740235][9263:9263] CHIP:DMG: - [1665059548.740337][9263:9263] CHIP:DMG: Data = 65528, - [1665059548.740403][9263:9263] CHIP:DMG: }, - [1665059548.740510][9263:9263] CHIP:DMG: - [1665059548.740576][9263:9263] CHIP:DMG: }, - [1665059548.740667][9263:9263] CHIP:DMG: - [1665059548.740722][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.740824][9263:9263] CHIP:DMG: { - [1665059548.740891][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.740986][9263:9263] CHIP:DMG: { - [1665059548.741063][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.741159][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.741240][9263:9263] CHIP:DMG: { - [1665059548.741320][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.741420][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.741493][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.741613][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.741769][9263:9263] CHIP:DMG: } - [1665059548.741862][9263:9263] CHIP:DMG: - [1665059548.741954][9263:9263] CHIP:DMG: Data = 65529, - [1665059548.742028][9263:9263] CHIP:DMG: }, - [1665059548.742136][9263:9263] CHIP:DMG: - [1665059548.742198][9263:9263] CHIP:DMG: }, - [1665059548.742311][9263:9263] CHIP:DMG: - [1665059548.742375][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.742455][9263:9263] CHIP:DMG: { - [1665059548.742545][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.742621][9263:9263] CHIP:DMG: { - [1665059548.742719][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.742794][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.742865][9263:9263] CHIP:DMG: { - [1665059548.742966][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.743049][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.743157][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.743236][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.743332][9263:9263] CHIP:DMG: } - [1665059548.743426][9263:9263] CHIP:DMG: - [1665059548.743526][9263:9263] CHIP:DMG: Data = 65531, - [1665059548.743601][9263:9263] CHIP:DMG: }, - [1665059548.743710][9263:9263] CHIP:DMG: - [1665059548.743778][9263:9263] CHIP:DMG: }, - [1665059548.743886][9263:9263] CHIP:DMG: - [1665059548.743945][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.744023][9263:9263] CHIP:DMG: { - [1665059548.744106][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.744172][9263:9263] CHIP:DMG: { - [1665059548.744247][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.744321][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.744394][9263:9263] CHIP:DMG: { - [1665059548.744497][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.744581][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.744689][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.744772][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.744878][9263:9263] CHIP:DMG: } - [1665059548.744957][9263:9263] CHIP:DMG: - [1665059548.745062][9263:9263] CHIP:DMG: Data = 65532, - [1665059548.745135][9263:9263] CHIP:DMG: }, - [1665059548.745235][9263:9263] CHIP:DMG: - [1665059548.745302][9263:9263] CHIP:DMG: }, - [1665059548.745408][9263:9263] CHIP:DMG: - [1665059548.745468][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.745585][9263:9263] CHIP:DMG: { - [1665059548.745678][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.745753][9263:9263] CHIP:DMG: { - [1665059548.745851][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.745924][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.746024][9263:9263] CHIP:DMG: { - [1665059548.746103][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.746208][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.746292][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.746373][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.746473][9263:9263] CHIP:DMG: } - [1665059548.746551][9263:9263] CHIP:DMG: - [1665059548.746654][9263:9263] CHIP:DMG: Data = 65533, - [1665059548.746728][9263:9263] CHIP:DMG: }, - - - ./chip-tool booleanstate read state-value 1 1 - - Verify read command is received on TH (all-clusters-minimal-app) Log - - [1666174757.461171][21506:21506] CHIP:EM: Handling via exchange: 33623r, Delegate: 0xaaaac93380e0 - [1666174757.461271][21506:21506] CHIP:IM: Received Read request - [1666174757.461438][21506:21506] CHIP:DMG: ReadRequestMessage = - [1666174757.461510][21506:21506] CHIP:DMG: { - [1666174757.461565][21506:21506] CHIP:DMG: AttributePathIBs = - [1666174757.461629][21506:21506] CHIP:DMG: [ - [1666174757.461690][21506:21506] CHIP:DMG: AttributePathIB = - [1666174757.461769][21506:21506] CHIP:DMG: { - [1666174757.461855][21506:21506] CHIP:DMG: Endpoint = 0x1, - [1666174757.461999][21506:21506] CHIP:DMG: Cluster = 0x45, - [1666174757.462085][21506:21506] CHIP:DMG: Attribute = 0x0000_0000, - [1666174757.462161][21506:21506] CHIP:DMG: } - [1666174757.462235][21506:21506] CHIP:DMG: - [1666174757.462300][21506:21506] CHIP:DMG: ], - [1666174757.462371][21506:21506] CHIP:DMG: - [1666174757.462440][21506:21506] CHIP:DMG: isFabricFiltered = true, - [1666174757.462504][21506:21506] CHIP:DMG: InteractionModelRevision = 1 - [1666174757.462565][21506:21506] CHIP:DMG: }, - [1666174757.462734][21506:21506] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666174757.462977][21506:21506] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666174757.463049][21506:21506] CHIP:DMG: Cluster 45, Attribute 0 is dirty - [1666174757.463104][21506:21506] CHIP:DMG: Reading attribute: Cluster=0x0000_0045 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666174757.463172][21506:21506] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0045 e=1 p=v - [1666174757.463248][21506:21506] CHIP:DMG: AccessControl: allowed - [1666174757.463365][21506:21506] CHIP:DMG: Sending report (payload has 35 bytes)... - [1666174757.463975][21506:21506] CHIP:EM: <<< [E:33623r M:221389354 (Ack:15980397)] (S) Msg TX to 1:000000000001B669 [A7EF] --- Type 0001:05 (IM:ReportData) - [1666174757.464087][21506:21506] CHIP:IN: (S) Sending msg 221389354 on secure session with LSID: 55654 - [1666174757.464808][21506:21506] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:35514 | 221389354 | [Interaction Model (1) / Report Data (0x05) / Session = 18738 / Exchange = 33623] - [1666174757.464917][21506:21506] CHIP:DMG: Header Flags = - [1666174757.464974][21506:21506] CHIP:DMG: { - [1666174757.465062][21506:21506] CHIP:DMG: Exchange (0x06) = - [1666174757.465119][21506:21506] CHIP:DMG: { - [1666174757.465178][21506:21506] CHIP:DMG: AckMsg = 15980397 - [1666174757.465228][21506:21506] CHIP:DMG: NeedsAck = true - [1666174757.465288][21506:21506] CHIP:DMG: } - [1666174757.465360][21506:21506] CHIP:DMG: } - [1666174757.465425][21506:21506] CHIP:DMG: - [1666174757.465495][21506:21506] CHIP:DMG: Encrypted Payload (69 bytes) = - [1666174757.465543][21506:21506] CHIP:DMG: { - [1666174757.465597][21506:21506] CHIP:DMG: data = 003249002a22320d70f90c31d24191bdcae9c8e10d0059f5a90bcc5c7c921dffd49596846c3d5131af0f1b0d5dac89dc70bec2a05fcefd34726640374895b32262fac29b72 - [1666174757.465653][21506:21506] CHIP:DMG: buffer_ptr = 187650839759600 - [1666174757.465703][21506:21506] CHIP:DMG: } - [1666174757.465750][21506:21506] CHIP:DMG: - [1666174757.465959][21506:21506] CHIP:DMG: ReportDataMessage = - [1666174757.466032][21506:21506] CHIP:DMG: { - [1666174757.466086][21506:21506] CHIP:DMG: AttributeReportIBs = - [1666174757.466173][21506:21506] CHIP:DMG: [ - [1666174757.466233][21506:21506] CHIP:DMG: AttributeReportIB = - [1666174757.466320][21506:21506] CHIP:DMG: { - [1666174757.466395][21506:21506] CHIP:DMG: AttributeDataIB = - [1666174757.466476][21506:21506] CHIP:DMG: { - [1666174757.466561][21506:21506] CHIP:DMG: DataVersion = 0x83aa29ff, - [1666174757.466644][21506:21506] CHIP:DMG: AttributePathIB = - [1666174757.466729][21506:21506] CHIP:DMG: { - [1666174757.466833][21506:21506] CHIP:DMG: Endpoint = 0x1, - [1666174757.466917][21506:21506] CHIP:DMG: Cluster = 0x45, - [1666174757.467008][21506:21506] CHIP:DMG: Attribute = 0x0000_0000, - [1666174757.467091][21506:21506] CHIP:DMG: } - [1666174757.467181][21506:21506] CHIP:DMG: - [1666174757.467270][21506:21506] CHIP:DMG: Data = false, - [1666174757.467344][21506:21506] CHIP:DMG: }, - [1666174757.467432][21506:21506] CHIP:DMG: - [1666174757.467505][21506:21506] CHIP:DMG: }, - [1666174757.467582][21506:21506] CHIP:DMG: - [1666174757.467643][21506:21506] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - This cluster doesn't have any optional attribute - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml index 1d08f4e1f942fe..563fd45a06511e 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml @@ -34,13 +34,26 @@ tests: - name: "nodeId" value: nodeId + #Issue https://github.com/project-chip/connectedhomeip/issues/26602 - label: "Step 2: TH reads the ClusterRevision from DUT" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - constraints: - type: int16u + verification: | + ./chip-tool bridgeddevicebasicinformation read cluster-revision 1 3 + + Via the TH (chip-tool), verify: + -that the ClusterRevision attribute contains value as 2. + -that value is in the type of uint16. + + [1657695910.794487][15411:15416] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFFD DataVersion: 2577979325 + [1657695910.794568][15411:15416] CHIP:TOO: ClusterRevision: 2 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Step 3: TH reads the FeatureMap from DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml new file mode 100644 index 00000000000000..fed38e16e2916d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml @@ -0,0 +1,2139 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 36.1.25. [TC-CADMIN-1.25] Subscription to the attributes - verify + subscription response [ECM] [DUT - Commissionee] + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Precondition" + verification: | + Reset Devices to factory defaults + disabled: true + + - label: "Step 1: TH_CR1 starts a commissioning process with DUT_CE" + PICS: CADMIN.S + verification: | + On TH_CR1 start interactive mode, + + ./chip-tool interactive start + + In the interactive mode of TH_CR1, start commissioning process, + + pairing code 1 34970112332 --commissioner-name alpha + + + + [1690218999738] [38865:6571482] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1690218999738] [38865:6571482] [CTL] Received CommissioningComplete response, errorCode=0 + [1690218999738] [38865:6571482] [CTL] Successfully finished commissioning step 'SendComplete' + [1690218999738] [38865:6571482] [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1690218999738] [38865:6571482] [CTL] Performing next commissioning step 'Cleanup' + [1690218999738] [38865:6571482] [IN] SecureSession[0x6000012bc000]: MarkForEviction Type:1 LSID:35777 + [1690218999738] [38865:6571482] [SC] SecureSession[0x6000012bc000, LSID:35777]: State change 'kActive' --> 'kPendingEviction' + [1690218999738] [38865:6571482] [IN] SecureSession[0x6000012bc000]: Released - Type:1 LSID:35777 + [1690218999738] [38865:6571482] [CTL] Successfully finished commissioning step 'Cleanup' + [1690218999738] [38865:6571482] [TOO] Device commissioning completed with success + disabled: true + + - label: "Step 2: TH_CR1 subscribes to WindowStatus attribute on DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In the interactive mode of TH_CR1, subscribe to windowstatus attribute, + + administratorcommissioning subscribe window-status 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs verify for windowstatus subscription notification, + + ReportDataMessage = + [1690219196809] [38865:6571482] [DMG] { + [1690219196809] [38865:6571482] [DMG] SubscriptionId = 0xdade5274, + [1690219196809] [38865:6571482] [DMG] AttributeReportIBs = + [1690219196809] [38865:6571482] [DMG] [ + [1690219196809] [38865:6571482] [DMG] AttributeReportIB = + [1690219196809] [38865:6571482] [DMG] { + [1690219196809] [38865:6571482] [DMG] AttributeDataIB = + [1690219196809] [38865:6571482] [DMG] { + [1690219196809] [38865:6571482] [DMG] DataVersion = 0x1fddccd8, + [1690219196809] [38865:6571482] [DMG] AttributePathIB = + [1690219196809] [38865:6571482] [DMG] { + [1690219196809] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219196809] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219196809] [38865:6571482] [DMG] Attribute = 0x0000_0000, + [1690219196809] [38865:6571482] [DMG] } + [1690219196809] [38865:6571482] [DMG] + [1690219196809] [38865:6571482] [DMG] Data = 0, + [1690219196809] [38865:6571482] [DMG] }, + [1690219196809] [38865:6571482] [DMG] + [1690219196809] [38865:6571482] [DMG] }, + [1690219196809] [38865:6571482] [DMG] + [1690219196809] [38865:6571482] [DMG] ], + [1690219196809] [38865:6571482] [DMG] + [1690219196809] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219196809] [38865:6571482] [DMG] } + [1690219196809] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629592 + [1690219196809] [38865:6571482] [TOO] WindowStatus: 0 + [1690219196809] [38865:6571482] [DMG] MoveToState ReadClient[0x13b704b90]: Moving to [AwaitingSu] + disabled: true + + - label: "Step 3: TH_CR1 subscribes to AdminFabricIndex attribute on DUT_CE" + PICS: CADMIN.S.A0001 + verification: | + In the interactive mode of TH_CR1, subscribe to adminfabricindex attribute, + + administratorcommissioning subscribe admin-fabric-index 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs verify for adminfabricindex subscription notification, + + ReportDataMessage = + [1690219390537] [38865:6571482] [DMG] { + [1690219390537] [38865:6571482] [DMG] SubscriptionId = 0x35250b41, + [1690219390537] [38865:6571482] [DMG] AttributeReportIBs = + [1690219390537] [38865:6571482] [DMG] [ + [1690219390537] [38865:6571482] [DMG] AttributeReportIB = + [1690219390537] [38865:6571482] [DMG] { + [1690219390537] [38865:6571482] [DMG] AttributeDataIB = + [1690219390537] [38865:6571482] [DMG] { + [1690219390537] [38865:6571482] [DMG] DataVersion = 0x1fddccd8, + [1690219390537] [38865:6571482] [DMG] AttributePathIB = + [1690219390537] [38865:6571482] [DMG] { + [1690219390537] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219390537] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219390537] [38865:6571482] [DMG] Attribute = 0x0000_0001, + [1690219390537] [38865:6571482] [DMG] } + [1690219390537] [38865:6571482] [DMG] + [1690219390537] [38865:6571482] [DMG] Data = NULL + [1690219390537] [38865:6571482] [DMG] }, + [1690219390537] [38865:6571482] [DMG] + [1690219390537] [38865:6571482] [DMG] }, + [1690219390537] [38865:6571482] [DMG] + [1690219390537] [38865:6571482] [DMG] ], + [1690219390537] [38865:6571482] [DMG] + [1690219390537] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219390537] [38865:6571482] [DMG] } + [1690219390537] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629592 + [1690219390537] [38865:6571482] [TOO] AdminFabricIndex: null + [1690219390537] [38865:6571482] [DMG] MoveToState ReadClient[0x13b605540]: Moving to [AwaitingSu] + disabled: true + + - label: "Step 4: TH_CR1 subscribes to AdminVendorId attribute on DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In the interactive mode of TH_CR1, subscribe to adminvendorid attribute, + + administratorcommissioning subscribe admin-vendor-id 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs, verify for adminvendorid subscription notification + + ReportDataMessage = + [1690219472644] [38865:6571482] [DMG] { + [1690219472644] [38865:6571482] [DMG] SubscriptionId = 0xd3c6ff91, + [1690219472644] [38865:6571482] [DMG] AttributeReportIBs = + [1690219472644] [38865:6571482] [DMG] [ + [1690219472644] [38865:6571482] [DMG] AttributeReportIB = + [1690219472644] [38865:6571482] [DMG] { + [1690219472644] [38865:6571482] [DMG] AttributeDataIB = + [1690219472644] [38865:6571482] [DMG] { + [1690219472644] [38865:6571482] [DMG] DataVersion = 0x1fddccd8, + [1690219472644] [38865:6571482] [DMG] AttributePathIB = + [1690219472644] [38865:6571482] [DMG] { + [1690219472644] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219472644] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219472644] [38865:6571482] [DMG] Attribute = 0x0000_0002, + [1690219472644] [38865:6571482] [DMG] } + [1690219472644] [38865:6571482] [DMG] + [1690219472644] [38865:6571482] [DMG] Data = NULL + [1690219472644] [38865:6571482] [DMG] }, + [1690219472644] [38865:6571482] [DMG] + [1690219472644] [38865:6571482] [DMG] }, + [1690219472644] [38865:6571482] [DMG] + [1690219472644] [38865:6571482] [DMG] ], + [1690219472644] [38865:6571482] [DMG] + [1690219472644] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219472644] [38865:6571482] [DMG] } + [1690219472644] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629592 + [1690219472644] [38865:6571482] [TOO] AdminVendorId: null + [1690219472644] [38865:6571482] [DMG] MoveToState ReadClient[0x12b6042d0]: Moving to [AwaitingSu] + disabled: true + + - label: + "Step 5: TH_CR1 opens a commissioning window on DUT_CE using ECM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C00.Rsp + verification: | + In the interactive mode of TH_CR1, send command to open commissioning window using ECM, + + pairing open-commissioning-window 1 1 180 1000 3840 --commissioner-name alpha + + On TH_CR1 logs, verify for pairing window to be successfully opened + + InvokeResponseMessage = + [1690219617069] [38865:6571482] [DMG] { + [1690219617069] [38865:6571482] [DMG] suppressResponse = false, + [1690219617069] [38865:6571482] [DMG] InvokeResponseIBs = + [1690219617069] [38865:6571482] [DMG] [ + [1690219617069] [38865:6571482] [DMG] InvokeResponseIB = + [1690219617069] [38865:6571482] [DMG] { + [1690219617069] [38865:6571482] [DMG] CommandStatusIB = + [1690219617069] [38865:6571482] [DMG] { + [1690219617069] [38865:6571482] [DMG] CommandPathIB = + [1690219617069] [38865:6571482] [DMG] { + [1690219617069] [38865:6571482] [DMG] EndpointId = 0x0, + [1690219617069] [38865:6571482] [DMG] ClusterId = 0x3c, + [1690219617069] [38865:6571482] [DMG] CommandId = 0x0, + [1690219617069] [38865:6571482] [DMG] }, + [1690219617069] [38865:6571482] [DMG] + [1690219617069] [38865:6571482] [DMG] StatusIB = + [1690219617069] [38865:6571482] [DMG] { + [1690219617069] [38865:6571482] [DMG] status = 0x00 (SUCCESS), + [1690219617069] [38865:6571482] [DMG] }, + [1690219617069] [38865:6571482] [DMG] + [1690219617069] [38865:6571482] [DMG] }, + [1690219617069] [38865:6571482] [DMG] + [1690219617069] [38865:6571482] [DMG] }, + [1690219617069] [38865:6571482] [DMG] + [1690219617069] [38865:6571482] [DMG] ], + [1690219617069] [38865:6571482] [DMG] + [1690219617069] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219617069] [38865:6571482] [DMG] }, + [1690219617069] [38865:6571482] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1690219617069] [38865:6571482] [CTL] Successfully opened pairing window on the device + [1690219617069] [38865:6571482] [CTL] Manual pairing code: [35092509167] + [1690219617069] [38865:6571482] [CTL] SetupQRCode: [MT:-24J0AFN00I.KG02C00] + [1690219617069] [38865:6571482] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 6: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + ReportDataMessage = + [1690219617070] [38865:6571482] [DMG] { + [1690219617070] [38865:6571482] [DMG] SubscriptionId = 0xdade5274, + [1690219617070] [38865:6571482] [DMG] AttributeReportIBs = + [1690219617070] [38865:6571482] [DMG] [ + [1690219617070] [38865:6571482] [DMG] AttributeReportIB = + [1690219617070] [38865:6571482] [DMG] { + [1690219617070] [38865:6571482] [DMG] AttributeDataIB = + [1690219617070] [38865:6571482] [DMG] { + [1690219617070] [38865:6571482] [DMG] DataVersion = 0x1fddccdb, + [1690219617070] [38865:6571482] [DMG] AttributePathIB = + [1690219617070] [38865:6571482] [DMG] { + [1690219617070] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219617070] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219617070] [38865:6571482] [DMG] Attribute = 0x0000_0000, + [1690219617070] [38865:6571482] [DMG] } + [1690219617070] [38865:6571482] [DMG] + [1690219617070] [38865:6571482] [DMG] Data = 1, + [1690219617070] [38865:6571482] [DMG] }, + [1690219617070] [38865:6571482] [DMG] + [1690219617070] [38865:6571482] [DMG] }, + [1690219617070] [38865:6571482] [DMG] + [1690219617070] [38865:6571482] [DMG] ], + [1690219617070] [38865:6571482] [DMG] + [1690219617070] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219617070] [38865:6571482] [DMG] } + [1690219617070] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629595 + [1690219617070] [38865:6571482] [TOO] WindowStatus: 1 + [1690219617070] [38865:6571482] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690219617071] [38865:6571482] [EM] <<< [E:50737r S:35778 M:151592234 (Ack:264355187)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690219617071] [38865:6571482] [IN] (S) Sending msg 151592234 on secure session with LSID: 35778 + [1690219617074] [38865:6571482] [EM] >>> [E:50738r S:35778 M:264355188] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690219617074] [38865:6571482] [EM] Handling via exchange: 50738r, Delegate: 0x1013c4be0 + [1690219617074] [38865:6571482] [DMG] ReportDataMessage = + [1690219617074] [38865:6571482] [DMG] { + [1690219617074] [38865:6571482] [DMG] SubscriptionId = 0x35250b41, + [1690219617074] [38865:6571482] [DMG] AttributeReportIBs = + [1690219617074] [38865:6571482] [DMG] [ + [1690219617074] [38865:6571482] [DMG] AttributeReportIB = + [1690219617074] [38865:6571482] [DMG] { + [1690219617074] [38865:6571482] [DMG] AttributeDataIB = + [1690219617074] [38865:6571482] [DMG] { + [1690219617074] [38865:6571482] [DMG] DataVersion = 0x1fddccdb, + [1690219617074] [38865:6571482] [DMG] AttributePathIB = + [1690219617074] [38865:6571482] [DMG] { + [1690219617074] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219617074] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219617075] [38865:6571482] [DMG] Attribute = 0x0000_0001, + [1690219617075] [38865:6571482] [DMG] } + [1690219617075] [38865:6571482] [DMG] + [1690219617075] [38865:6571482] [DMG] Data = 1, + [1690219617075] [38865:6571482] [DMG] }, + [1690219617075] [38865:6571482] [DMG] + [1690219617075] [38865:6571482] [DMG] }, + [1690219617075] [38865:6571482] [DMG] + [1690219617075] [38865:6571482] [DMG] ], + [1690219617075] [38865:6571482] [DMG] + [1690219617075] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219617075] [38865:6571482] [DMG] } + [1690219617075] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629595 + [1690219617075] [38865:6571482] [TOO] AdminFabricIndex: 1 + [1690219617075] [38865:6571482] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690219617075] [38865:6571482] [EM] <<< [E:50738r S:35778 M:151592235 (Ack:264355188)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690219617075] [38865:6571482] [IN] (S) Sending msg 151592235 on secure session with LSID: 35778 + [1690219617076] [38865:6571482] [EM] >>> [E:50739r S:35778 M:264355189] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690219617076] [38865:6571482] [EM] Handling via exchange: 50739r, Delegate: 0x1013c4be0 + [1690219617076] [38865:6571482] [DMG] ReportDataMessage = + [1690219617076] [38865:6571482] [DMG] { + [1690219617076] [38865:6571482] [DMG] SubscriptionId = 0xd3c6ff91, + [1690219617076] [38865:6571482] [DMG] AttributeReportIBs = + [1690219617076] [38865:6571482] [DMG] [ + [1690219617076] [38865:6571482] [DMG] AttributeReportIB = + [1690219617076] [38865:6571482] [DMG] { + [1690219617076] [38865:6571482] [DMG] AttributeDataIB = + [1690219617076] [38865:6571482] [DMG] { + [1690219617076] [38865:6571482] [DMG] DataVersion = 0x1fddccdb, + [1690219617076] [38865:6571482] [DMG] AttributePathIB = + [1690219617076] [38865:6571482] [DMG] { + [1690219617076] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219617076] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219617076] [38865:6571482] [DMG] Attribute = 0x0000_0002, + [1690219617076] [38865:6571482] [DMG] } + [1690219617076] [38865:6571482] [DMG] + [1690219617076] [38865:6571482] [DMG] Data = 65521, + [1690219617076] [38865:6571482] [DMG] }, + [1690219617076] [38865:6571482] [DMG] + [1690219617076] [38865:6571482] [DMG] }, + [1690219617076] [38865:6571482] [DMG] + [1690219617076] [38865:6571482] [DMG] ], + [1690219617076] [38865:6571482] [DMG] + [1690219617076] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219617076] [38865:6571482] [DMG] } + [1690219617076] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629595 + [1690219617076] [38865:6571482] [TOO] AdminVendorId: 65521 + [1690219617076] [38865:6571482] [DMG] Refresh LivenessCheckTime for + disabled: true + + - label: "Step 7: TH_CR2 starts a commissioning process with DUT_CE" + PICS: CADMIN.S + verification: | + On TH_CR2 start interactive mode, + + ./chip-tool interactive start + + In the interactive mode of TH_CR2, start commissioning process using the pairing code obtained from step 5 + + pairing code 1 35092509167 --commissioner-name beta + + + [1690219788079] [38880:6580427] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1690219788079] [38880:6580427] [CTL] Received CommissioningComplete response, errorCode=0 + [1690219788079] [38880:6580427] [CTL] Successfully finished commissioning step 'SendComplete' + [1690219788079] [38880:6580427] [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1690219788079] [38880:6580427] [CTL] Performing next commissioning step 'Cleanup' + [1690219788079] [38880:6580427] [IN] SecureSession[0x60000062c0f0]: MarkForEviction Type:1 LSID:15323 + [1690219788079] [38880:6580427] [SC] SecureSession[0x60000062c0f0, LSID:15323]: State change 'kActive' --> 'kPendingEviction' + [1690219788079] [38880:6580427] [IN] SecureSession[0x60000062c0f0]: Released - Type:1 LSID:15323 + [1690219788079] [38880:6580427] [CTL] Successfully finished commissioning step 'Cleanup' + [1690219788079] [38880:6580427] [TOO] Device commissioning completed with success + [1690219788079] [38880:6580427] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 8: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + Handling via exchange: 50740r, Delegate: 0x1013c4be0 + [1690219788240] [38865:6578589] [DMG] ReportDataMessage = + [1690219788240] [38865:6578589] [DMG] { + [1690219788240] [38865:6578589] [DMG] SubscriptionId = 0xdade5274, + [1690219788240] [38865:6578589] [DMG] AttributeReportIBs = + [1690219788240] [38865:6578589] [DMG] [ + [1690219788240] [38865:6578589] [DMG] AttributeReportIB = + [1690219788240] [38865:6578589] [DMG] { + [1690219788240] [38865:6578589] [DMG] AttributeDataIB = + [1690219788240] [38865:6578589] [DMG] { + [1690219788240] [38865:6578589] [DMG] DataVersion = 0x1fddccde, + [1690219788240] [38865:6578589] [DMG] AttributePathIB = + [1690219788240] [38865:6578589] [DMG] { + [1690219788240] [38865:6578589] [DMG] Endpoint = 0x0, + [1690219788240] [38865:6578589] [DMG] Cluster = 0x3c, + [1690219788240] [38865:6578589] [DMG] Attribute = 0x0000_0000, + [1690219788240] [38865:6578589] [DMG] } + [1690219788240] [38865:6578589] [DMG] + [1690219788240] [38865:6578589] [DMG] Data = 0, + [1690219788240] [38865:6578589] [DMG] }, + [1690219788240] [38865:6578589] [DMG] + [1690219788240] [38865:6578589] [DMG] }, + [1690219788240] [38865:6578589] [DMG] + [1690219788240] [38865:6578589] [DMG] ], + [1690219788240] [38865:6578589] [DMG] + [1690219788240] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690219788240] [38865:6578589] [DMG] } + [1690219788241] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629598 + [1690219788241] [38865:6578589] [TOO] WindowStatus: 0 + [1690219788241] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690219788241] [38865:6578589] [EM] <<< [E:50740r S:35778 M:151592237 (Ack:264355193)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690219788241] [38865:6578589] [IN] (S) Sending msg 151592237 on secure session with LSID: 35778 + [1690219788241] [38865:6578589] [EM] >>> [E:50741r S:35778 M:264355194] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690219788241] [38865:6578589] [EM] Handling via exchange: 50741r, Delegate: 0x1013c4be0 + [1690219788241] [38865:6578589] [DMG] ReportDataMessage = + [1690219788241] [38865:6578589] [DMG] { + [1690219788241] [38865:6578589] [DMG] SubscriptionId = 0x35250b41, + [1690219788241] [38865:6578589] [DMG] AttributeReportIBs = + [1690219788241] [38865:6578589] [DMG] [ + [1690219788241] [38865:6578589] [DMG] AttributeReportIB = + [1690219788241] [38865:6578589] [DMG] { + [1690219788241] [38865:6578589] [DMG] AttributeDataIB = + [1690219788241] [38865:6578589] [DMG] { + [1690219788241] [38865:6578589] [DMG] DataVersion = 0x1fddccde, + [1690219788241] [38865:6578589] [DMG] AttributePathIB = + [1690219788241] [38865:6578589] [DMG] { + [1690219788241] [38865:6578589] [DMG] Endpoint = 0x0, + [1690219788241] [38865:6578589] [DMG] Cluster = 0x3c, + [1690219788241] [38865:6578589] [DMG] Attribute = 0x0000_0001, + [1690219788241] [38865:6578589] [DMG] } + [1690219788241] [38865:6578589] [DMG] + [1690219788241] [38865:6578589] [DMG] Data = NULL + [1690219788241] [38865:6578589] [DMG] }, + [1690219788241] [38865:6578589] [DMG] + [1690219788241] [38865:6578589] [DMG] }, + [1690219788241] [38865:6578589] [DMG] + [1690219788241] [38865:6578589] [DMG] ], + [1690219788241] [38865:6578589] [DMG] + [1690219788241] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690219788241] [38865:6578589] [DMG] } + [1690219788241] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629598 + [1690219788241] [38865:6578589] [TOO] AdminFabricIndex: null + [1690219788241] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690219788242] [38865:6578589] [EM] <<< [E:50741r S:35778 M:151592238 (Ack:264355194)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690219788242] [38865:6578589] [IN] (S) Sending msg 151592238 on secure session with LSID: 35778 + [1690219788242] [38865:6578589] [EM] >>> [E:50742r S:35778 M:264355195] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690219788242] [38865:6578589] [EM] Handling via exchange: 50742r, Delegate: 0x1013c4be0 + [1690219788242] [38865:6578589] [DMG] ReportDataMessage = + [1690219788242] [38865:6578589] [DMG] { + [1690219788242] [38865:6578589] [DMG] SubscriptionId = 0xd3c6ff91, + [1690219788242] [38865:6578589] [DMG] AttributeReportIBs = + [1690219788242] [38865:6578589] [DMG] [ + [1690219788242] [38865:6578589] [DMG] AttributeReportIB = + [1690219788242] [38865:6578589] [DMG] { + [1690219788242] [38865:6578589] [DMG] AttributeDataIB = + [1690219788242] [38865:6578589] [DMG] { + [1690219788242] [38865:6578589] [DMG] DataVersion = 0x1fddccde, + [1690219788242] [38865:6578589] [DMG] AttributePathIB = + [1690219788242] [38865:6578589] [DMG] { + [1690219788242] [38865:6578589] [DMG] Endpoint = 0x0, + [1690219788242] [38865:6578589] [DMG] Cluster = 0x3c, + [1690219788242] [38865:6578589] [DMG] Attribute = 0x0000_0002, + [1690219788242] [38865:6578589] [DMG] } + [1690219788242] [38865:6578589] [DMG] + [1690219788242] [38865:6578589] [DMG] Data = NULL + [1690219788242] [38865:6578589] [DMG] }, + [1690219788242] [38865:6578589] [DMG] + [1690219788242] [38865:6578589] [DMG] }, + [1690219788242] [38865:6578589] [DMG] + [1690219788242] [38865:6578589] [DMG] ], + [1690219788242] [38865:6578589] [DMG] + [1690219788242] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690219788242] [38865:6578589] [DMG] } + [1690219788242] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629598 + [1690219788242] [38865:6578589] [TOO] AdminVendorId: null + [1690219788242] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690219788242] [38865:6578589] [EM] <<< [E:50742r S:35778 M:151592239 (Ack:264355195)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: "Step 9: TH_CR2 subscribes to WindowStatus attribute on DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In the interactive mode of TH_CR2, subscribe to windowstatus attribute, + + administratorcommissioning subscribe window-status 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for windowstatus subscription notification + + ReportDataMessage = + [1690219925605] [38880:6580427] [DMG] { + [1690219925605] [38880:6580427] [DMG] SubscriptionId = 0xfab5d837, + [1690219925605] [38880:6580427] [DMG] AttributeReportIBs = + [1690219925605] [38880:6580427] [DMG] [ + [1690219925605] [38880:6580427] [DMG] AttributeReportIB = + [1690219925605] [38880:6580427] [DMG] { + [1690219925605] [38880:6580427] [DMG] AttributeDataIB = + [1690219925605] [38880:6580427] [DMG] { + [1690219925605] [38880:6580427] [DMG] DataVersion = 0x1fddccde, + [1690219925605] [38880:6580427] [DMG] AttributePathIB = + [1690219925605] [38880:6580427] [DMG] { + [1690219925605] [38880:6580427] [DMG] Endpoint = 0x0, + [1690219925605] [38880:6580427] [DMG] Cluster = 0x3c, + [1690219925605] [38880:6580427] [DMG] Attribute = 0x0000_0000, + [1690219925605] [38880:6580427] [DMG] } + [1690219925605] [38880:6580427] [DMG] + [1690219925605] [38880:6580427] [DMG] Data = 0, + [1690219925605] [38880:6580427] [DMG] }, + [1690219925605] [38880:6580427] [DMG] + [1690219925605] [38880:6580427] [DMG] }, + [1690219925605] [38880:6580427] [DMG] + [1690219925605] [38880:6580427] [DMG] ], + [1690219925605] [38880:6580427] [DMG] + [1690219925605] [38880:6580427] [DMG] InteractionModelRevision = 1 + [1690219925605] [38880:6580427] [DMG] } + [1690219925605] [38880:6580427] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629598 + [1690219925605] [38880:6580427] [TOO] WindowStatus: 0 + [1690219925605] [38880:6580427] [DMG] MoveToState ReadClient[0x12af05f80]: Moving to [AwaitingSu] + disabled: true + + - label: + "Step 10: TH_CR2 subscribes to AdminFabricIndex attribute on DUT_CE" + PICS: CADMIN.S.A0001 + verification: | + In the interactive mode of TH_CR2, subscribe to adminfabricindex attribute, + + administratorcommissioning subscribe admin-fabric-index 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for adminfabricindex subscription notification + + ReportDataMessage = + [1690219962624] [38880:6580427] [DMG] { + [1690219962624] [38880:6580427] [DMG] SubscriptionId = 0x5984e13a, + [1690219962624] [38880:6580427] [DMG] AttributeReportIBs = + [1690219962624] [38880:6580427] [DMG] [ + [1690219962624] [38880:6580427] [DMG] AttributeReportIB = + [1690219962624] [38880:6580427] [DMG] { + [1690219962624] [38880:6580427] [DMG] AttributeDataIB = + [1690219962624] [38880:6580427] [DMG] { + [1690219962624] [38880:6580427] [DMG] DataVersion = 0x1fddccde, + [1690219962624] [38880:6580427] [DMG] AttributePathIB = + [1690219962624] [38880:6580427] [DMG] { + [1690219962624] [38880:6580427] [DMG] Endpoint = 0x0, + [1690219962624] [38880:6580427] [DMG] Cluster = 0x3c, + [1690219962624] [38880:6580427] [DMG] Attribute = 0x0000_0001, + [1690219962624] [38880:6580427] [DMG] } + [1690219962624] [38880:6580427] [DMG] + [1690219962624] [38880:6580427] [DMG] Data = NULL + [1690219962624] [38880:6580427] [DMG] }, + [1690219962624] [38880:6580427] [DMG] + [1690219962624] [38880:6580427] [DMG] }, + [1690219962624] [38880:6580427] [DMG] + [1690219962624] [38880:6580427] [DMG] ], + [1690219962624] [38880:6580427] [DMG] + [1690219962624] [38880:6580427] [DMG] InteractionModelRevision = 1 + [1690219962624] [38880:6580427] [DMG] } + [1690219962624] [38880:6580427] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629598 + [1690219962624] [38880:6580427] [TOO] AdminFabricIndex: null + disabled: true + + - label: "Step 11: TH_CR2 subscribes to AdminVendorId attribute on DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In the interactive mode of TH_CR2, subscribe to adminvendorid attribute, + + administratorcommissioning subscribe admin-vendor-id 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for adminvendorid subscription notification + + ReportDataMessage = + [1690220032050] [38880:6580427] [DMG] { + [1690220032050] [38880:6580427] [DMG] SubscriptionId = 0x943b5fc3, + [1690220032050] [38880:6580427] [DMG] AttributeReportIBs = + [1690220032050] [38880:6580427] [DMG] [ + [1690220032050] [38880:6580427] [DMG] AttributeReportIB = + [1690220032050] [38880:6580427] [DMG] { + [1690220032050] [38880:6580427] [DMG] AttributeDataIB = + [1690220032050] [38880:6580427] [DMG] { + [1690220032050] [38880:6580427] [DMG] DataVersion = 0x1fddccde, + [1690220032050] [38880:6580427] [DMG] AttributePathIB = + [1690220032050] [38880:6580427] [DMG] { + [1690220032050] [38880:6580427] [DMG] Endpoint = 0x0, + [1690220032050] [38880:6580427] [DMG] Cluster = 0x3c, + [1690220032050] [38880:6580427] [DMG] Attribute = 0x0000_0002, + [1690220032050] [38880:6580427] [DMG] } + [1690220032050] [38880:6580427] [DMG] + [1690220032050] [38880:6580427] [DMG] Data = NULL + [1690220032050] [38880:6580427] [DMG] }, + [1690220032050] [38880:6580427] [DMG] + [1690220032050] [38880:6580427] [DMG] }, + [1690220032050] [38880:6580427] [DMG] + [1690220032050] [38880:6580427] [DMG] ], + [1690220032050] [38880:6580427] [DMG] + [1690220032050] [38880:6580427] [DMG] InteractionModelRevision = 1 + [1690220032050] [38880:6580427] [DMG] } + [1690220032050] [38880:6580427] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629598 + [1690220032050] [38880:6580427] [TOO] AdminVendorId: null + [1690220032050] [38880:6580427] [DMG] MoveToState ReadClient[0x12c8042d0]: Moving to [AwaitingSu] + disabled: true + + - label: + "Step 12: TH_CR1 opens a commissioning window on DUT_CE using ECM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C00.Rsp + verification: | + In the interactive mode of TH_CR1, send command to open commissioning window using ECM, + + pairing open-commissioning-window 1 1 180 1000 3840 --commissioner-name alpha + + On TH_CR1 logs, verify for pairing window to be successfully opened + + + InvokeResponseMessage = + + [1690220086788] [38865:6578589] [DMG] { + [1690220086788] [38865:6578589] [DMG] suppressResponse = false, + [1690220086788] [38865:6578589] [DMG] InvokeResponseIBs = + [1690220086788] [38865:6578589] [DMG] [ + [1690220086788] [38865:6578589] [DMG] InvokeResponseIB = + [1690220086788] [38865:6578589] [DMG] { + [1690220086788] [38865:6578589] [DMG] CommandStatusIB = + [1690220086788] [38865:6578589] [DMG] { + [1690220086788] [38865:6578589] [DMG] CommandPathIB = + [1690220086788] [38865:6578589] [DMG] { + [1690220086788] [38865:6578589] [DMG] EndpointId = 0x0, + [1690220086788] [38865:6578589] [DMG] ClusterId = 0x3c, + [1690220086788] [38865:6578589] [DMG] CommandId = 0x0, + [1690220086788] [38865:6578589] [DMG] }, + [1690220086788] [38865:6578589] [DMG] + [1690220086788] [38865:6578589] [DMG] StatusIB = + [1690220086788] [38865:6578589] [DMG] { + [1690220086788] [38865:6578589] [DMG] status = 0x00 (SUCCESS), + [1690220086788] [38865:6578589] [DMG] }, + [1690220086788] [38865:6578589] [DMG] + [1690220086788] [38865:6578589] [DMG] }, + [1690220086788] [38865:6578589] [DMG] + [1690220086788] [38865:6578589] [DMG] }, + [1690220086788] [38865:6578589] [DMG] + [1690220086788] [38865:6578589] [DMG] ], + [1690220086788] [38865:6578589] [DMG] + [1690220086788] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220086788] [38865:6578589] [DMG] }, + [1690220086788] [38865:6578589] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1690220086788] [38865:6578589] [CTL] Successfully opened pairing window on the device + [1690220086788] [38865:6578589] [CTL] Manual pairing code: [34983924769] + [1690220086788] [38865:6578589] [CTL] SetupQRCode: [MT:-24J0AFN002ZF60MW00] + [1690220086788] [38865:6578589] [DMG] ICR moving to [AwaitingDe] + [1690220086788] [38865:6578589] [EM] <<< [E:27145i S:35778 M:151592246 (Ack:264355202)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 13: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + ReportDataMessage = + [1690220086789] [38865:6578589] [DMG] { + [1690220086789] [38865:6578589] [DMG] SubscriptionId = 0xdade5274, + [1690220086789] [38865:6578589] [DMG] AttributeReportIBs = + [1690220086789] [38865:6578589] [DMG] [ + [1690220086789] [38865:6578589] [DMG] AttributeReportIB = + [1690220086789] [38865:6578589] [DMG] { + [1690220086789] [38865:6578589] [DMG] AttributeDataIB = + [1690220086789] [38865:6578589] [DMG] { + [1690220086789] [38865:6578589] [DMG] DataVersion = 0x1fddcce1, + [1690220086789] [38865:6578589] [DMG] AttributePathIB = + [1690220086789] [38865:6578589] [DMG] { + [1690220086789] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220086789] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220086789] [38865:6578589] [DMG] Attribute = 0x0000_0000, + [1690220086789] [38865:6578589] [DMG] } + [1690220086789] [38865:6578589] [DMG] + [1690220086789] [38865:6578589] [DMG] Data = 1, + [1690220086789] [38865:6578589] [DMG] }, + [1690220086789] [38865:6578589] [DMG] + [1690220086789] [38865:6578589] [DMG] }, + [1690220086789] [38865:6578589] [DMG] + [1690220086789] [38865:6578589] [DMG] ], + [1690220086789] [38865:6578589] [DMG] + [1690220086789] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220086789] [38865:6578589] [DMG] } + [1690220086789] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629601 + [1690220086789] [38865:6578589] [TOO] WindowStatus: 1 + [1690220086789] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690220086789] [38865:6578589] [EM] <<< [E:50743r S:35778 M:151592247 (Ack:264355203)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220086789] [38865:6578589] [IN] (S) Sending msg 151592247 on secure session with LSID: 35778 + [1690220086793] [38865:6578589] [EM] >>> [E:50744r S:35778 M:264355204] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220086793] [38865:6578589] [EM] Handling via exchange: 50744r, Delegate: 0x1013c4be0 + [1690220086793] [38865:6578589] [DMG] ReportDataMessage = + [1690220086793] [38865:6578589] [DMG] { + [1690220086793] [38865:6578589] [DMG] SubscriptionId = 0x35250b41, + [1690220086793] [38865:6578589] [DMG] AttributeReportIBs = + [1690220086793] [38865:6578589] [DMG] [ + [1690220086793] [38865:6578589] [DMG] AttributeReportIB = + [1690220086793] [38865:6578589] [DMG] { + [1690220086793] [38865:6578589] [DMG] AttributeDataIB = + [1690220086793] [38865:6578589] [DMG] { + [1690220086793] [38865:6578589] [DMG] DataVersion = 0x1fddcce1, + [1690220086793] [38865:6578589] [DMG] AttributePathIB = + [1690220086794] [38865:6578589] [DMG] { + [1690220086794] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220086794] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220086794] [38865:6578589] [DMG] Attribute = 0x0000_0001, + [1690220086794] [38865:6578589] [DMG] } + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] Data = 1, + [1690220086794] [38865:6578589] [DMG] }, + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] }, + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] ], + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220086794] [38865:6578589] [DMG] } + [1690220086794] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629601 + [1690220086794] [38865:6578589] [TOO] AdminFabricIndex: 1 + [1690220086794] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690220086794] [38865:6578589] [EM] <<< [E:50744r S:35778 M:151592248 (Ack:264355204)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220086794] [38865:6578589] [IN] (S) Sending msg 151592248 on secure session with LSID: 35778 + [1690220086794] [38865:6578589] [EM] >>> [E:50745r S:35778 M:264355205] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220086794] [38865:6578589] [EM] Handling via exchange: 50745r, Delegate: 0x1013c4be0 + [1690220086794] [38865:6578589] [DMG] ReportDataMessage = + [1690220086794] [38865:6578589] [DMG] { + [1690220086794] [38865:6578589] [DMG] SubscriptionId = 0xd3c6ff91, + [1690220086794] [38865:6578589] [DMG] AttributeReportIBs = + [1690220086794] [38865:6578589] [DMG] [ + [1690220086794] [38865:6578589] [DMG] AttributeReportIB = + [1690220086794] [38865:6578589] [DMG] { + [1690220086794] [38865:6578589] [DMG] AttributeDataIB = + [1690220086794] [38865:6578589] [DMG] { + [1690220086794] [38865:6578589] [DMG] DataVersion = 0x1fddcce1, + [1690220086794] [38865:6578589] [DMG] AttributePathIB = + [1690220086794] [38865:6578589] [DMG] { + [1690220086794] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220086794] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220086794] [38865:6578589] [DMG] Attribute = 0x0000_0002, + [1690220086794] [38865:6578589] [DMG] } + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] Data = 65521, + [1690220086794] [38865:6578589] [DMG] }, + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] }, + [1690220086795] [38865:6578589] [DMG] + [1690220086795] [38865:6578589] [DMG] ], + [1690220086795] [38865:6578589] [DMG] + [1690220086795] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220086795] [38865:6578589] [DMG] } + [1690220086795] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629601 + [1690220086795] [38865:6578589] [TOO] AdminVendorId: 65521 + [1690220086795] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690220086795] [38865:6578589] [EM] <<< [E:50745r S:35778 M:151592249 (Ack:264355205)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 14: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + + ReportDataMessage = + [1690220086799] [38880:6583668] [DMG] { + [1690220086799] [38880:6583668] [DMG] SubscriptionId = 0xfab5d837, + [1690220086799] [38880:6583668] [DMG] AttributeReportIBs = + [1690220086799] [38880:6583668] [DMG] [ + [1690220086799] [38880:6583668] [DMG] AttributeReportIB = + [1690220086799] [38880:6583668] [DMG] { + [1690220086799] [38880:6583668] [DMG] AttributeDataIB = + [1690220086799] [38880:6583668] [DMG] { + [1690220086799] [38880:6583668] [DMG] DataVersion = 0x1fddcce1, + [1690220086799] [38880:6583668] [DMG] AttributePathIB = + [1690220086799] [38880:6583668] [DMG] { + [1690220086799] [38880:6583668] [DMG] Endpoint = 0x0, + [1690220086799] [38880:6583668] [DMG] Cluster = 0x3c, + [1690220086799] [38880:6583668] [DMG] Attribute = 0x0000_0000, + [1690220086799] [38880:6583668] [DMG] } + [1690220086799] [38880:6583668] [DMG] + [1690220086799] [38880:6583668] [DMG] Data = 1, + [1690220086799] [38880:6583668] [DMG] }, + [1690220086799] [38880:6583668] [DMG] + [1690220086799] [38880:6583668] [DMG] }, + [1690220086799] [38880:6583668] [DMG] + [1690220086799] [38880:6583668] [DMG] ], + [1690220086799] [38880:6583668] [DMG] + [1690220086799] [38880:6583668] [DMG] InteractionModelRevision = 1 + [1690220086799] [38880:6583668] [DMG] } + [1690220086800] [38880:6583668] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629601 + [1690220086800] [38880:6583668] [TOO] WindowStatus: 1 + [1690220086800] [38880:6583668] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfab5d837 Peer = 02:0000000000000001 + [1690220086800] [38880:6583668] [EM] <<< [E:50746r S:15324 M:785247 (Ack:104911015)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220086800] [38880:6583668] [IN] (S) Sending msg 785247 on secure session with LSID: 15324 + [1690220086806] [38880:6583668] [EM] >>> [E:50747r S:15324 M:104911016] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220086806] [38880:6583668] [EM] Handling via exchange: 50747r, Delegate: 0x1035c8be0 + [1690220086806] [38880:6583668] [DMG] ReportDataMessage = + [1690220086806] [38880:6583668] [DMG] { + [1690220086806] [38880:6583668] [DMG] SubscriptionId = 0x5984e13a, + [1690220086806] [38880:6583668] [DMG] AttributeReportIBs = + [1690220086806] [38880:6583668] [DMG] [ + [1690220086806] [38880:6583668] [DMG] AttributeReportIB = + [1690220086806] [38880:6583668] [DMG] { + [1690220086806] [38880:6583668] [DMG] AttributeDataIB = + [1690220086806] [38880:6583668] [DMG] { + [1690220086806] [38880:6583668] [DMG] DataVersion = 0x1fddcce1, + [1690220086806] [38880:6583668] [DMG] AttributePathIB = + [1690220086806] [38880:6583668] [DMG] { + [1690220086806] [38880:6583668] [DMG] Endpoint = 0x0, + [1690220086806] [38880:6583668] [DMG] Cluster = 0x3c, + [1690220086806] [38880:6583668] [DMG] Attribute = 0x0000_0001, + [1690220086807] [38880:6583668] [DMG] } + [1690220086807] [38880:6583668] [DMG] + [1690220086807] [38880:6583668] [DMG] Data = 1, + [1690220086807] [38880:6583668] [DMG] }, + [1690220086807] [38880:6583668] [DMG] + [1690220086807] [38880:6583668] [DMG] }, + [1690220086807] [38880:6583668] [DMG] + [1690220086807] [38880:6583668] [DMG] ], + [1690220086807] [38880:6583668] [DMG] + [1690220086807] [38880:6583668] [DMG] InteractionModelRevision = 1 + [1690220086807] [38880:6583668] [DMG] } + [1690220086807] [38880:6583668] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629601 + [1690220086807] [38880:6583668] [TOO] AdminFabricIndex: 1 + [1690220086807] [38880:6583668] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x5984e13a Peer = 02:0000000000000001 + [1690220086807] [38880:6583668] [EM] <<< [E:50747r S:15324 M:785248 (Ack:104911016)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220086807] [38880:6583668] [IN] (S) Sending msg 785248 on secure session with LSID: 15324 + [1690220086811] [38880:6583668] [EM] >>> [E:50748r S:15324 M:104911017] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220086811] [38880:6583668] [EM] Handling via exchange: 50748r, Delegate: 0x1035c8be0 + [1690220086811] [38880:6583668] [DMG] ReportDataMessage = + [1690220086811] [38880:6583668] [DMG] { + [1690220086811] [38880:6583668] [DMG] SubscriptionId = 0x943b5fc3, + [1690220086811] [38880:6583668] [DMG] AttributeReportIBs = + [1690220086811] [38880:6583668] [DMG] [ + [1690220086811] [38880:6583668] [DMG] AttributeReportIB = + [1690220086811] [38880:6583668] [DMG] { + [1690220086811] [38880:6583668] [DMG] AttributeDataIB = + [1690220086811] [38880:6583668] [DMG] { + [1690220086811] [38880:6583668] [DMG] DataVersion = 0x1fddcce1, + [1690220086811] [38880:6583668] [DMG] AttributePathIB = + [1690220086811] [38880:6583668] [DMG] { + [1690220086811] [38880:6583668] [DMG] Endpoint = 0x0, + [1690220086811] [38880:6583668] [DMG] Cluster = 0x3c, + [1690220086811] [38880:6583668] [DMG] Attribute = 0x0000_0002, + [1690220086811] [38880:6583668] [DMG] } + [1690220086811] [38880:6583668] [DMG] + [1690220086811] [38880:6583668] [DMG] Data = 65521, + [1690220086811] [38880:6583668] [DMG] }, + [1690220086812] [38880:6583668] [DMG] + [1690220086812] [38880:6583668] [DMG] }, + [1690220086812] [38880:6583668] [DMG] + [1690220086812] [38880:6583668] [DMG] ], + [1690220086812] [38880:6583668] [DMG] + [1690220086812] [38880:6583668] [DMG] InteractionModelRevision = 1 + [1690220086812] [38880:6583668] [DMG] } + [1690220086812] [38880:6583668] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629601 + [1690220086812] [38880:6583668] [TOO] AdminVendorId: 65521 + [1690220086812] [38880:6583668] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x943b5fc3 Peer = 02:0000000000000001 + [1690220086812] [38880:6583668] [EM] <<< [E:50748r S:15324 M:785249 (Ack:104911017)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 15: TH_CR1 revokes the commissioning window on DUT_CE using + RevokeCommissioning command" + PICS: CADMIN.S.C02.Rsp + verification: | + In interactive mode of TH_CR1, send command to revoke commissioning window + + administratorcommissioning revoke-commissioning 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + Verify TH_CR1 logs for status code 0 (success), + + InvokeResponseMessage = + [1690220246114] [38865:6578589] [DMG] { + [1690220246114] [38865:6578589] [DMG] suppressResponse = false, + [1690220246114] [38865:6578589] [DMG] InvokeResponseIBs = + [1690220246114] [38865:6578589] [DMG] [ + [1690220246114] [38865:6578589] [DMG] InvokeResponseIB = + [1690220246114] [38865:6578589] [DMG] { + [1690220246114] [38865:6578589] [DMG] CommandStatusIB = + [1690220246114] [38865:6578589] [DMG] { + [1690220246114] [38865:6578589] [DMG] CommandPathIB = + [1690220246114] [38865:6578589] [DMG] { + [1690220246114] [38865:6578589] [DMG] EndpointId = 0x0, + [1690220246114] [38865:6578589] [DMG] ClusterId = 0x3c, + [1690220246114] [38865:6578589] [DMG] CommandId = 0x2, + [1690220246114] [38865:6578589] [DMG] }, + [1690220246114] [38865:6578589] [DMG] + [1690220246114] [38865:6578589] [DMG] StatusIB = + [1690220246114] [38865:6578589] [DMG] { + [1690220246114] [38865:6578589] [DMG] status = 0x00 (SUCCESS), + [1690220246114] [38865:6578589] [DMG] }, + [1690220246114] [38865:6578589] [DMG] + [1690220246114] [38865:6578589] [DMG] }, + [1690220246114] [38865:6578589] [DMG] + [1690220246114] [38865:6578589] [DMG] }, + [1690220246114] [38865:6578589] [DMG] + [1690220246114] [38865:6578589] [DMG] ], + [1690220246114] [38865:6578589] [DMG] + [1690220246114] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220246114] [38865:6578589] [DMG] }, + [1690220246114] [38865:6578589] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 Status=0x0 + [1690220246114] [38865:6578589] [DMG] ICR moving to [AwaitingDe] + [1690220246114] [38865:6578589] [EM] <<< [E:27146i S:35778 M:151592252 (Ack:264355210)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 16: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + + ReportDataMessage = + [1690220246116] [38865:6578589] [DMG] { + [1690220246116] [38865:6578589] [DMG] SubscriptionId = 0xdade5274, + [1690220246116] [38865:6578589] [DMG] AttributeReportIBs = + [1690220246116] [38865:6578589] [DMG] [ + [1690220246116] [38865:6578589] [DMG] AttributeReportIB = + [1690220246116] [38865:6578589] [DMG] { + [1690220246116] [38865:6578589] [DMG] AttributeDataIB = + [1690220246116] [38865:6578589] [DMG] { + [1690220246116] [38865:6578589] [DMG] DataVersion = 0x1fddcce4, + [1690220246116] [38865:6578589] [DMG] AttributePathIB = + [1690220246116] [38865:6578589] [DMG] { + [1690220246116] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220246116] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220246116] [38865:6578589] [DMG] Attribute = 0x0000_0000, + [1690220246116] [38865:6578589] [DMG] } + [1690220246117] [38865:6578589] [DMG] + [1690220246117] [38865:6578589] [DMG] Data = 0, + [1690220246117] [38865:6578589] [DMG] }, + [1690220246117] [38865:6578589] [DMG] + [1690220246117] [38865:6578589] [DMG] }, + [1690220246117] [38865:6578589] [DMG] + [1690220246117] [38865:6578589] [DMG] ], + [1690220246117] [38865:6578589] [DMG] + [1690220246117] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220246117] [38865:6578589] [DMG] } + [1690220246117] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629604 + [1690220246117] [38865:6578589] [TOO] WindowStatus: 0 + [1690220246117] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690220246117] [38865:6578589] [EM] <<< [E:50749r S:35778 M:151592253 (Ack:264355211)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220246117] [38865:6578589] [IN] (S) Sending msg 151592253 on secure session with LSID: 35778 + [1690220246120] [38865:6578589] [EM] >>> [E:50750r S:35778 M:264355212] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220246120] [38865:6578589] [EM] Handling via exchange: 50750r, Delegate: 0x1013c4be0 + [1690220246120] [38865:6578589] [DMG] ReportDataMessage = + [1690220246120] [38865:6578589] [DMG] { + [1690220246120] [38865:6578589] [DMG] SubscriptionId = 0x35250b41, + [1690220246120] [38865:6578589] [DMG] AttributeReportIBs = + [1690220246120] [38865:6578589] [DMG] [ + [1690220246120] [38865:6578589] [DMG] AttributeReportIB = + [1690220246120] [38865:6578589] [DMG] { + [1690220246120] [38865:6578589] [DMG] AttributeDataIB = + [1690220246120] [38865:6578589] [DMG] { + [1690220246120] [38865:6578589] [DMG] DataVersion = 0x1fddcce4, + [1690220246120] [38865:6578589] [DMG] AttributePathIB = + [1690220246120] [38865:6578589] [DMG] { + [1690220246120] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220246120] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220246120] [38865:6578589] [DMG] Attribute = 0x0000_0001, + [1690220246120] [38865:6578589] [DMG] } + [1690220246120] [38865:6578589] [DMG] + [1690220246120] [38865:6578589] [DMG] Data = NULL + [1690220246120] [38865:6578589] [DMG] }, + [1690220246120] [38865:6578589] [DMG] + [1690220246120] [38865:6578589] [DMG] }, + [1690220246120] [38865:6578589] [DMG] + [1690220246120] [38865:6578589] [DMG] ], + [1690220246120] [38865:6578589] [DMG] + [1690220246120] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220246120] [38865:6578589] [DMG] } + [1690220246120] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629604 + [1690220246120] [38865:6578589] [TOO] AdminFabricIndex: null + [1690220246120] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690220246120] [38865:6578589] [EM] <<< [E:50750r S:35778 M:151592254 (Ack:264355212)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220246120] [38865:6578589] [IN] (S) Sending msg 151592254 on secure session with LSID: 35778 + [1690220246123] [38865:6578589] [EM] >>> [E:50751r S:35778 M:264355213] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220246123] [38865:6578589] [EM] Handling via exchange: 50751r, Delegate: 0x1013c4be0 + [1690220246123] [38865:6578589] [DMG] ReportDataMessage = + [1690220246123] [38865:6578589] [DMG] { + [1690220246123] [38865:6578589] [DMG] SubscriptionId = 0xd3c6ff91, + [1690220246123] [38865:6578589] [DMG] AttributeReportIBs = + [1690220246123] [38865:6578589] [DMG] [ + [1690220246123] [38865:6578589] [DMG] AttributeReportIB = + [1690220246123] [38865:6578589] [DMG] { + [1690220246123] [38865:6578589] [DMG] AttributeDataIB = + [1690220246123] [38865:6578589] [DMG] { + [1690220246123] [38865:6578589] [DMG] DataVersion = 0x1fddcce4, + [1690220246123] [38865:6578589] [DMG] AttributePathIB = + [1690220246123] [38865:6578589] [DMG] { + [1690220246123] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220246123] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220246123] [38865:6578589] [DMG] Attribute = 0x0000_0002, + [1690220246123] [38865:6578589] [DMG] } + [1690220246123] [38865:6578589] [DMG] + [1690220246123] [38865:6578589] [DMG] Data = NULL + [1690220246123] [38865:6578589] [DMG] }, + [1690220246123] [38865:6578589] [DMG] + [1690220246123] [38865:6578589] [DMG] }, + [1690220246123] [38865:6578589] [DMG] + [1690220246123] [38865:6578589] [DMG] ], + [1690220246123] [38865:6578589] [DMG] + [1690220246123] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220246123] [38865:6578589] [DMG] } + [1690220246123] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629604 + [1690220246123] [38865:6578589] [TOO] AdminVendorId: null + [1690220246123] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690220246123] [38865:6578589] [EM] <<< [E:50751r S:35778 M:151592255 (Ack:264355213)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 17: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + ReportDataMessage = + [1690220246125] [38880:6584521] [DMG] { + [1690220246125] [38880:6584521] [DMG] SubscriptionId = 0xfab5d837, + [1690220246125] [38880:6584521] [DMG] AttributeReportIBs = + [1690220246125] [38880:6584521] [DMG] [ + [1690220246125] [38880:6584521] [DMG] AttributeReportIB = + [1690220246125] [38880:6584521] [DMG] { + [1690220246125] [38880:6584521] [DMG] AttributeDataIB = + [1690220246125] [38880:6584521] [DMG] { + [1690220246125] [38880:6584521] [DMG] DataVersion = 0x1fddcce4, + [1690220246125] [38880:6584521] [DMG] AttributePathIB = + [1690220246125] [38880:6584521] [DMG] { + [1690220246125] [38880:6584521] [DMG] Endpoint = 0x0, + [1690220246125] [38880:6584521] [DMG] Cluster = 0x3c, + [1690220246125] [38880:6584521] [DMG] Attribute = 0x0000_0000, + [1690220246125] [38880:6584521] [DMG] } + [1690220246125] [38880:6584521] [DMG] + [1690220246125] [38880:6584521] [DMG] Data = 0, + [1690220246125] [38880:6584521] [DMG] }, + [1690220246125] [38880:6584521] [DMG] + [1690220246125] [38880:6584521] [DMG] }, + [1690220246125] [38880:6584521] [DMG] + [1690220246125] [38880:6584521] [DMG] ], + [1690220246125] [38880:6584521] [DMG] + [1690220246125] [38880:6584521] [DMG] InteractionModelRevision = 1 + [1690220246125] [38880:6584521] [DMG] } + [1690220246125] [38880:6584521] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629604 + [1690220246125] [38880:6584521] [TOO] WindowStatus: 0 + [1690220246125] [38880:6584521] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfab5d837 Peer = 02:0000000000000001 + [1690220246125] [38880:6584521] [EM] <<< [E:50752r S:15324 M:785250 (Ack:104911021)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220246125] [38880:6584521] [IN] (S) Sending msg 785250 on secure session with LSID: 15324 + [1690220246148] [38880:6584521] [EM] >>> [E:50753r S:15324 M:104911022] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220246148] [38880:6584521] [EM] Handling via exchange: 50753r, Delegate: 0x1035c8be0 + [1690220246148] [38880:6584521] [DMG] ReportDataMessage = + [1690220246148] [38880:6584521] [DMG] { + [1690220246148] [38880:6584521] [DMG] SubscriptionId = 0x5984e13a, + [1690220246148] [38880:6584521] [DMG] AttributeReportIBs = + [1690220246148] [38880:6584521] [DMG] [ + [1690220246148] [38880:6584521] [DMG] AttributeReportIB = + [1690220246148] [38880:6584521] [DMG] { + [1690220246148] [38880:6584521] [DMG] AttributeDataIB = + [1690220246148] [38880:6584521] [DMG] { + [1690220246148] [38880:6584521] [DMG] DataVersion = 0x1fddcce4, + [1690220246148] [38880:6584521] [DMG] AttributePathIB = + [1690220246148] [38880:6584521] [DMG] { + [1690220246148] [38880:6584521] [DMG] Endpoint = 0x0, + [1690220246148] [38880:6584521] [DMG] Cluster = 0x3c, + [1690220246148] [38880:6584521] [DMG] Attribute = 0x0000_0001, + [1690220246148] [38880:6584521] [DMG] } + [1690220246148] [38880:6584521] [DMG] + [1690220246148] [38880:6584521] [DMG] Data = NULL + [1690220246148] [38880:6584521] [DMG] }, + [1690220246148] [38880:6584521] [DMG] + [1690220246148] [38880:6584521] [DMG] }, + [1690220246148] [38880:6584521] [DMG] + [1690220246148] [38880:6584521] [DMG] ], + [1690220246148] [38880:6584521] [DMG] + [1690220246148] [38880:6584521] [DMG] InteractionModelRevision = 1 + [1690220246148] [38880:6584521] [DMG] } + [1690220246149] [38880:6584521] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629604 + [1690220246149] [38880:6584521] [TOO] AdminFabricIndex: null + [1690220246149] [38880:6584521] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x5984e13a Peer = 02:0000000000000001 + [1690220246149] [38880:6584521] [EM] <<< [E:50753r S:15324 M:785251 (Ack:104911022)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220246149] [38880:6584521] [IN] (S) Sending msg 785251 on secure session with LSID: 15324 + [1690220246155] [38880:6584521] [EM] >>> [E:50754r S:15324 M:104911023] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220246155] [38880:6584521] [EM] Handling via exchange: 50754r, Delegate: 0x1035c8be0 + [1690220246155] [38880:6584521] [DMG] ReportDataMessage = + [1690220246155] [38880:6584521] [DMG] { + [1690220246155] [38880:6584521] [DMG] SubscriptionId = 0x943b5fc3, + [1690220246155] [38880:6584521] [DMG] AttributeReportIBs = + [1690220246155] [38880:6584521] [DMG] [ + [1690220246155] [38880:6584521] [DMG] AttributeReportIB = + [1690220246155] [38880:6584521] [DMG] { + [1690220246155] [38880:6584521] [DMG] AttributeDataIB = + [1690220246155] [38880:6584521] [DMG] { + [1690220246155] [38880:6584521] [DMG] DataVersion = 0x1fddcce4, + [1690220246155] [38880:6584521] [DMG] AttributePathIB = + [1690220246155] [38880:6584521] [DMG] { + [1690220246155] [38880:6584521] [DMG] Endpoint = 0x0, + [1690220246155] [38880:6584521] [DMG] Cluster = 0x3c, + [1690220246155] [38880:6584521] [DMG] Attribute = 0x0000_0002, + [1690220246155] [38880:6584521] [DMG] } + [1690220246155] [38880:6584521] [DMG] + [1690220246155] [38880:6584521] [DMG] Data = NULL + [1690220246155] [38880:6584521] [DMG] }, + [1690220246155] [38880:6584521] [DMG] + [1690220246155] [38880:6584521] [DMG] }, + [1690220246155] [38880:6584521] [DMG] + [1690220246155] [38880:6584521] [DMG] ], + [1690220246155] [38880:6584521] [DMG] + [1690220246155] [38880:6584521] [DMG] InteractionModelRevision = 1 + [1690220246155] [38880:6584521] [DMG] } + [1690220246155] [38880:6584521] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629604 + [1690220246155] [38880:6584521] [TOO] AdminVendorId: null + [1690220246155] [38880:6584521] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x943b5fc3 Peer = 02:0000000000000001 + [1690220246155] [38880:6584521] [EM] <<< [E:50754r S:15324 M:785252 (Ack:104911023)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 18: TH_CR2 opens a commissioning window on DUT_CE using ECM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C00.Rsp + verification: | + In interactive mode of TH_CR2, send command to open commissioning window using ECM + + pairing open-commissioning-window 1 1 180 1000 3840 --commissioner-name beta + + On TH_CR2 logs, verify for commissioning window to be open + + InvokeResponseMessage = + [1690220435293] [38880:6589609] [DMG] { + [1690220435293] [38880:6589609] [DMG] suppressResponse = false, + [1690220435293] [38880:6589609] [DMG] InvokeResponseIBs = + [1690220435293] [38880:6589609] [DMG] [ + [1690220435293] [38880:6589609] [DMG] InvokeResponseIB = + [1690220435293] [38880:6589609] [DMG] { + [1690220435293] [38880:6589609] [DMG] CommandStatusIB = + [1690220435293] [38880:6589609] [DMG] { + [1690220435293] [38880:6589609] [DMG] CommandPathIB = + [1690220435293] [38880:6589609] [DMG] { + [1690220435293] [38880:6589609] [DMG] EndpointId = 0x0, + [1690220435293] [38880:6589609] [DMG] ClusterId = 0x3c, + [1690220435293] [38880:6589609] [DMG] CommandId = 0x0, + [1690220435293] [38880:6589609] [DMG] }, + [1690220435293] [38880:6589609] [DMG] + [1690220435293] [38880:6589609] [DMG] StatusIB = + [1690220435293] [38880:6589609] [DMG] { + [1690220435293] [38880:6589609] [DMG] status = 0x00 (SUCCESS), + [1690220435293] [38880:6589609] [DMG] }, + [1690220435293] [38880:6589609] [DMG] + [1690220435293] [38880:6589609] [DMG] }, + [1690220435293] [38880:6589609] [DMG] + [1690220435293] [38880:6589609] [DMG] }, + [1690220435293] [38880:6589609] [DMG] + [1690220435293] [38880:6589609] [DMG] ], + [1690220435293] [38880:6589609] [DMG] + [1690220435293] [38880:6589609] [DMG] InteractionModelRevision = 1 + [1690220435293] [38880:6589609] [DMG] }, + [1690220435293] [38880:6589609] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1690220435293] [38880:6589609] [CTL] Successfully opened pairing window on the device + [1690220435293] [38880:6589609] [CTL] Manual pairing code: [35064347684] + [1690220435293] [38880:6589609] [CTL] SetupQRCode: [MT:-24J0AFN00Y.YD0SO10] + [1690220435293] [38880:6589609] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 19: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690220515981] [38865:6587066] [DMG] { + [1690220515981] [38865:6587066] [DMG] SubscriptionId = 0xdade5274, + [1690220515981] [38865:6587066] [DMG] AttributeReportIBs = + [1690220515981] [38865:6587066] [DMG] [ + [1690220515981] [38865:6587066] [DMG] AttributeReportIB = + [1690220515981] [38865:6587066] [DMG] { + [1690220515981] [38865:6587066] [DMG] AttributeDataIB = + [1690220515981] [38865:6587066] [DMG] { + [1690220515981] [38865:6587066] [DMG] DataVersion = 0x1fddcced, + [1690220515981] [38865:6587066] [DMG] AttributePathIB = + [1690220515981] [38865:6587066] [DMG] { + [1690220515981] [38865:6587066] [DMG] Endpoint = 0x0, + [1690220515981] [38865:6587066] [DMG] Cluster = 0x3c, + [1690220515981] [38865:6587066] [DMG] Attribute = 0x0000_0000, + [1690220515981] [38865:6587066] [DMG] } + [1690220515981] [38865:6587066] [DMG] + [1690220515981] [38865:6587066] [DMG] Data = 1, + [1690220515981] [38865:6587066] [DMG] }, + [1690220515981] [38865:6587066] [DMG] + [1690220515981] [38865:6587066] [DMG] }, + [1690220515981] [38865:6587066] [DMG] + [1690220515981] [38865:6587066] [DMG] ], + [1690220515981] [38865:6587066] [DMG] + [1690220515981] [38865:6587066] [DMG] InteractionModelRevision = 1 + [1690220515981] [38865:6587066] [DMG] } + [1690220515981] [38865:6587066] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629613 + [1690220515981] [38865:6587066] [TOO] WindowStatus: 1 + [1690220515981] [38865:6587066] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690220515982] [38865:6587066] [EM] <<< [E:50767r S:35778 M:151592262 (Ack:264355229)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220515982] [38865:6587066] [IN] (S) Sending msg 151592262 on secure session with LSID: 35778 + [1690220515991] [38865:6587066] [EM] >>> [E:50768r S:35778 M:264355230] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220515991] [38865:6587066] [EM] Handling via exchange: 50768r, Delegate: 0x1013c4be0 + [1690220515991] [38865:6587066] [DMG] ReportDataMessage = + [1690220515991] [38865:6587066] [DMG] { + [1690220515991] [38865:6587066] [DMG] SubscriptionId = 0x35250b41, + [1690220515991] [38865:6587066] [DMG] AttributeReportIBs = + [1690220515991] [38865:6587066] [DMG] [ + [1690220515991] [38865:6587066] [DMG] AttributeReportIB = + [1690220515992] [38865:6587066] [DMG] { + [1690220515992] [38865:6587066] [DMG] AttributeDataIB = + [1690220515992] [38865:6587066] [DMG] { + [1690220515992] [38865:6587066] [DMG] DataVersion = 0x1fddcced, + [1690220515992] [38865:6587066] [DMG] AttributePathIB = + [1690220515992] [38865:6587066] [DMG] { + [1690220515992] [38865:6587066] [DMG] Endpoint = 0x0, + [1690220515992] [38865:6587066] [DMG] Cluster = 0x3c, + [1690220515992] [38865:6587066] [DMG] Attribute = 0x0000_0001, + [1690220515992] [38865:6587066] [DMG] } + [1690220515992] [38865:6587066] [DMG] + [1690220515992] [38865:6587066] [DMG] Data = 2, + [1690220515992] [38865:6587066] [DMG] }, + [1690220515992] [38865:6587066] [DMG] + [1690220515992] [38865:6587066] [DMG] }, + [1690220515992] [38865:6587066] [DMG] + [1690220515992] [38865:6587066] [DMG] ], + [1690220515992] [38865:6587066] [DMG] + [1690220515992] [38865:6587066] [DMG] InteractionModelRevision = 1 + [1690220515992] [38865:6587066] [DMG] } + [1690220515992] [38865:6587066] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629613 + [1690220515992] [38865:6587066] [TOO] AdminFabricIndex: 2 + [1690220515992] [38865:6587066] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690220515992] [38865:6587066] [EM] <<< [E:50768r S:35778 M:151592263 (Ack:264355230)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220515993] [38865:6587066] [IN] (S) Sending msg 151592263 on secure session with LSID: 35778 + [1690220515993] [38865:6587066] [EM] >>> [E:50769r S:35778 M:264355231] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220515993] [38865:6587066] [EM] Handling via exchange: 50769r, Delegate: 0x1013c4be0 + [1690220515993] [38865:6587066] [DMG] ReportDataMessage = + [1690220515993] [38865:6587066] [DMG] { + [1690220515993] [38865:6587066] [DMG] SubscriptionId = 0xd3c6ff91, + [1690220515993] [38865:6587066] [DMG] AttributeReportIBs = + [1690220515993] [38865:6587066] [DMG] [ + [1690220515993] [38865:6587066] [DMG] AttributeReportIB = + [1690220515993] [38865:6587066] [DMG] { + [1690220515993] [38865:6587066] [DMG] AttributeDataIB = + [1690220515993] [38865:6587066] [DMG] { + [1690220515994] [38865:6587066] [DMG] DataVersion = 0x1fddcced, + [1690220515994] [38865:6587066] [DMG] AttributePathIB = + [1690220515994] [38865:6587066] [DMG] { + [1690220515994] [38865:6587066] [DMG] Endpoint = 0x0, + [1690220515994] [38865:6587066] [DMG] Cluster = 0x3c, + [1690220515994] [38865:6587066] [DMG] Attribute = 0x0000_0002, + [1690220515994] [38865:6587066] [DMG] } + [1690220515994] [38865:6587066] [DMG] + [1690220515994] [38865:6587066] [DMG] Data = 65521, + [1690220515994] [38865:6587066] [DMG] }, + [1690220515994] [38865:6587066] [DMG] + [1690220515994] [38865:6587066] [DMG] }, + [1690220515994] [38865:6587066] [DMG] + [1690220515994] [38865:6587066] [DMG] ], + [1690220515994] [38865:6587066] [DMG] + [1690220515994] [38865:6587066] [DMG] InteractionModelRevision = 1 + [1690220515994] [38865:6587066] [DMG] } + [1690220515994] [38865:6587066] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629613 + [1690220515994] [38865:6587066] [TOO] AdminVendorId: 65521 + [1690220515994] [38865:6587066] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690220515994] [38865:6587066] [EM] <<< [E:50769r S:35778 M:151592264 (Ack:264355231)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 20: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690220515997] [38880:6590520] [DMG] { + [1690220515997] [38880:6590520] [DMG] SubscriptionId = 0xfab5d837, + [1690220515997] [38880:6590520] [DMG] AttributeReportIBs = + [1690220515997] [38880:6590520] [DMG] [ + [1690220515997] [38880:6590520] [DMG] AttributeReportIB = + [1690220515997] [38880:6590520] [DMG] { + [1690220515997] [38880:6590520] [DMG] AttributeDataIB = + [1690220515997] [38880:6590520] [DMG] { + [1690220515997] [38880:6590520] [DMG] DataVersion = 0x1fddcced, + [1690220515997] [38880:6590520] [DMG] AttributePathIB = + [1690220515997] [38880:6590520] [DMG] { + [1690220515997] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220515997] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220515997] [38880:6590520] [DMG] Attribute = 0x0000_0000, + [1690220515997] [38880:6590520] [DMG] } + [1690220515997] [38880:6590520] [DMG] + [1690220515997] [38880:6590520] [DMG] Data = 1, + [1690220515997] [38880:6590520] [DMG] }, + [1690220515997] [38880:6590520] [DMG] + [1690220515997] [38880:6590520] [DMG] }, + [1690220515997] [38880:6590520] [DMG] + [1690220515997] [38880:6590520] [DMG] ], + [1690220515997] [38880:6590520] [DMG] + [1690220515997] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220515997] [38880:6590520] [DMG] } + [1690220515997] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629613 + [1690220515997] [38880:6590520] [TOO] WindowStatus: 1 + [1690220515997] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfab5d837 Peer = 02:0000000000000001 + [1690220515997] [38880:6590520] [EM] <<< [E:50770r S:15324 M:785276 (Ack:104911049)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220515997] [38880:6590520] [IN] (S) Sending msg 785276 on secure session with LSID: 15324 + [1690220516007] [38880:6590520] [EM] >>> [E:50770r S:15324 M:104911050 (Ack:785276)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220516007] [38880:6590520] [EM] Found matching exchange: 50770r, Delegate: 0x0 + [1690220516007] [38880:6590520] [EM] Rxd Ack; Removing MessageCounter:785276 from Retrans Table on exchange 50770r + [1690220516013] [38880:6590520] [EM] >>> [E:50771r S:15324 M:104911051] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220516013] [38880:6590520] [EM] Handling via exchange: 50771r, Delegate: 0x1035c8be0 + [1690220516013] [38880:6590520] [DMG] ReportDataMessage = + [1690220516013] [38880:6590520] [DMG] { + [1690220516013] [38880:6590520] [DMG] SubscriptionId = 0x5984e13a, + [1690220516013] [38880:6590520] [DMG] AttributeReportIBs = + [1690220516013] [38880:6590520] [DMG] [ + [1690220516013] [38880:6590520] [DMG] AttributeReportIB = + [1690220516013] [38880:6590520] [DMG] { + [1690220516013] [38880:6590520] [DMG] AttributeDataIB = + [1690220516013] [38880:6590520] [DMG] { + [1690220516013] [38880:6590520] [DMG] DataVersion = 0x1fddcced, + [1690220516013] [38880:6590520] [DMG] AttributePathIB = + [1690220516013] [38880:6590520] [DMG] { + [1690220516013] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220516013] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220516013] [38880:6590520] [DMG] Attribute = 0x0000_0001, + [1690220516013] [38880:6590520] [DMG] } + [1690220516013] [38880:6590520] [DMG] + [1690220516013] [38880:6590520] [DMG] Data = 2, + [1690220516013] [38880:6590520] [DMG] }, + [1690220516013] [38880:6590520] [DMG] + [1690220516013] [38880:6590520] [DMG] }, + [1690220516013] [38880:6590520] [DMG] + [1690220516013] [38880:6590520] [DMG] ], + [1690220516013] [38880:6590520] [DMG] + [1690220516013] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220516013] [38880:6590520] [DMG] } + [1690220516013] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629613 + [1690220516013] [38880:6590520] [TOO] AdminFabricIndex: 2 + [1690220516013] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x5984e13a Peer = 02:0000000000000001 + [1690220516013] [38880:6590520] [EM] <<< [E:50771r S:15324 M:785277 (Ack:104911051)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220516013] [38880:6590520] [IN] (S) Sending msg 785277 on secure session with LSID: 15324 + [1690220516020] [38880:6590520] [EM] >>> [E:50772r S:15324 M:104911052] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220516020] [38880:6590520] [EM] Handling via exchange: 50772r, Delegate: 0x1035c8be0 + [1690220516020] [38880:6590520] [DMG] ReportDataMessage = + [1690220516020] [38880:6590520] [DMG] { + [1690220516020] [38880:6590520] [DMG] SubscriptionId = 0x943b5fc3, + [1690220516020] [38880:6590520] [DMG] AttributeReportIBs = + [1690220516020] [38880:6590520] [DMG] [ + [1690220516020] [38880:6590520] [DMG] AttributeReportIB = + [1690220516020] [38880:6590520] [DMG] { + [1690220516020] [38880:6590520] [DMG] AttributeDataIB = + [1690220516020] [38880:6590520] [DMG] { + [1690220516020] [38880:6590520] [DMG] DataVersion = 0x1fddcced, + [1690220516020] [38880:6590520] [DMG] AttributePathIB = + [1690220516020] [38880:6590520] [DMG] { + [1690220516020] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220516020] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220516020] [38880:6590520] [DMG] Attribute = 0x0000_0002, + [1690220516020] [38880:6590520] [DMG] } + [1690220516020] [38880:6590520] [DMG] + [1690220516020] [38880:6590520] [DMG] Data = 65521, + [1690220516020] [38880:6590520] [DMG] }, + [1690220516020] [38880:6590520] [DMG] + [1690220516020] [38880:6590520] [DMG] }, + [1690220516020] [38880:6590520] [DMG] + [1690220516020] [38880:6590520] [DMG] ], + [1690220516020] [38880:6590520] [DMG] + [1690220516020] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220516020] [38880:6590520] [DMG] } + [1690220516020] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629613 + [1690220516020] [38880:6590520] [TOO] AdminVendorId: 65521 + [1690220516020] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x943b5fc3 Peer = 02:0000000000000001 + [1690220516020] [38880:6590520] [EM] <<< [E:50772r S:15324 M:785278 (Ack:104911052)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 21: Wait for the expiration of PIXIT.CADMIN.CwDuration seconds + that is set in step 18" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 18 + disabled: true + + - label: + "Step 22: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + [1690220692636] [38865:6590605] [EM] >>> [E:50773r S:35778 M:264355235] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220692636] [38865:6590605] [EM] Handling via exchange: 50773r, Delegate: 0x1013c4be0 + [1690220692636] [38865:6590605] [DMG] ReportDataMessage = + [1690220692636] [38865:6590605] [DMG] { + [1690220692636] [38865:6590605] [DMG] SubscriptionId = 0xdade5274, + [1690220692636] [38865:6590605] [DMG] AttributeReportIBs = + [1690220692636] [38865:6590605] [DMG] [ + [1690220692636] [38865:6590605] [DMG] AttributeReportIB = + [1690220692636] [38865:6590605] [DMG] { + [1690220692636] [38865:6590605] [DMG] AttributeDataIB = + [1690220692636] [38865:6590605] [DMG] { + [1690220692636] [38865:6590605] [DMG] DataVersion = 0x1fddccf0, + [1690220692636] [38865:6590605] [DMG] AttributePathIB = + [1690220692636] [38865:6590605] [DMG] { + [1690220692636] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220692636] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220692636] [38865:6590605] [DMG] Attribute = 0x0000_0000, + [1690220692636] [38865:6590605] [DMG] } + [1690220692636] [38865:6590605] [DMG] + [1690220692636] [38865:6590605] [DMG] Data = 0, + [1690220692636] [38865:6590605] [DMG] }, + [1690220692636] [38865:6590605] [DMG] + [1690220692636] [38865:6590605] [DMG] }, + [1690220692636] [38865:6590605] [DMG] + [1690220692636] [38865:6590605] [DMG] ], + [1690220692636] [38865:6590605] [DMG] + [1690220692636] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220692636] [38865:6590605] [DMG] } + [1690220692636] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629616 + [1690220692636] [38865:6590605] [TOO] WindowStatus: 0 + [1690220692636] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690220692636] [38865:6590605] [EM] <<< [E:50773r S:35778 M:151592265 (Ack:264355235)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220692636] [38865:6590605] [IN] (S) Sending msg 151592265 on secure session with LSID: 35778 + [1690220692637] [38865:6590605] [EM] >>> [E:50774r S:35778 M:264355236] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220692637] [38865:6590605] [EM] Handling via exchange: 50774r, Delegate: 0x1013c4be0 + [1690220692637] [38865:6590605] [DMG] ReportDataMessage = + [1690220692637] [38865:6590605] [DMG] { + [1690220692637] [38865:6590605] [DMG] SubscriptionId = 0x35250b41, + [1690220692637] [38865:6590605] [DMG] AttributeReportIBs = + [1690220692637] [38865:6590605] [DMG] [ + [1690220692637] [38865:6590605] [DMG] AttributeReportIB = + [1690220692637] [38865:6590605] [DMG] { + [1690220692637] [38865:6590605] [DMG] AttributeDataIB = + [1690220692637] [38865:6590605] [DMG] { + [1690220692637] [38865:6590605] [DMG] DataVersion = 0x1fddccf0, + [1690220692637] [38865:6590605] [DMG] AttributePathIB = + [1690220692637] [38865:6590605] [DMG] { + [1690220692637] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220692637] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220692637] [38865:6590605] [DMG] Attribute = 0x0000_0001, + [1690220692637] [38865:6590605] [DMG] } + [1690220692637] [38865:6590605] [DMG] + [1690220692637] [38865:6590605] [DMG] Data = NULL + [1690220692637] [38865:6590605] [DMG] }, + [1690220692637] [38865:6590605] [DMG] + [1690220692637] [38865:6590605] [DMG] }, + [1690220692637] [38865:6590605] [DMG] + [1690220692637] [38865:6590605] [DMG] ], + [1690220692637] [38865:6590605] [DMG] + [1690220692637] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220692637] [38865:6590605] [DMG] } + [1690220692637] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629616 + [1690220692637] [38865:6590605] [TOO] AdminFabricIndex: null + [1690220692637] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690220692637] [38865:6590605] [EM] <<< [E:50774r S:35778 M:151592266 (Ack:264355236)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220692637] [38865:6590605] [IN] (S) Sending msg 151592266 on secure session with LSID: 35778 + [1690220692641] [38865:6590605] [EM] >>> [E:50775r S:35778 M:264355237] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220692641] [38865:6590605] [EM] Handling via exchange: 50775r, Delegate: 0x1013c4be0 + [1690220692641] [38865:6590605] [DMG] ReportDataMessage = + [1690220692641] [38865:6590605] [DMG] { + [1690220692641] [38865:6590605] [DMG] SubscriptionId = 0xd3c6ff91, + [1690220692641] [38865:6590605] [DMG] AttributeReportIBs = + [1690220692641] [38865:6590605] [DMG] [ + [1690220692641] [38865:6590605] [DMG] AttributeReportIB = + [1690220692641] [38865:6590605] [DMG] { + [1690220692641] [38865:6590605] [DMG] AttributeDataIB = + [1690220692641] [38865:6590605] [DMG] { + [1690220692641] [38865:6590605] [DMG] DataVersion = 0x1fddccf0, + [1690220692641] [38865:6590605] [DMG] AttributePathIB = + [1690220692641] [38865:6590605] [DMG] { + [1690220692641] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220692641] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220692641] [38865:6590605] [DMG] Attribute = 0x0000_0002, + [1690220692641] [38865:6590605] [DMG] } + [1690220692641] [38865:6590605] [DMG] + [1690220692641] [38865:6590605] [DMG] Data = NULL + [1690220692641] [38865:6590605] [DMG] }, + [1690220692641] [38865:6590605] [DMG] + [1690220692641] [38865:6590605] [DMG] }, + [1690220692641] [38865:6590605] [DMG] + [1690220692641] [38865:6590605] [DMG] ], + [1690220692641] [38865:6590605] [DMG] + [1690220692641] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220692641] [38865:6590605] [DMG] } + [1690220692641] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629616 + [1690220692641] [38865:6590605] [TOO] AdminVendorId: null + [1690220692641] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690220692641] [38865:6590605] [EM] <<< [E:50775r S:35778 M:151592267 (Ack:264355237)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220692641] [38865:6590605] [IN] (S) Sending msg 151592267 on secure session with LSID: 35778 + [1690220692658] [38865:6590605] [EM] >>> [E:50773r S:35778 M:264355238 (Ack:151592265)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692658] [38865:6590605] [EM] Found matching exchange: 50773r, Delegate: 0x0 + [1690220692658] [38865:6590605] [EM] Rxd Ack; Removing MessageCounter:151592265 from Retrans Table on exchange 50773r + [1690220692665] [38865:6590605] [EM] >>> [E:50774r S:35778 M:264355239 (Ack:151592266)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692665] [38865:6590605] [EM] Found matching exchange: 50774r, Delegate: 0x0 + [1690220692665] [38865:6590605] [EM] Rxd Ack; Removing MessageCounter:151592266 from Retrans Table on exchange 50774r + [1690220692672] [38865:6590605] [EM] >>> [E:50775r S:35778 M:264355240 (Ack:151592267)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692672] [38865:6590605] [EM] Found matching exchange: 50775r, Delegate: 0x0 + [1690220692672] [38865:6590605] [EM] Rxd Ack; Removing MessageCounter:151592267 from Retrans Table on exchange 50775r + disabled: true + + - label: + "Step 23: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + [1690220692641] [38880:6590520] [EM] >>> [E:50776r S:15324 M:104911055] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220692641] [38880:6590520] [EM] Handling via exchange: 50776r, Delegate: 0x1035c8be0 + [1690220692641] [38880:6590520] [DMG] ReportDataMessage = + [1690220692641] [38880:6590520] [DMG] { + [1690220692641] [38880:6590520] [DMG] SubscriptionId = 0xfab5d837, + [1690220692641] [38880:6590520] [DMG] AttributeReportIBs = + [1690220692641] [38880:6590520] [DMG] [ + [1690220692641] [38880:6590520] [DMG] AttributeReportIB = + [1690220692641] [38880:6590520] [DMG] { + [1690220692641] [38880:6590520] [DMG] AttributeDataIB = + [1690220692641] [38880:6590520] [DMG] { + [1690220692641] [38880:6590520] [DMG] DataVersion = 0x1fddccf0, + [1690220692641] [38880:6590520] [DMG] AttributePathIB = + [1690220692641] [38880:6590520] [DMG] { + [1690220692641] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220692641] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220692641] [38880:6590520] [DMG] Attribute = 0x0000_0000, + [1690220692641] [38880:6590520] [DMG] } + [1690220692641] [38880:6590520] [DMG] + [1690220692641] [38880:6590520] [DMG] Data = 0, + [1690220692641] [38880:6590520] [DMG] }, + [1690220692641] [38880:6590520] [DMG] + [1690220692641] [38880:6590520] [DMG] }, + [1690220692641] [38880:6590520] [DMG] + [1690220692641] [38880:6590520] [DMG] ], + [1690220692641] [38880:6590520] [DMG] + [1690220692641] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220692641] [38880:6590520] [DMG] } + [1690220692641] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629616 + [1690220692641] [38880:6590520] [TOO] WindowStatus: 0 + [1690220692641] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfab5d837 Peer = 02:0000000000000001 + [1690220692641] [38880:6590520] [EM] <<< [E:50776r S:15324 M:785279 (Ack:104911055)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220692641] [38880:6590520] [IN] (S) Sending msg 785279 on secure session with LSID: 15324 + [1690220692663] [38880:6590520] [EM] >>> [E:50777r S:15324 M:104911056] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220692663] [38880:6590520] [EM] Handling via exchange: 50777r, Delegate: 0x1035c8be0 + [1690220692663] [38880:6590520] [DMG] ReportDataMessage = + [1690220692663] [38880:6590520] [DMG] { + [1690220692663] [38880:6590520] [DMG] SubscriptionId = 0x5984e13a, + [1690220692663] [38880:6590520] [DMG] AttributeReportIBs = + [1690220692663] [38880:6590520] [DMG] [ + [1690220692663] [38880:6590520] [DMG] AttributeReportIB = + [1690220692663] [38880:6590520] [DMG] { + [1690220692663] [38880:6590520] [DMG] AttributeDataIB = + [1690220692663] [38880:6590520] [DMG] { + [1690220692663] [38880:6590520] [DMG] DataVersion = 0x1fddccf0, + [1690220692663] [38880:6590520] [DMG] AttributePathIB = + [1690220692663] [38880:6590520] [DMG] { + [1690220692663] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220692663] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220692663] [38880:6590520] [DMG] Attribute = 0x0000_0001, + [1690220692663] [38880:6590520] [DMG] } + [1690220692663] [38880:6590520] [DMG] + [1690220692663] [38880:6590520] [DMG] Data = NULL + [1690220692663] [38880:6590520] [DMG] }, + [1690220692663] [38880:6590520] [DMG] + [1690220692663] [38880:6590520] [DMG] }, + [1690220692663] [38880:6590520] [DMG] + [1690220692663] [38880:6590520] [DMG] ], + [1690220692663] [38880:6590520] [DMG] + [1690220692663] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220692663] [38880:6590520] [DMG] } + [1690220692664] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629616 + [1690220692664] [38880:6590520] [TOO] AdminFabricIndex: null + [1690220692664] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x5984e13a Peer = 02:0000000000000001 + [1690220692664] [38880:6590520] [EM] <<< [E:50777r S:15324 M:785280 (Ack:104911056)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220692664] [38880:6590520] [IN] (S) Sending msg 785280 on secure session with LSID: 15324 + [1690220692667] [38880:6590520] [EM] >>> [E:50778r S:15324 M:104911057] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220692667] [38880:6590520] [EM] Handling via exchange: 50778r, Delegate: 0x1035c8be0 + [1690220692667] [38880:6590520] [DMG] ReportDataMessage = + [1690220692667] [38880:6590520] [DMG] { + [1690220692667] [38880:6590520] [DMG] SubscriptionId = 0x943b5fc3, + [1690220692667] [38880:6590520] [DMG] AttributeReportIBs = + [1690220692667] [38880:6590520] [DMG] [ + [1690220692667] [38880:6590520] [DMG] AttributeReportIB = + [1690220692667] [38880:6590520] [DMG] { + [1690220692667] [38880:6590520] [DMG] AttributeDataIB = + [1690220692667] [38880:6590520] [DMG] { + [1690220692667] [38880:6590520] [DMG] DataVersion = 0x1fddccf0, + [1690220692667] [38880:6590520] [DMG] AttributePathIB = + [1690220692667] [38880:6590520] [DMG] { + [1690220692667] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220692667] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220692667] [38880:6590520] [DMG] Attribute = 0x0000_0002, + [1690220692667] [38880:6590520] [DMG] } + [1690220692667] [38880:6590520] [DMG] + [1690220692667] [38880:6590520] [DMG] Data = NULL + [1690220692667] [38880:6590520] [DMG] }, + [1690220692667] [38880:6590520] [DMG] + [1690220692667] [38880:6590520] [DMG] }, + [1690220692667] [38880:6590520] [DMG] + [1690220692667] [38880:6590520] [DMG] ], + [1690220692667] [38880:6590520] [DMG] + [1690220692667] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220692667] [38880:6590520] [DMG] } + [1690220692668] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629616 + [1690220692668] [38880:6590520] [TOO] AdminVendorId: null + [1690220692668] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x943b5fc3 Peer = 02:0000000000000001 + [1690220692668] [38880:6590520] [EM] <<< [E:50778r S:15324 M:785281 (Ack:104911057)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220692668] [38880:6590520] [IN] (S) Sending msg 785281 on secure session with LSID: 15324 + [1690220692679] [38880:6590520] [EM] >>> [E:50776r S:15324 M:104911058 (Ack:785279)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692679] [38880:6590520] [EM] Found matching exchange: 50776r, Delegate: 0x0 + [1690220692679] [38880:6590520] [EM] Rxd Ack; Removing MessageCounter:785279 from Retrans Table on exchange 50776r + [1690220692682] [38880:6590520] [EM] >>> [E:50777r S:15324 M:104911059 (Ack:785280)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692682] [38880:6590520] [EM] Found matching exchange: 50777r, Delegate: 0x0 + [1690220692682] [38880:6590520] [EM] Rxd Ack; Removing MessageCounter:785280 from Retrans Table on exchange 50777r + [1690220692720] [38880:6590520] [EM] >>> [E:50778r S:15324 M:104911060 (Ack:785281)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692720] [38880:6590520] [EM] Found matching exchange: 50778r, Delegate: 0x0 + [1690220692720] [38880:6590520] [EM] Rxd Ack; Removing MessageCounter:785281 from Retrans Table on exchange 50778r + disabled: true + + - label: + "Step 24: TH_CR2 opens a commissioning window on DUT_CE using ECM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C00.Rsp + verification: | + In interactive mode of TH_CR2, send command to open commissioning window using ECM + + pairing open-commissioning-window 1 1 180 1000 3840 --commissioner-name beta + + On TH_CR2 logs, verify for commissioning window to be open + + InvokeResponseMessage = + [1690220763945] [38880:6590520] [DMG] { + [1690220763945] [38880:6590520] [DMG] suppressResponse = false, + [1690220763945] [38880:6590520] [DMG] InvokeResponseIBs = + [1690220763945] [38880:6590520] [DMG] [ + [1690220763945] [38880:6590520] [DMG] InvokeResponseIB = + [1690220763945] [38880:6590520] [DMG] { + [1690220763945] [38880:6590520] [DMG] CommandStatusIB = + [1690220763945] [38880:6590520] [DMG] { + [1690220763945] [38880:6590520] [DMG] CommandPathIB = + [1690220763945] [38880:6590520] [DMG] { + [1690220763945] [38880:6590520] [DMG] EndpointId = 0x0, + [1690220763945] [38880:6590520] [DMG] ClusterId = 0x3c, + [1690220763945] [38880:6590520] [DMG] CommandId = 0x0, + [1690220763945] [38880:6590520] [DMG] }, + [1690220763945] [38880:6590520] [DMG] + [1690220763945] [38880:6590520] [DMG] StatusIB = + [1690220763945] [38880:6590520] [DMG] { + [1690220763945] [38880:6590520] [DMG] status = 0x00 (SUCCESS), + [1690220763945] [38880:6590520] [DMG] }, + [1690220763945] [38880:6590520] [DMG] + [1690220763945] [38880:6590520] [DMG] }, + [1690220763945] [38880:6590520] [DMG] + [1690220763945] [38880:6590520] [DMG] }, + [1690220763945] [38880:6590520] [DMG] + [1690220763945] [38880:6590520] [DMG] ], + [1690220763945] [38880:6590520] [DMG] + [1690220763945] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220763945] [38880:6590520] [DMG] }, + [1690220763945] [38880:6590520] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1690220763945] [38880:6590520] [CTL] Successfully opened pairing window on the device + [1690220763945] [38880:6590520] [CTL] Manual pairing code: [35598021029] + [1690220763945] [38880:6590520] [CTL] SetupQRCode: [MT:-24J0AFN00-CRP1PR00] + disabled: true + + - label: + "Step 25: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + + [1690220763948] [38865:6590605] [EM] >>> [E:50779r S:35778 M:264355241] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220763948] [38865:6590605] [EM] Handling via exchange: 50779r, Delegate: 0x1013c4be0 + [1690220763948] [38865:6590605] [DMG] ReportDataMessage = + [1690220763948] [38865:6590605] [DMG] { + [1690220763948] [38865:6590605] [DMG] SubscriptionId = 0xdade5274, + [1690220763948] [38865:6590605] [DMG] AttributeReportIBs = + [1690220763948] [38865:6590605] [DMG] [ + [1690220763948] [38865:6590605] [DMG] AttributeReportIB = + [1690220763948] [38865:6590605] [DMG] { + [1690220763948] [38865:6590605] [DMG] AttributeDataIB = + [1690220763948] [38865:6590605] [DMG] { + [1690220763948] [38865:6590605] [DMG] DataVersion = 0x1fddccf3, + [1690220763948] [38865:6590605] [DMG] AttributePathIB = + [1690220763948] [38865:6590605] [DMG] { + [1690220763948] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220763948] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220763948] [38865:6590605] [DMG] Attribute = 0x0000_0000, + [1690220763948] [38865:6590605] [DMG] } + [1690220763948] [38865:6590605] [DMG] + [1690220763948] [38865:6590605] [DMG] Data = 1, + [1690220763948] [38865:6590605] [DMG] }, + [1690220763948] [38865:6590605] [DMG] + [1690220763948] [38865:6590605] [DMG] }, + [1690220763948] [38865:6590605] [DMG] + [1690220763948] [38865:6590605] [DMG] ], + [1690220763948] [38865:6590605] [DMG] + [1690220763948] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220763948] [38865:6590605] [DMG] } + [1690220763948] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629619 + [1690220763948] [38865:6590605] [TOO] WindowStatus: 1 + [1690220763948] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690220763949] [38865:6590605] [EM] <<< [E:50779r S:35778 M:151592268 (Ack:264355241)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220763949] [38865:6590605] [IN] (S) Sending msg 151592268 on secure session with LSID: 35778 + [1690220763955] [38865:6590605] [EM] >>> [E:50780r S:35778 M:264355242] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220763955] [38865:6590605] [EM] Handling via exchange: 50780r, Delegate: 0x1013c4be0 + [1690220763955] [38865:6590605] [DMG] ReportDataMessage = + [1690220763955] [38865:6590605] [DMG] { + [1690220763955] [38865:6590605] [DMG] SubscriptionId = 0x35250b41, + [1690220763955] [38865:6590605] [DMG] AttributeReportIBs = + [1690220763955] [38865:6590605] [DMG] [ + [1690220763955] [38865:6590605] [DMG] AttributeReportIB = + [1690220763955] [38865:6590605] [DMG] { + [1690220763955] [38865:6590605] [DMG] AttributeDataIB = + [1690220763955] [38865:6590605] [DMG] { + [1690220763955] [38865:6590605] [DMG] DataVersion = 0x1fddccf3, + [1690220763955] [38865:6590605] [DMG] AttributePathIB = + [1690220763955] [38865:6590605] [DMG] { + [1690220763955] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220763955] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220763955] [38865:6590605] [DMG] Attribute = 0x0000_0001, + [1690220763955] [38865:6590605] [DMG] } + [1690220763955] [38865:6590605] [DMG] + [1690220763955] [38865:6590605] [DMG] Data = 2, + [1690220763955] [38865:6590605] [DMG] }, + [1690220763955] [38865:6590605] [DMG] + [1690220763955] [38865:6590605] [DMG] }, + [1690220763955] [38865:6590605] [DMG] + [1690220763955] [38865:6590605] [DMG] ], + [1690220763955] [38865:6590605] [DMG] + [1690220763955] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220763955] [38865:6590605] [DMG] } + [1690220763955] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629619 + [1690220763955] [38865:6590605] [TOO] AdminFabricIndex: 2 + [1690220763955] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690220763956] [38865:6590605] [EM] <<< [E:50780r S:35778 M:151592269 (Ack:264355242)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220763956] [38865:6590605] [IN] (S) Sending msg 151592269 on secure session with LSID: 35778 + [1690220763956] [38865:6590605] [EM] >>> [E:50781r S:35778 M:264355243] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220763956] [38865:6590605] [EM] Handling via exchange: 50781r, Delegate: 0x1013c4be0 + [1690220763956] [38865:6590605] [DMG] ReportDataMessage = + [1690220763956] [38865:6590605] [DMG] { + [1690220763956] [38865:6590605] [DMG] SubscriptionId = 0xd3c6ff91, + [1690220763956] [38865:6590605] [DMG] AttributeReportIBs = + [1690220763957] [38865:6590605] [DMG] [ + [1690220763957] [38865:6590605] [DMG] AttributeReportIB = + [1690220763957] [38865:6590605] [DMG] { + [1690220763957] [38865:6590605] [DMG] AttributeDataIB = + [1690220763957] [38865:6590605] [DMG] { + [1690220763957] [38865:6590605] [DMG] DataVersion = 0x1fddccf3, + [1690220763957] [38865:6590605] [DMG] AttributePathIB = + [1690220763957] [38865:6590605] [DMG] { + [1690220763957] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220763957] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220763957] [38865:6590605] [DMG] Attribute = 0x0000_0002, + [1690220763957] [38865:6590605] [DMG] } + [1690220763957] [38865:6590605] [DMG] + [1690220763957] [38865:6590605] [DMG] Data = 65521, + [1690220763957] [38865:6590605] [DMG] }, + [1690220763957] [38865:6590605] [DMG] + [1690220763957] [38865:6590605] [DMG] }, + [1690220763957] [38865:6590605] [DMG] + [1690220763957] [38865:6590605] [DMG] ], + [1690220763957] [38865:6590605] [DMG] + [1690220763957] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220763957] [38865:6590605] [DMG] } + [1690220763957] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629619 + [1690220763957] [38865:6590605] [TOO] AdminVendorId: 65521 + [1690220763957] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690220763957] [38865:6590605] [EM] <<< [E:50781r S:35778 M:151592270 (Ack:264355243)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220763957] [38865:6590605] [IN] (S) Sending msg 151592270 on secure session with LSID: 35778 + [1690220763962] [38865:6590605] [EM] >>> [E:50779r S:35778 M:264355244 (Ack:151592268)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220763962] [38865:6590605] [EM] Found matching exchange: 50779r, Delegate: 0x0 + [1690220763962] [38865:6590605] [EM] Rxd Ack; Removing MessageCounter:151592268 from Retrans Table on exchange 50779r + [1690220763976] [38865:6590605] [EM] >>> [E:50780r S:35778 M:264355245 (Ack:151592269)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220763976] [38865:6590605] [EM] Found matching exchange: 50780r, Delegate: 0x0 + [1690220763976] [38865:6590605] [EM] Rxd Ack; Removing MessageCounter:151592269 from Retrans Table on exchange 50780r + [1690220763981] [38865:6593769] [EM] >>> [E:50781r S:35778 M:264355246 (Ack:151592270)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220763981] [38865:6593769] [EM] Found matching exchange: 50781r, Delegate: 0x0 + [1690220763981] [38865:6593769] [EM] Rxd Ack; Removing MessageCounter:151592270 from Retrans Table on exchange 50781r + disabled: true + + - label: + "Step 26: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690220763955] [38880:6590520] [DMG] { + [1690220763955] [38880:6590520] [DMG] SubscriptionId = 0xfab5d837, + [1690220763955] [38880:6590520] [DMG] AttributeReportIBs = + [1690220763955] [38880:6590520] [DMG] [ + [1690220763955] [38880:6590520] [DMG] AttributeReportIB = + [1690220763955] [38880:6590520] [DMG] { + [1690220763955] [38880:6590520] [DMG] AttributeDataIB = + [1690220763955] [38880:6590520] [DMG] { + [1690220763955] [38880:6590520] [DMG] DataVersion = 0x1fddccf3, + [1690220763955] [38880:6590520] [DMG] AttributePathIB = + [1690220763955] [38880:6590520] [DMG] { + [1690220763955] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220763955] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220763955] [38880:6590520] [DMG] Attribute = 0x0000_0000, + [1690220763955] [38880:6590520] [DMG] } + [1690220763955] [38880:6590520] [DMG] + [1690220763955] [38880:6590520] [DMG] Data = 1, + [1690220763955] [38880:6590520] [DMG] }, + [1690220763955] [38880:6590520] [DMG] + [1690220763955] [38880:6590520] [DMG] }, + [1690220763955] [38880:6590520] [DMG] + [1690220763955] [38880:6590520] [DMG] ], + [1690220763955] [38880:6590520] [DMG] + [1690220763955] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220763955] [38880:6590520] [DMG] } + [1690220763955] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629619 + [1690220763955] [38880:6590520] [TOO] WindowStatus: 1 + [1690220763956] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfab5d837 Peer = 02:0000000000000001 + [1690220763956] [38880:6590520] [EM] <<< [E:50782r S:15324 M:785289 (Ack:104911065)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220763956] [38880:6590520] [IN] (S) Sending msg 785289 on secure session with LSID: 15324 + [1690220763972] [38880:6590520] [EM] >>> [E:50783r S:15324 M:104911066] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220763972] [38880:6590520] [EM] Handling via exchange: 50783r, Delegate: 0x1035c8be0 + [1690220763972] [38880:6590520] [DMG] ReportDataMessage = + [1690220763972] [38880:6590520] [DMG] { + [1690220763972] [38880:6590520] [DMG] SubscriptionId = 0x5984e13a, + [1690220763972] [38880:6590520] [DMG] AttributeReportIBs = + [1690220763973] [38880:6590520] [DMG] [ + [1690220763973] [38880:6590520] [DMG] AttributeReportIB = + [1690220763973] [38880:6590520] [DMG] { + [1690220763973] [38880:6590520] [DMG] AttributeDataIB = + [1690220763973] [38880:6590520] [DMG] { + [1690220763973] [38880:6590520] [DMG] DataVersion = 0x1fddccf3, + [1690220763973] [38880:6590520] [DMG] AttributePathIB = + [1690220763973] [38880:6590520] [DMG] { + [1690220763973] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220763973] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220763973] [38880:6590520] [DMG] Attribute = 0x0000_0001, + [1690220763973] [38880:6590520] [DMG] } + [1690220763973] [38880:6590520] [DMG] + [1690220763973] [38880:6590520] [DMG] Data = 2, + [1690220763973] [38880:6590520] [DMG] }, + [1690220763973] [38880:6590520] [DMG] + [1690220763973] [38880:6590520] [DMG] }, + [1690220763973] [38880:6590520] [DMG] + [1690220763973] [38880:6590520] [DMG] ], + [1690220763973] [38880:6590520] [DMG] + [1690220763973] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220763973] [38880:6590520] [DMG] } + [1690220763973] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629619 + [1690220763973] [38880:6590520] [TOO] AdminFabricIndex: 2 + [1690220763973] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x5984e13a Peer = 02:0000000000000001 + [1690220763973] [38880:6590520] [EM] <<< [E:50783r S:15324 M:785290 (Ack:104911066)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220763973] [38880:6590520] [IN] (S) Sending msg 785290 on secure session with LSID: 15324 + [1690220763976] [38880:6593761] [EM] >>> [E:50782r S:15324 M:104911067 (Ack:785289)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220763976] [38880:6593761] [EM] Found matching exchange: 50782r, Delegate: 0x0 + [1690220763976] [38880:6593761] [EM] Rxd Ack; Removing MessageCounter:785289 from Retrans Table on exchange 50782r + [1690220763976] [38880:6593761] [EM] >>> [E:50784r S:15324 M:104911068] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220763976] [38880:6593761] [EM] Handling via exchange: 50784r, Delegate: 0x1035c8be0 + [1690220763976] [38880:6593761] [DMG] ReportDataMessage = + [1690220763976] [38880:6593761] [DMG] { + [1690220763977] [38880:6593761] [DMG] SubscriptionId = 0x943b5fc3, + [1690220763977] [38880:6593761] [DMG] AttributeReportIBs = + [1690220763977] [38880:6593761] [DMG] [ + [1690220763977] [38880:6593761] [DMG] AttributeReportIB = + [1690220763977] [38880:6593761] [DMG] { + [1690220763977] [38880:6593761] [DMG] AttributeDataIB = + [1690220763977] [38880:6593761] [DMG] { + [1690220763977] [38880:6593761] [DMG] DataVersion = 0x1fddccf3, + [1690220763977] [38880:6593761] [DMG] AttributePathIB = + [1690220763977] [38880:6593761] [DMG] { + [1690220763977] [38880:6593761] [DMG] Endpoint = 0x0, + [1690220763977] [38880:6593761] [DMG] Cluster = 0x3c, + [1690220763977] [38880:6593761] [DMG] Attribute = 0x0000_0002, + [1690220763977] [38880:6593761] [DMG] } + [1690220763977] [38880:6593761] [DMG] + [1690220763977] [38880:6593761] [DMG] Data = 65521, + [1690220763977] [38880:6593761] [DMG] }, + [1690220763977] [38880:6593761] [DMG] + [1690220763977] [38880:6593761] [DMG] }, + [1690220763977] [38880:6593761] [DMG] + [1690220763977] [38880:6593761] [DMG] ], + [1690220763977] [38880:6593761] [DMG] + [1690220763977] [38880:6593761] [DMG] InteractionModelRevision = 1 + [1690220763977] [38880:6593761] [DMG] } + [1690220763977] [38880:6593761] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629619 + [1690220763977] [38880:6593761] [TOO] AdminVendorId: 65521 + [1690220763977] [38880:6593761] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x943b5fc3 Peer = 02:0000000000000001 + [1690220763977] [38880:6593761] [EM] <<< [E:50784r S:15324 M:785291 (Ack:104911068)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 27: Before expiration of PIXIT.CADMIN.CwDuration seconds set in + step 24, TH_CR1 sends RemoveFabric command to DUT_CE with FabricIndex + set to the fabric index of TH_CR2s fabric" + PICS: OPCREDS.S.C0a.Rsp + verification: | + Before expiration of PIXIT.CADMIN.CwDuration seconds set in step 24, from interactive mode of TH_CR1 send RemoveFabric command with FabricIndex set to the fabric index of TH_CR2’s fabric + + operationalcredentials remove-fabric 2 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + On TH_CR1 logs, verify for NOCResponse with statuscode 0 and fabric index equal to fabric index of TH_CR2's fabric + + InvokeResponseMessage = + [1690220880388] [38865:6593769] [DMG] { + [1690220880388] [38865:6593769] [DMG] suppressResponse = false, + [1690220880388] [38865:6593769] [DMG] InvokeResponseIBs = + [1690220880388] [38865:6593769] [DMG] [ + [1690220880388] [38865:6593769] [DMG] InvokeResponseIB = + [1690220880388] [38865:6593769] [DMG] { + [1690220880388] [38865:6593769] [DMG] CommandDataIB = + [1690220880388] [38865:6593769] [DMG] { + [1690220880388] [38865:6593769] [DMG] CommandPathIB = + [1690220880388] [38865:6593769] [DMG] { + [1690220880388] [38865:6593769] [DMG] EndpointId = 0x0, + [1690220880388] [38865:6593769] [DMG] ClusterId = 0x3e, + [1690220880388] [38865:6593769] [DMG] CommandId = 0x8, + [1690220880388] [38865:6593769] [DMG] }, + [1690220880388] [38865:6593769] [DMG] + [1690220880388] [38865:6593769] [DMG] CommandFields = + [1690220880388] [38865:6593769] [DMG] { + [1690220880388] [38865:6593769] [DMG] 0x0 = 0, + [1690220880388] [38865:6593769] [DMG] 0x1 = 2, + [1690220880388] [38865:6593769] [DMG] }, + [1690220880388] [38865:6593769] [DMG] }, + [1690220880388] [38865:6593769] [DMG] + [1690220880388] [38865:6593769] [DMG] }, + [1690220880388] [38865:6593769] [DMG] + [1690220880388] [38865:6593769] [DMG] ], + [1690220880388] [38865:6593769] [DMG] + [1690220880388] [38865:6593769] [DMG] InteractionModelRevision = 1 + [1690220880388] [38865:6593769] [DMG] }, + [1690220880388] [38865:6593769] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + [1690220880388] [38865:6593769] [TOO] Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 + [1690220880388] [38865:6593769] [TOO] NOCResponse: { + [1690220880388] [38865:6593769] [TOO] statusCode: 0 + [1690220880388] [38865:6593769] [TOO] fabricIndex: 2 + [1690220880388] [38865:6593769] [TOO] } + [1690220880388] [38865:6593769] [DMG] ICR moving to [AwaitingDe] + [1690220880389] [38865:6593769] [EM] <<< [E:27147i S:35778 M:151592272 (Ack:264355248)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 28: Verify TH_CR1 receives subscription notifications which show + AdminFabricIndex value to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show AdminFabricIndex value to be null + + ReportDataMessage = + [1690221347664] [38912:6599713] [DMG] { + [1690221347664] [38912:6599713] [DMG] SubscriptionId = 0x7dc4ea87, + [1690221347664] [38912:6599713] [DMG] AttributeReportIBs = + [1690221347664] [38912:6599713] [DMG] [ + [1690221347664] [38912:6599713] [DMG] AttributeReportIB = + [1690221347664] [38912:6599713] [DMG] { + [1690221347664] [38912:6599713] [DMG] AttributeDataIB = + [1690221347664] [38912:6599713] [DMG] { + [1690221347664] [38912:6599713] [DMG] DataVersion = 0x1404feca, + [1690221347664] [38912:6599713] [DMG] AttributePathIB = + [1690221347665] [38912:6599713] [DMG] { + [1690221347665] [38912:6599713] [DMG] Endpoint = 0x0, + [1690221347665] [38912:6599713] [DMG] Cluster = 0x3c, + [1690221347665] [38912:6599713] [DMG] Attribute = 0x0000_0001, + [1690221347665] [38912:6599713] [DMG] } + [1690221347665] [38912:6599713] [DMG] + [1690221347665] [38912:6599713] [DMG] Data = NULL + [1690221347665] [38912:6599713] [DMG] }, + [1690221347665] [38912:6599713] [DMG] + [1690221347665] [38912:6599713] [DMG] }, + [1690221347665] [38912:6599713] [DMG] + [1690221347665] [38912:6599713] [DMG] ], + [1690221347665] [38912:6599713] [DMG] + [1690221347665] [38912:6599713] [DMG] InteractionModelRevision = 1 + [1690221347665] [38912:6599713] [DMG] } + [1690221347665] [38912:6599713] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 335871690 + [1690221347665] [38912:6599713] [TOO] AdminFabricIndex: null + [1690221347665] [38912:6599713] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x7dc4ea87 Peer = 01:0000000000000001 + [1690221347666] [38912:6599713] [EM] <<< [E:41212r S:64671 M:91208151 (Ack:135000952)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: "Step 29: TH_CR1 reads WindowStatus attribute from DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In interactive mode of TH_CR1, read windowstatus attribute, + + administratorcommissioning read window-status 1 0 --commissioner-name alpha + + Verify TH_CR1 logs for windowstatus to be 1 + + ReportDataMessage = + [1690221400622] [38912:6600376] [DMG] { + [1690221400622] [38912:6600376] [DMG] AttributeReportIBs = + [1690221400622] [38912:6600376] [DMG] [ + [1690221400622] [38912:6600376] [DMG] AttributeReportIB = + [1690221400622] [38912:6600376] [DMG] { + [1690221400622] [38912:6600376] [DMG] AttributeDataIB = + [1690221400622] [38912:6600376] [DMG] { + [1690221400622] [38912:6600376] [DMG] DataVersion = 0x1404feca, + [1690221400622] [38912:6600376] [DMG] AttributePathIB = + [1690221400622] [38912:6600376] [DMG] { + [1690221400622] [38912:6600376] [DMG] Endpoint = 0x0, + [1690221400622] [38912:6600376] [DMG] Cluster = 0x3c, + [1690221400622] [38912:6600376] [DMG] Attribute = 0x0000_0000, + [1690221400622] [38912:6600376] [DMG] } + [1690221400622] [38912:6600376] [DMG] + [1690221400622] [38912:6600376] [DMG] Data = 1, + [1690221400622] [38912:6600376] [DMG] }, + [1690221400622] [38912:6600376] [DMG] + [1690221400622] [38912:6600376] [DMG] }, + [1690221400622] [38912:6600376] [DMG] + [1690221400622] [38912:6600376] [DMG] ], + [1690221400622] [38912:6600376] [DMG] + [1690221400622] [38912:6600376] [DMG] SuppressResponse = true, + [1690221400622] [38912:6600376] [DMG] InteractionModelRevision = 1 + [1690221400622] [38912:6600376] [DMG] } + [1690221400622] [38912:6600376] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 335871690 + [1690221400622] [38912:6600376] [TOO] WindowStatus: 1 + [1690221400622] [38912:6600376] [EM] <<< [E:30395i S:64671 M:91208153 (Ack:135000954)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: "Step 30: TH_CR1 reads AdminVendorID attribute from DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In interactive mode of TH_CR1, read adminvendorid attribute, + + administratorcommissioning read admin-vendor-id 1 0 --commissioner-name alpha + + On TH_CR1 logs, verify the value of adminvendorid to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690221461458] [38912:6600376] [DMG] { + [1690221461458] [38912:6600376] [DMG] AttributeReportIBs = + [1690221461458] [38912:6600376] [DMG] [ + [1690221461458] [38912:6600376] [DMG] AttributeReportIB = + [1690221461458] [38912:6600376] [DMG] { + [1690221461458] [38912:6600376] [DMG] AttributeDataIB = + [1690221461458] [38912:6600376] [DMG] { + [1690221461458] [38912:6600376] [DMG] DataVersion = 0x1404feca, + [1690221461458] [38912:6600376] [DMG] AttributePathIB = + [1690221461458] [38912:6600376] [DMG] { + [1690221461458] [38912:6600376] [DMG] Endpoint = 0x0, + [1690221461458] [38912:6600376] [DMG] Cluster = 0x3c, + [1690221461458] [38912:6600376] [DMG] Attribute = 0x0000_0002, + [1690221461458] [38912:6600376] [DMG] } + [1690221461458] [38912:6600376] [DMG] + [1690221461458] [38912:6600376] [DMG] Data = 65521, + [1690221461458] [38912:6600376] [DMG] }, + [1690221461458] [38912:6600376] [DMG] + [1690221461458] [38912:6600376] [DMG] }, + [1690221461458] [38912:6600376] [DMG] + [1690221461458] [38912:6600376] [DMG] ], + [1690221461458] [38912:6600376] [DMG] + [1690221461458] [38912:6600376] [DMG] SuppressResponse = true, + [1690221461458] [38912:6600376] [DMG] InteractionModelRevision = 1 + [1690221461458] [38912:6600376] [DMG] } + [1690221461458] [38912:6600376] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 335871690 + [1690221461458] [38912:6600376] [TOO] AdminVendorId: 65521 + [1690221461458] [38912:6600376] [EM] <<< [E:30396i S:64671 M:91208155 (Ack:135000955)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690221461458] [38912:6600376] [IN] (S) Sending msg 91208155 on secure session with LSID: 64671 + [1690221461458] [38912:6600376] [EM] Flushed pending ack for MessageCounter:135000955 on exchange 30396i + >>> + disabled: true + + - label: + "Step 31: Wait for the expiration of PIXIT.CADMIN.CwDuration seconds + that is set in step 24" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 24 + disabled: true + + - label: + "Step 32: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminVendorId to be null + + [1690221509585] [38912:6600376] [EM] >>> [E:41213r S:64671 M:135000956] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221509585] [38912:6600376] [EM] Handling via exchange: 41213r, Delegate: 0x101e84be0 + [1690221509586] [38912:6600376] [DMG] ReportDataMessage = + [1690221509586] [38912:6600376] [DMG] { + [1690221509586] [38912:6600376] [DMG] SubscriptionId = 0xdd7ad0b4, + [1690221509586] [38912:6600376] [DMG] AttributeReportIBs = + [1690221509586] [38912:6600376] [DMG] [ + [1690221509586] [38912:6600376] [DMG] AttributeReportIB = + [1690221509586] [38912:6600376] [DMG] { + [1690221509586] [38912:6600376] [DMG] AttributeDataIB = + [1690221509586] [38912:6600376] [DMG] { + [1690221509586] [38912:6600376] [DMG] DataVersion = 0x1404fecc, + [1690221509586] [38912:6600376] [DMG] AttributePathIB = + [1690221509586] [38912:6600376] [DMG] { + [1690221509586] [38912:6600376] [DMG] Endpoint = 0x0, + [1690221509586] [38912:6600376] [DMG] Cluster = 0x3c, + [1690221509586] [38912:6600376] [DMG] Attribute = 0x0000_0000, + [1690221509586] [38912:6600376] [DMG] } + [1690221509586] [38912:6600376] [DMG] + [1690221509586] [38912:6600376] [DMG] Data = 0, + [1690221509586] [38912:6600376] [DMG] }, + [1690221509586] [38912:6600376] [DMG] + [1690221509586] [38912:6600376] [DMG] }, + [1690221509586] [38912:6600376] [DMG] + [1690221509586] [38912:6600376] [DMG] ], + [1690221509586] [38912:6600376] [DMG] + [1690221509586] [38912:6600376] [DMG] InteractionModelRevision = 1 + [1690221509586] [38912:6600376] [DMG] } + [1690221509586] [38912:6600376] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 335871692 + [1690221509586] [38912:6600376] [TOO] WindowStatus: 0 + [1690221509586] [38912:6600376] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdd7ad0b4 Peer = 01:0000000000000001 + [1690221509587] [38912:6600376] [EM] <<< [E:41213r S:64671 M:91208156 (Ack:135000956)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221509587] [38912:6600376] [IN] (S) Sending msg 91208156 on secure session with LSID: 64671 + [1690221509587] [38912:6600376] [EM] >>> [E:41214r S:64671 M:135000957] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221509587] [38912:6600376] [EM] Handling via exchange: 41214r, Delegate: 0x101e84be0 + [1690221509588] [38912:6600376] [DMG] ReportDataMessage = + [1690221509588] [38912:6600376] [DMG] { + [1690221509588] [38912:6600376] [DMG] SubscriptionId = 0xe3771580, + [1690221509588] [38912:6600376] [DMG] AttributeReportIBs = + [1690221509588] [38912:6600376] [DMG] [ + [1690221509588] [38912:6600376] [DMG] AttributeReportIB = + [1690221509588] [38912:6600376] [DMG] { + [1690221509588] [38912:6600376] [DMG] AttributeDataIB = + [1690221509588] [38912:6600376] [DMG] { + [1690221509588] [38912:6600376] [DMG] DataVersion = 0x1404fecc, + [1690221509588] [38912:6600376] [DMG] AttributePathIB = + [1690221509588] [38912:6600376] [DMG] { + [1690221509588] [38912:6600376] [DMG] Endpoint = 0x0, + [1690221509588] [38912:6600376] [DMG] Cluster = 0x3c, + [1690221509588] [38912:6600376] [DMG] Attribute = 0x0000_0002, + [1690221509588] [38912:6600376] [DMG] } + [1690221509588] [38912:6600376] [DMG] + [1690221509588] [38912:6600376] [DMG] Data = NULL + [1690221509588] [38912:6600376] [DMG] }, + [1690221509588] [38912:6600376] [DMG] + [1690221509588] [38912:6600376] [DMG] }, + [1690221509588] [38912:6600376] [DMG] + [1690221509588] [38912:6600376] [DMG] ], + [1690221509588] [38912:6600376] [DMG] + [1690221509588] [38912:6600376] [DMG] InteractionModelRevision = 1 + [1690221509588] [38912:6600376] [DMG] } + [1690221509588] [38912:6600376] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 335871692 + [1690221509588] [38912:6600376] [TOO] AdminVendorId: null + [1690221509588] [38912:6600376] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xe3771580 Peer = 01:0000000000000001 + [1690221509588] [38912:6600376] [EM] <<< [E:41214r S:64671 M:91208157 (Ack:135000957)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221509589] [38912:6600376] [IN] (S) Sending msg 91208157 on secure session with LSID: 64671 + [1690221509616] [38912:6600376] [EM] >>> [E:41213r S:64671 M:135000958 (Ack:91208156)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690221509616] [38912:6600376] [EM] Found matching exchange: 41213r, Delegate: 0x0 + [1690221509616] [38912:6600376] [EM] Rxd Ack; Removing MessageCounter:91208156 from Retrans Table on exchange 41213r + [1690221509619] [38912:6600376] [EM] >>> [E:41214r S:64671 M:135000959 (Ack:91208157)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690221509619] [38912:6600376] [EM] Found matching exchange: 41214r, Delegate: 0x0 + [1690221509619] [38912:6600376] [EM] Rxd Ack; Removing MessageCounter:91208157 from Retrans Table on exchange 41214r + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml new file mode 100644 index 00000000000000..a923be83b413ba --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml @@ -0,0 +1,2121 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 36.1.26. [TC-CADMIN-1.26] Subscription to the attributes - verify + subscription response [BCM] [DUT - Commissionee] + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Precondition" + verification: | + Reset Devices to factory defaults + disabled: true + + - label: "Step 1: TH_CR1 starts a commissioning process with DUT_CE" + PICS: CADMIN.S + verification: | + On TH_CR1 start interactive mode, + + ./chip-tool interactive start + + In the interactive mode of TH_CR1, start commissioning process, + + pairing code 1 34970112332 --commissioner-name alpha + + [1690221652862] [38924:6603872] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1690221652862] [38924:6603872] [CTL] Received CommissioningComplete response, errorCode=0 + [1690221652862] [38924:6603872] [CTL] Successfully finished commissioning step 'SendComplete' + [1690221652862] [38924:6603872] [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1690221652862] [38924:6603872] [CTL] Performing next commissioning step 'Cleanup' + [1690221652862] [38924:6603872] [IN] SecureSession[0x6000021501e0]: MarkForEviction Type:1 LSID:947 + [1690221652862] [38924:6603872] [SC] SecureSession[0x6000021501e0, LSID:947]: State change 'kActive' --> 'kPendingEviction' + [1690221652862] [38924:6603872] [IN] SecureSession[0x6000021501e0]: Released - Type:1 LSID:947 + [1690221652862] [38924:6603872] [CTL] Successfully finished commissioning step 'Cleanup' + [1690221652863] [38924:6603872] [TOO] Device commissioning completed with success + disabled: true + + - label: "Step 2: TH_CR1 subscribes to WindowStatus attribute on DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In the interactive mode of TH_CR1, subscribe to windowstatus attribute, + + administratorcommissioning subscribe window-status 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs verify for windowstatus subscription notification, + + + ReportDataMessage = + [1690221695853] [38924:6603872] [DMG] { + [1690221695853] [38924:6603872] [DMG] SubscriptionId = 0xacfb278e, + [1690221695853] [38924:6603872] [DMG] AttributeReportIBs = + [1690221695853] [38924:6603872] [DMG] [ + [1690221695853] [38924:6603872] [DMG] AttributeReportIB = + [1690221695853] [38924:6603872] [DMG] { + [1690221695853] [38924:6603872] [DMG] AttributeDataIB = + [1690221695853] [38924:6603872] [DMG] { + [1690221695853] [38924:6603872] [DMG] DataVersion = 0xed5d129c, + [1690221695853] [38924:6603872] [DMG] AttributePathIB = + [1690221695853] [38924:6603872] [DMG] { + [1690221695853] [38924:6603872] [DMG] Endpoint = 0x0, + [1690221695853] [38924:6603872] [DMG] Cluster = 0x3c, + [1690221695853] [38924:6603872] [DMG] Attribute = 0x0000_0000, + [1690221695853] [38924:6603872] [DMG] } + [1690221695853] [38924:6603872] [DMG] + [1690221695853] [38924:6603872] [DMG] Data = 0, + [1690221695853] [38924:6603872] [DMG] }, + [1690221695853] [38924:6603872] [DMG] + [1690221695853] [38924:6603872] [DMG] }, + [1690221695853] [38924:6603872] [DMG] + [1690221695853] [38924:6603872] [DMG] ], + [1690221695853] [38924:6603872] [DMG] + [1690221695853] [38924:6603872] [DMG] InteractionModelRevision = 1 + [1690221695853] [38924:6603872] [DMG] } + [1690221695854] [38924:6603872] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299804 + [1690221695854] [38924:6603872] [TOO] WindowStatus: 0 + [1690221695854] [38924:6603872] [DMG] MoveToState ReadClient[0x13d005930]: Moving to [AwaitingSu] + disabled: true + + - label: "Step 3: TH_CR1 subscribes to AdminFabricIndex attribute on DUT_CE" + PICS: CADMIN.S.A0001 + verification: | + In the interactive mode of TH_CR1, subscribe to adminfabricindex attribute, + + administratorcommissioning subscribe admin-fabric-index 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs verify for adminfabricindex subscription notification, + + + ReportDataMessage = + [1690221746097] [38924:6605744] [DMG] { + [1690221746097] [38924:6605744] [DMG] SubscriptionId = 0xfdf9f50f, + [1690221746097] [38924:6605744] [DMG] AttributeReportIBs = + [1690221746097] [38924:6605744] [DMG] [ + [1690221746097] [38924:6605744] [DMG] AttributeReportIB = + [1690221746097] [38924:6605744] [DMG] { + [1690221746097] [38924:6605744] [DMG] AttributeDataIB = + [1690221746097] [38924:6605744] [DMG] { + [1690221746097] [38924:6605744] [DMG] DataVersion = 0xed5d129c, + [1690221746097] [38924:6605744] [DMG] AttributePathIB = + [1690221746097] [38924:6605744] [DMG] { + [1690221746097] [38924:6605744] [DMG] Endpoint = 0x0, + [1690221746097] [38924:6605744] [DMG] Cluster = 0x3c, + [1690221746097] [38924:6605744] [DMG] Attribute = 0x0000_0001, + [1690221746097] [38924:6605744] [DMG] } + [1690221746097] [38924:6605744] [DMG] + [1690221746097] [38924:6605744] [DMG] Data = NULL + [1690221746097] [38924:6605744] [DMG] }, + [1690221746097] [38924:6605744] [DMG] + [1690221746097] [38924:6605744] [DMG] }, + [1690221746097] [38924:6605744] [DMG] + [1690221746097] [38924:6605744] [DMG] ], + [1690221746097] [38924:6605744] [DMG] + [1690221746097] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221746097] [38924:6605744] [DMG] } + [1690221746098] [38924:6605744] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299804 + [1690221746098] [38924:6605744] [TOO] AdminFabricIndex: null + [1690221746098] [38924:6605744] [DMG] MoveToState ReadClient[0x12ae06a20]: Moving to [AwaitingSu] + disabled: true + + - label: "Step 4: TH_CR1 subscribes to AdminVendorId attribute on DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In the interactive mode of TH_CR1, subscribe to adminvendorid attribute, + + administratorcommissioning subscribe admin-vendor-id 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs, verify for adminvendorid subscription notification + + + + ReportDataMessage = + [1690221782311] [38924:6605744] [DMG] { + [1690221782311] [38924:6605744] [DMG] SubscriptionId = 0xee00906f, + [1690221782311] [38924:6605744] [DMG] AttributeReportIBs = + [1690221782311] [38924:6605744] [DMG] [ + [1690221782311] [38924:6605744] [DMG] AttributeReportIB = + [1690221782311] [38924:6605744] [DMG] { + [1690221782311] [38924:6605744] [DMG] AttributeDataIB = + [1690221782311] [38924:6605744] [DMG] { + [1690221782311] [38924:6605744] [DMG] DataVersion = 0xed5d129c, + [1690221782311] [38924:6605744] [DMG] AttributePathIB = + [1690221782311] [38924:6605744] [DMG] { + [1690221782311] [38924:6605744] [DMG] Endpoint = 0x0, + [1690221782311] [38924:6605744] [DMG] Cluster = 0x3c, + [1690221782311] [38924:6605744] [DMG] Attribute = 0x0000_0002, + [1690221782311] [38924:6605744] [DMG] } + [1690221782311] [38924:6605744] [DMG] + [1690221782311] [38924:6605744] [DMG] Data = NULL + [1690221782311] [38924:6605744] [DMG] }, + [1690221782312] [38924:6605744] [DMG] + [1690221782312] [38924:6605744] [DMG] }, + [1690221782312] [38924:6605744] [DMG] + [1690221782312] [38924:6605744] [DMG] ], + [1690221782312] [38924:6605744] [DMG] + [1690221782312] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221782312] [38924:6605744] [DMG] } + [1690221782312] [38924:6605744] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299804 + [1690221782312] [38924:6605744] [TOO] AdminVendorId: null + [1690221782312] [38924:6605744] [DMG] MoveToState ReadClient[0x12ae06380]: Moving to [AwaitingSu] + disabled: true + + - label: + "Step 5: TH_CR1 opens a commissioning window on DUT_CE using BCM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C01.Rsp + verification: | + In the interactive mode of TH_CR1, send command to open commissioning window using BCM, + + administratorcommissioning open-basic-commissioning-window 180 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + + On TH_CR1 logs, verify for pairing window to be successfully opened + + InvokeResponseMessage = + [1690221880347] [38924:6605744] [DMG] { + [1690221880348] [38924:6605744] [DMG] suppressResponse = false, + [1690221880348] [38924:6605744] [DMG] InvokeResponseIBs = + [1690221880348] [38924:6605744] [DMG] [ + [1690221880348] [38924:6605744] [DMG] InvokeResponseIB = + [1690221880348] [38924:6605744] [DMG] { + [1690221880348] [38924:6605744] [DMG] CommandStatusIB = + [1690221880348] [38924:6605744] [DMG] { + [1690221880348] [38924:6605744] [DMG] CommandPathIB = + [1690221880348] [38924:6605744] [DMG] { + [1690221880348] [38924:6605744] [DMG] EndpointId = 0x0, + [1690221880348] [38924:6605744] [DMG] ClusterId = 0x3c, + [1690221880348] [38924:6605744] [DMG] CommandId = 0x1, + [1690221880348] [38924:6605744] [DMG] }, + [1690221880348] [38924:6605744] [DMG] + [1690221880348] [38924:6605744] [DMG] StatusIB = + [1690221880348] [38924:6605744] [DMG] { + [1690221880348] [38924:6605744] [DMG] status = 0x00 (SUCCESS), + [1690221880348] [38924:6605744] [DMG] }, + [1690221880348] [38924:6605744] [DMG] + [1690221880348] [38924:6605744] [DMG] }, + [1690221880348] [38924:6605744] [DMG] + [1690221880348] [38924:6605744] [DMG] }, + [1690221880348] [38924:6605744] [DMG] + [1690221880348] [38924:6605744] [DMG] ], + [1690221880348] [38924:6605744] [DMG] + [1690221880348] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221880348] [38924:6605744] [DMG] }, + [1690221880348] [38924:6605744] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1690221880348] [38924:6605744] [DMG] ICR moving to [AwaitingDe] + [1690221880348] [38924:6605744] [EM] <<< [E:2299i S:948 M:8871629 (Ack:208014002)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 6: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + ReportDataMessage = + [1690221880349] [38924:6605744] [DMG] { + [1690221880349] [38924:6605744] [DMG] SubscriptionId = 0xacfb278e, + [1690221880349] [38924:6605744] [DMG] AttributeReportIBs = + [1690221880349] [38924:6605744] [DMG] [ + [1690221880349] [38924:6605744] [DMG] AttributeReportIB = + [1690221880349] [38924:6605744] [DMG] { + [1690221880349] [38924:6605744] [DMG] AttributeDataIB = + [1690221880349] [38924:6605744] [DMG] { + [1690221880349] [38924:6605744] [DMG] DataVersion = 0xed5d129f, + [1690221880349] [38924:6605744] [DMG] AttributePathIB = + [1690221880349] [38924:6605744] [DMG] { + [1690221880349] [38924:6605744] [DMG] Endpoint = 0x0, + [1690221880349] [38924:6605744] [DMG] Cluster = 0x3c, + [1690221880349] [38924:6605744] [DMG] Attribute = 0x0000_0000, + [1690221880349] [38924:6605744] [DMG] } + [1690221880349] [38924:6605744] [DMG] + [1690221880349] [38924:6605744] [DMG] Data = 2, + [1690221880349] [38924:6605744] [DMG] }, + [1690221880349] [38924:6605744] [DMG] + [1690221880349] [38924:6605744] [DMG] }, + [1690221880349] [38924:6605744] [DMG] + [1690221880349] [38924:6605744] [DMG] ], + [1690221880349] [38924:6605744] [DMG] + [1690221880349] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221880349] [38924:6605744] [DMG] } + [1690221880349] [38924:6605744] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299807 + [1690221880349] [38924:6605744] [TOO] WindowStatus: 2 + [1690221880349] [38924:6605744] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xacfb278e Peer = 01:0000000000000001 + [1690221880349] [38924:6605744] [EM] <<< [E:20748r S:948 M:8871630 (Ack:208014003)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221880349] [38924:6605744] [IN] (S) Sending msg 8871630 on secure session with LSID: 948 + [1690221880352] [38924:6605744] [EM] >>> [E:20749r S:948 M:208014004] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221880352] [38924:6605744] [EM] Handling via exchange: 20749r, Delegate: 0x105234be0 + [1690221880352] [38924:6605744] [DMG] ReportDataMessage = + [1690221880352] [38924:6605744] [DMG] { + [1690221880352] [38924:6605744] [DMG] SubscriptionId = 0xfdf9f50f, + [1690221880352] [38924:6605744] [DMG] AttributeReportIBs = + [1690221880352] [38924:6605744] [DMG] [ + [1690221880352] [38924:6605744] [DMG] AttributeReportIB = + [1690221880352] [38924:6605744] [DMG] { + [1690221880352] [38924:6605744] [DMG] AttributeDataIB = + [1690221880352] [38924:6605744] [DMG] { + [1690221880352] [38924:6605744] [DMG] DataVersion = 0xed5d129f, + [1690221880352] [38924:6605744] [DMG] AttributePathIB = + [1690221880352] [38924:6605744] [DMG] { + [1690221880352] [38924:6605744] [DMG] Endpoint = 0x0, + [1690221880352] [38924:6605744] [DMG] Cluster = 0x3c, + [1690221880352] [38924:6605744] [DMG] Attribute = 0x0000_0001, + [1690221880352] [38924:6605744] [DMG] } + [1690221880352] [38924:6605744] [DMG] + [1690221880352] [38924:6605744] [DMG] Data = 1, + [1690221880352] [38924:6605744] [DMG] }, + [1690221880352] [38924:6605744] [DMG] + [1690221880352] [38924:6605744] [DMG] }, + [1690221880352] [38924:6605744] [DMG] + [1690221880352] [38924:6605744] [DMG] ], + [1690221880352] [38924:6605744] [DMG] + [1690221880352] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221880352] [38924:6605744] [DMG] } + [1690221880352] [38924:6605744] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299807 + [1690221880352] [38924:6605744] [TOO] AdminFabricIndex: 1 + [1690221880352] [38924:6605744] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfdf9f50f Peer = 01:0000000000000001 + [1690221880352] [38924:6605744] [EM] <<< [E:20749r S:948 M:8871631 (Ack:208014004)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221880352] [38924:6605744] [IN] (S) Sending msg 8871631 on secure session with LSID: 948 + [1690221880354] [38924:6605744] [EM] >>> [E:20750r S:948 M:208014005] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221880354] [38924:6605744] [EM] Handling via exchange: 20750r, Delegate: 0x105234be0 + [1690221880354] [38924:6605744] [DMG] ReportDataMessage = + [1690221880354] [38924:6605744] [DMG] { + [1690221880354] [38924:6605744] [DMG] SubscriptionId = 0xee00906f, + [1690221880354] [38924:6605744] [DMG] AttributeReportIBs = + [1690221880354] [38924:6605744] [DMG] [ + [1690221880354] [38924:6605744] [DMG] AttributeReportIB = + [1690221880354] [38924:6605744] [DMG] { + [1690221880354] [38924:6605744] [DMG] AttributeDataIB = + [1690221880354] [38924:6605744] [DMG] { + [1690221880354] [38924:6605744] [DMG] DataVersion = 0xed5d129f, + [1690221880354] [38924:6605744] [DMG] AttributePathIB = + [1690221880354] [38924:6605744] [DMG] { + [1690221880354] [38924:6605744] [DMG] Endpoint = 0x0, + [1690221880354] [38924:6605744] [DMG] Cluster = 0x3c, + [1690221880354] [38924:6605744] [DMG] Attribute = 0x0000_0002, + [1690221880354] [38924:6605744] [DMG] } + [1690221880354] [38924:6605744] [DMG] + [1690221880354] [38924:6605744] [DMG] Data = 65521, + [1690221880354] [38924:6605744] [DMG] }, + [1690221880354] [38924:6605744] [DMG] + [1690221880354] [38924:6605744] [DMG] }, + [1690221880354] [38924:6605744] [DMG] + [1690221880354] [38924:6605744] [DMG] ], + [1690221880354] [38924:6605744] [DMG] + [1690221880354] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221880354] [38924:6605744] [DMG] } + [1690221880354] [38924:6605744] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299807 + [1690221880354] [38924:6605744] [TOO] AdminVendorId: 65521 + [1690221880354] [38924:6605744] [DMG] Refresh LivenessCheckTime f + disabled: true + + - label: "Step 7: TH_CR2 starts a commissioning process with DUT_CE" + PICS: CADMIN.S + verification: | + On TH_CR2 start interactive mode, + + ./chip-tool interactive start + + In the interactive mode of TH_CR2, start commissioning process + + + pairing code 1 34970112332 --commissioner-name beta + + + [1690221962385] [38923:6603855] [DMG] }, + [1690221962385] [38923:6603855] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1690221962385] [38923:6603855] [CTL] Received CommissioningComplete response, errorCode=0 + [1690221962385] [38923:6603855] [CTL] Successfully finished commissioning step 'SendComplete' + [1690221962385] [38923:6603855] [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1690221962385] [38923:6603855] [CTL] Performing next commissioning step 'Cleanup' + [1690221962385] [38923:6603855] [IN] SecureSession[0x600002f90000]: MarkForEviction Type:1 LSID:46404 + [1690221962386] [38923:6603855] [SC] SecureSession[0x600002f90000, LSID:46404]: State change 'kActive' --> 'kPendingEviction' + [1690221962386] [38923:6603855] [IN] SecureSession[0x600002f90000]: Released - Type:1 LSID:46404 + [1690221962386] [38923:6603855] [CTL] Successfully finished commissioning step 'Cleanup' + [1690221962386] [38923:6603855] [TOO] Device commissioning completed with success + disabled: true + + - label: + "Step 8: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + ReportDataMessage = + [1690221962546] [38924:6607510] [DMG] { + [1690221962546] [38924:6607510] [DMG] SubscriptionId = 0xacfb278e, + [1690221962546] [38924:6607510] [DMG] AttributeReportIBs = + [1690221962546] [38924:6607510] [DMG] [ + [1690221962546] [38924:6607510] [DMG] AttributeReportIB = + [1690221962546] [38924:6607510] [DMG] { + [1690221962546] [38924:6607510] [DMG] AttributeDataIB = + [1690221962546] [38924:6607510] [DMG] { + [1690221962546] [38924:6607510] [DMG] DataVersion = 0xed5d12a2, + [1690221962546] [38924:6607510] [DMG] AttributePathIB = + [1690221962546] [38924:6607510] [DMG] { + [1690221962546] [38924:6607510] [DMG] Endpoint = 0x0, + [1690221962546] [38924:6607510] [DMG] Cluster = 0x3c, + [1690221962546] [38924:6607510] [DMG] Attribute = 0x0000_0000, + [1690221962546] [38924:6607510] [DMG] } + [1690221962546] [38924:6607510] [DMG] + [1690221962546] [38924:6607510] [DMG] Data = 0, + [1690221962546] [38924:6607510] [DMG] }, + [1690221962546] [38924:6607510] [DMG] + [1690221962546] [38924:6607510] [DMG] }, + [1690221962546] [38924:6607510] [DMG] + [1690221962546] [38924:6607510] [DMG] ], + [1690221962546] [38924:6607510] [DMG] + [1690221962546] [38924:6607510] [DMG] InteractionModelRevision = 1 + [1690221962546] [38924:6607510] [DMG] } + [1690221962546] [38924:6607510] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299810 + [1690221962546] [38924:6607510] [TOO] WindowStatus: 0 + [1690221962546] [38924:6607510] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xacfb278e Peer = 01:0000000000000001 + [1690221962546] [38924:6607510] [EM] <<< [E:20751r S:948 M:8871633 (Ack:208014009)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221962546] [38924:6607510] [IN] (S) Sending msg 8871633 on secure session with LSID: 948 + [1690221962549] [38924:6607510] [EM] >>> [E:20752r S:948 M:208014010] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221962550] [38924:6607510] [EM] Handling via exchange: 20752r, Delegate: 0x105234be0 + [1690221962550] [38924:6607510] [DMG] ReportDataMessage = + [1690221962550] [38924:6607510] [DMG] { + [1690221962550] [38924:6607510] [DMG] SubscriptionId = 0xfdf9f50f, + [1690221962550] [38924:6607510] [DMG] AttributeReportIBs = + [1690221962550] [38924:6607510] [DMG] [ + [1690221962550] [38924:6607510] [DMG] AttributeReportIB = + [1690221962550] [38924:6607510] [DMG] { + [1690221962550] [38924:6607510] [DMG] AttributeDataIB = + [1690221962550] [38924:6607510] [DMG] { + [1690221962550] [38924:6607510] [DMG] DataVersion = 0xed5d12a2, + [1690221962550] [38924:6607510] [DMG] AttributePathIB = + [1690221962550] [38924:6607510] [DMG] { + [1690221962550] [38924:6607510] [DMG] Endpoint = 0x0, + [1690221962550] [38924:6607510] [DMG] Cluster = 0x3c, + [1690221962550] [38924:6607510] [DMG] Attribute = 0x0000_0001, + [1690221962550] [38924:6607510] [DMG] } + [1690221962550] [38924:6607510] [DMG] + [1690221962550] [38924:6607510] [DMG] Data = NULL + [1690221962550] [38924:6607510] [DMG] }, + [1690221962550] [38924:6607510] [DMG] + [1690221962550] [38924:6607510] [DMG] }, + [1690221962550] [38924:6607510] [DMG] + [1690221962550] [38924:6607510] [DMG] ], + [1690221962550] [38924:6607510] [DMG] + [1690221962550] [38924:6607510] [DMG] InteractionModelRevision = 1 + [1690221962550] [38924:6607510] [DMG] } + [1690221962550] [38924:6607510] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299810 + [1690221962550] [38924:6607510] [TOO] AdminFabricIndex: null + [1690221962550] [38924:6607510] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfdf9f50f Peer = 01:0000000000000001 + [1690221962550] [38924:6607510] [EM] <<< [E:20752r S:948 M:8871634 (Ack:208014010)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221962550] [38924:6607510] [IN] (S) Sending msg 8871634 on secure session with LSID: 948 + [1690221962550] [38924:6607510] [EM] >>> [E:20753r S:948 M:208014011] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221962550] [38924:6607510] [EM] Handling via exchange: 20753r, Delegate: 0x105234be0 + [1690221962551] [38924:6607510] [DMG] ReportDataMessage = + [1690221962551] [38924:6607510] [DMG] { + [1690221962551] [38924:6607510] [DMG] SubscriptionId = 0xee00906f, + [1690221962551] [38924:6607510] [DMG] AttributeReportIBs = + [1690221962551] [38924:6607510] [DMG] [ + [1690221962551] [38924:6607510] [DMG] AttributeReportIB = + [1690221962551] [38924:6607510] [DMG] { + [1690221962551] [38924:6607510] [DMG] AttributeDataIB = + [1690221962551] [38924:6607510] [DMG] { + [1690221962551] [38924:6607510] [DMG] DataVersion = 0xed5d12a2, + [1690221962551] [38924:6607510] [DMG] AttributePathIB = + [1690221962551] [38924:6607510] [DMG] { + [1690221962551] [38924:6607510] [DMG] Endpoint = 0x0, + [1690221962551] [38924:6607510] [DMG] Cluster = 0x3c, + [1690221962551] [38924:6607510] [DMG] Attribute = 0x0000_0002, + [1690221962551] [38924:6607510] [DMG] } + [1690221962551] [38924:6607510] [DMG] + [1690221962551] [38924:6607510] [DMG] Data = NULL + [1690221962551] [38924:6607510] [DMG] }, + [1690221962551] [38924:6607510] [DMG] + [1690221962551] [38924:6607510] [DMG] }, + [1690221962551] [38924:6607510] [DMG] + [1690221962551] [38924:6607510] [DMG] ], + [1690221962551] [38924:6607510] [DMG] + [1690221962551] [38924:6607510] [DMG] InteractionModelRevision = 1 + [1690221962551] [38924:6607510] [DMG] } + [1690221962551] [38924:6607510] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299810 + [1690221962551] [38924:6607510] [TOO] AdminVendorId: null + [1690221962551] [38924:6607510] [DMG] Refresh LivenessCheckTime for 3004224 + disabled: true + + - label: "Step 9: TH_CR2 subscribes to WindowStatus attribute on DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In the interactive mode of TH_CR2, subscribe to windowstatus attribute, + + administratorcommissioning subscribe window-status 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for windowstatus subscription notification + + + ReportDataMessage = + [1690222029258] [38923:6603855] [DMG] { + [1690222029258] [38923:6603855] [DMG] SubscriptionId = 0x225d94ef, + [1690222029258] [38923:6603855] [DMG] AttributeReportIBs = + [1690222029258] [38923:6603855] [DMG] [ + [1690222029258] [38923:6603855] [DMG] AttributeReportIB = + [1690222029258] [38923:6603855] [DMG] { + [1690222029258] [38923:6603855] [DMG] AttributeDataIB = + [1690222029258] [38923:6603855] [DMG] { + [1690222029258] [38923:6603855] [DMG] DataVersion = 0xed5d12a2, + [1690222029258] [38923:6603855] [DMG] AttributePathIB = + [1690222029258] [38923:6603855] [DMG] { + [1690222029258] [38923:6603855] [DMG] Endpoint = 0x0, + [1690222029258] [38923:6603855] [DMG] Cluster = 0x3c, + [1690222029258] [38923:6603855] [DMG] Attribute = 0x0000_0000, + [1690222029258] [38923:6603855] [DMG] } + [1690222029258] [38923:6603855] [DMG] + [1690222029258] [38923:6603855] [DMG] Data = 0, + [1690222029258] [38923:6603855] [DMG] }, + [1690222029258] [38923:6603855] [DMG] + [1690222029258] [38923:6603855] [DMG] }, + [1690222029258] [38923:6603855] [DMG] + [1690222029258] [38923:6603855] [DMG] ], + [1690222029258] [38923:6603855] [DMG] + [1690222029258] [38923:6603855] [DMG] InteractionModelRevision = 1 + [1690222029258] [38923:6603855] [DMG] } + [1690222029258] [38923:6603855] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299810 + [1690222029258] [38923:6603855] [TOO] WindowStatus: 0 + [1690222029258] [38923:6603855] [DMG] MoveToState ReadClient[0x141f07820]: Moving to [AwaitingSu] + disabled: true + + - label: + "Step 10: TH_CR2 subscribes to AdminFabricIndex attribute on DUT_CE" + PICS: CADMIN.S.A0001 + verification: | + In the interactive mode of TH_CR2, subscribe to adminfabricindex attribute, + + administratorcommissioning subscribe admin-fabric-index 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for adminfabricindex subscription notification + + + ReportDataMessage = + [1690222061226] [38923:6603855] [DMG] { + [1690222061226] [38923:6603855] [DMG] SubscriptionId = 0x86a3ec94, + [1690222061226] [38923:6603855] [DMG] AttributeReportIBs = + [1690222061226] [38923:6603855] [DMG] [ + [1690222061226] [38923:6603855] [DMG] AttributeReportIB = + [1690222061226] [38923:6603855] [DMG] { + [1690222061226] [38923:6603855] [DMG] AttributeDataIB = + [1690222061226] [38923:6603855] [DMG] { + [1690222061226] [38923:6603855] [DMG] DataVersion = 0xed5d12a2, + [1690222061226] [38923:6603855] [DMG] AttributePathIB = + [1690222061226] [38923:6603855] [DMG] { + [1690222061226] [38923:6603855] [DMG] Endpoint = 0x0, + [1690222061226] [38923:6603855] [DMG] Cluster = 0x3c, + [1690222061226] [38923:6603855] [DMG] Attribute = 0x0000_0001, + [1690222061226] [38923:6603855] [DMG] } + [1690222061226] [38923:6603855] [DMG] + [1690222061226] [38923:6603855] [DMG] Data = NULL + [1690222061226] [38923:6603855] [DMG] }, + [1690222061226] [38923:6603855] [DMG] + [1690222061226] [38923:6603855] [DMG] }, + [1690222061226] [38923:6603855] [DMG] + [1690222061226] [38923:6603855] [DMG] ], + [1690222061226] [38923:6603855] [DMG] + [1690222061226] [38923:6603855] [DMG] InteractionModelRevision = 1 + [1690222061226] [38923:6603855] [DMG] } + [1690222061226] [38923:6603855] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299810 + [1690222061226] [38923:6603855] [TOO] AdminFabricIndex: null + [1690222061226] [38923:6603855] [DMG] MoveToState ReadClient[0x1431042e0]: Moving to [AwaitingSu] + [1690222061226] [38923:6603855] [EM] <<< [E:24082i S:46406 M:27652515 (Ack:25511782)] (S) Msg TX to 1 + disabled: true + + - label: "Step 11: TH_CR2 subscribes to AdminVendorId attribute on DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In the interactive mode of TH_CR2, subscribe to adminvendorid attribute, + + administratorcommissioning subscribe admin-vendor-id 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for adminvendorid subscription notification + + + ReportDataMessage = + [1690222096808] [38923:6603855] [DMG] { + [1690222096808] [38923:6603855] [DMG] SubscriptionId = 0x9ce33771, + [1690222096808] [38923:6603855] [DMG] AttributeReportIBs = + [1690222096808] [38923:6603855] [DMG] [ + [1690222096808] [38923:6603855] [DMG] AttributeReportIB = + [1690222096808] [38923:6603855] [DMG] { + [1690222096808] [38923:6603855] [DMG] AttributeDataIB = + [1690222096808] [38923:6603855] [DMG] { + [1690222096808] [38923:6603855] [DMG] DataVersion = 0xed5d12a2, + [1690222096808] [38923:6603855] [DMG] AttributePathIB = + [1690222096808] [38923:6603855] [DMG] { + [1690222096808] [38923:6603855] [DMG] Endpoint = 0x0, + [1690222096808] [38923:6603855] [DMG] Cluster = 0x3c, + [1690222096808] [38923:6603855] [DMG] Attribute = 0x0000_0002, + [1690222096808] [38923:6603855] [DMG] } + [1690222096809] [38923:6603855] [DMG] + [1690222096809] [38923:6603855] [DMG] Data = NULL + [1690222096809] [38923:6603855] [DMG] }, + [1690222096809] [38923:6603855] [DMG] + [1690222096809] [38923:6603855] [DMG] }, + [1690222096809] [38923:6603855] [DMG] + [1690222096809] [38923:6603855] [DMG] ], + [1690222096809] [38923:6603855] [DMG] + [1690222096809] [38923:6603855] [DMG] InteractionModelRevision = 1 + [1690222096809] [38923:6603855] [DMG] } + [1690222096809] [38923:6603855] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299810 + [1690222096809] [38923:6603855] [TOO] AdminVendorId: null + [1690222096809] [38923:6603855] [DMG] MoveToState ReadClient[0x141f07eb0]: Moving to [AwaitingSu] + [1690222096809] [38923:6603855] [EM] <<< [E:24083i S:46406 M:27652518 (Ack:25511784)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 12: TH_CR1 opens a commissioning window on DUT_CE using BCM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C01.Rsp + verification: | + In the interactive mode of TH_CR1, send command to open commissioning window using BCM, + + + administratorcommissioning open-basic-commissioning-window 180 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + On TH_CR1 logs, verify for success response + + + InvokeResponseMessage = + [1690222161322] [38924:6608668] [DMG] { + [1690222161322] [38924:6608668] [DMG] suppressResponse = false, + [1690222161322] [38924:6608668] [DMG] InvokeResponseIBs = + [1690222161322] [38924:6608668] [DMG] [ + [1690222161322] [38924:6608668] [DMG] InvokeResponseIB = + [1690222161322] [38924:6608668] [DMG] { + [1690222161322] [38924:6608668] [DMG] CommandStatusIB = + [1690222161322] [38924:6608668] [DMG] { + [1690222161322] [38924:6608668] [DMG] CommandPathIB = + [1690222161322] [38924:6608668] [DMG] { + [1690222161322] [38924:6608668] [DMG] EndpointId = 0x0, + [1690222161322] [38924:6608668] [DMG] ClusterId = 0x3c, + [1690222161322] [38924:6608668] [DMG] CommandId = 0x1, + [1690222161322] [38924:6608668] [DMG] }, + [1690222161322] [38924:6608668] [DMG] + [1690222161322] [38924:6608668] [DMG] StatusIB = + [1690222161322] [38924:6608668] [DMG] { + [1690222161322] [38924:6608668] [DMG] status = 0x00 (SUCCESS), + [1690222161322] [38924:6608668] [DMG] }, + [1690222161322] [38924:6608668] [DMG] + [1690222161322] [38924:6608668] [DMG] }, + [1690222161322] [38924:6608668] [DMG] + [1690222161322] [38924:6608668] [DMG] }, + [1690222161322] [38924:6608668] [DMG] + [1690222161322] [38924:6608668] [DMG] ], + [1690222161322] [38924:6608668] [DMG] + [1690222161322] [38924:6608668] [DMG] InteractionModelRevision = 1 + [1690222161322] [38924:6608668] [DMG] }, + [1690222161322] [38924:6608668] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1690222161322] [38924:6608668] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 13: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + ReportDataMessage = + [1690222337066] [38924:6614288] [DMG] { + [1690222337066] [38924:6614288] [DMG] SubscriptionId = 0xdba23243, + [1690222337066] [38924:6614288] [DMG] AttributeReportIBs = + [1690222337066] [38924:6614288] [DMG] [ + [1690222337066] [38924:6614288] [DMG] AttributeReportIB = + [1690222337066] [38924:6614288] [DMG] { + [1690222337066] [38924:6614288] [DMG] AttributeDataIB = + [1690222337066] [38924:6614288] [DMG] { + [1690222337066] [38924:6614288] [DMG] DataVersion = 0xed5d12ab, + [1690222337066] [38924:6614288] [DMG] AttributePathIB = + [1690222337066] [38924:6614288] [DMG] { + [1690222337066] [38924:6614288] [DMG] Endpoint = 0x0, + [1690222337067] [38924:6614288] [DMG] Cluster = 0x3c, + [1690222337067] [38924:6614288] [DMG] Attribute = 0x0000_0000, + [1690222337067] [38924:6614288] [DMG] } + [1690222337067] [38924:6614288] [DMG] + [1690222337067] [38924:6614288] [DMG] Data = 2, + [1690222337067] [38924:6614288] [DMG] }, + [1690222337067] [38924:6614288] [DMG] + [1690222337067] [38924:6614288] [DMG] }, + [1690222337067] [38924:6614288] [DMG] + [1690222337067] [38924:6614288] [DMG] ], + [1690222337067] [38924:6614288] [DMG] + [1690222337067] [38924:6614288] [DMG] InteractionModelRevision = 1 + [1690222337067] [38924:6614288] [DMG] } + [1690222337067] [38924:6614288] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299819 + [1690222337067] [38924:6614288] [TOO] WindowStatus: 2 + [1690222337067] [38924:6614288] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690222337067] [38924:6614288] [EM] <<< [E:20766r S:948 M:8871656 (Ack:208014028)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222337067] [38924:6614288] [IN] (S) Sending msg 8871656 on secure session with LSID: 948 + [1690222337075] [38924:6614288] [EM] >>> [E:20767r S:948 M:208014029] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222337075] [38924:6614288] [EM] Handling via exchange: 20767r, Delegate: 0x105234be0 + [1690222337075] [38924:6614288] [DMG] ReportDataMessage = + [1690222337075] [38924:6614288] [DMG] { + [1690222337075] [38924:6614288] [DMG] SubscriptionId = 0x3621ba48, + [1690222337075] [38924:6614288] [DMG] AttributeReportIBs = + [1690222337075] [38924:6614288] [DMG] [ + [1690222337075] [38924:6614288] [DMG] AttributeReportIB = + [1690222337075] [38924:6614288] [DMG] { + [1690222337075] [38924:6614288] [DMG] AttributeDataIB = + [1690222337075] [38924:6614288] [DMG] { + [1690222337075] [38924:6614288] [DMG] DataVersion = 0xed5d12ab, + [1690222337075] [38924:6614288] [DMG] AttributePathIB = + [1690222337075] [38924:6614288] [DMG] { + [1690222337075] [38924:6614288] [DMG] Endpoint = 0x0, + [1690222337075] [38924:6614288] [DMG] Cluster = 0x3c, + [1690222337075] [38924:6614288] [DMG] Attribute = 0x0000_0002, + [1690222337075] [38924:6614288] [DMG] } + [1690222337075] [38924:6614288] [DMG] + [1690222337075] [38924:6614288] [DMG] Data = 65521, + [1690222337075] [38924:6614288] [DMG] }, + [1690222337075] [38924:6614288] [DMG] + [1690222337075] [38924:6614288] [DMG] }, + [1690222337075] [38924:6614288] [DMG] + [1690222337075] [38924:6614288] [DMG] ], + [1690222337075] [38924:6614288] [DMG] + [1690222337075] [38924:6614288] [DMG] InteractionModelRevision = 1 + [1690222337075] [38924:6614288] [DMG] } + [1690222337075] [38924:6614288] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299819 + [1690222337075] [38924:6614288] [TOO] AdminVendorId: 65521 + [1690222337075] [38924:6614288] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690222337076] [38924:6614288] [EM] <<< [E:20767r S:948 M:8871657 (Ack:208014029)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222337076] [38924:6614288] [IN] (S) Sending msg 8871657 on secure session with LSID: 948 + [1690222337102] [38924:6614288] [EM] >>> [E:20766r S:948 M:208014030 (Ack:8871656)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222337102] [38924:6614288] [EM] Found matching exchange: 20766r, Delegate: 0x0 + [1690222337102] [38924:6614288] [EM] Rxd Ack; Removing MessageCounter:8871656 from Retrans Table on exchange 20766r + [1690222337102] [38924:6614288] [EM] >>> [E:20767r S:948 M:208014031 (Ack:8871657)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222337102] [38924:6614288] [EM] Found matching exchange: 20767r, Delegate: 0x0 + [1690222337102] [38924:6614288] [EM] Rxd Ack; Removing MessageCounter:8871657 from Retrans Table on exchange 20767r + [1690222337955] [38924:6614165] [EM] >>> [E:20768r S:948 M:208014032] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222337955] [38924:6614165] [EM] Handling via exchange: 20768r, Delegate: 0x105234be0 + [1690222337955] [38924:6614165] [DMG] ReportDataMessage = + [1690222337955] [38924:6614165] [DMG] { + [1690222337955] [38924:6614165] [DMG] SubscriptionId = 0x4daaefab, + [1690222337955] [38924:6614165] [DMG] AttributeReportIBs = + [1690222337955] [38924:6614165] [DMG] [ + [1690222337955] [38924:6614165] [DMG] AttributeReportIB = + [1690222337955] [38924:6614165] [DMG] { + [1690222337955] [38924:6614165] [DMG] AttributeDataIB = + [1690222337955] [38924:6614165] [DMG] { + [1690222337955] [38924:6614165] [DMG] DataVersion = 0xed5d12ab, + [1690222337955] [38924:6614165] [DMG] AttributePathIB = + [1690222337955] [38924:6614165] [DMG] { + [1690222337955] [38924:6614165] [DMG] Endpoint = 0x0, + [1690222337955] [38924:6614165] [DMG] Cluster = 0x3c, + [1690222337955] [38924:6614165] [DMG] Attribute = 0x0000_0001, + [1690222337955] [38924:6614165] [DMG] } + [1690222337955] [38924:6614165] [DMG] + [1690222337955] [38924:6614165] [DMG] Data = 1, + [1690222337955] [38924:6614165] [DMG] }, + [1690222337955] [38924:6614165] [DMG] + [1690222337955] [38924:6614165] [DMG] }, + [1690222337955] [38924:6614165] [DMG] + [1690222337955] [38924:6614165] [DMG] ], + [1690222337955] [38924:6614165] [DMG] + [1690222337955] [38924:6614165] [DMG] InteractionModelRevision = 1 + [1690222337955] [38924:6614165] [DMG] } + [1690222337955] [38924:6614165] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299819 + [1690222337955] [38924:6614165] [TOO] AdminFabricIndex: 1 + [1690222337955] [38924:6614165] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690222337955] [38924:6614165] [EM] <<< [E:20768r S:948 M:8871658 (Ack:208014032)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 14: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + ReportDataMessage = + [1690222337060] [38923:6611953] [DMG] { + [1690222337060] [38923:6611953] [DMG] SubscriptionId = 0x225d94ef, + [1690222337060] [38923:6611953] [DMG] AttributeReportIBs = + [1690222337060] [38923:6611953] [DMG] [ + [1690222337060] [38923:6611953] [DMG] AttributeReportIB = + [1690222337060] [38923:6611953] [DMG] { + [1690222337060] [38923:6611953] [DMG] AttributeDataIB = + [1690222337060] [38923:6611953] [DMG] { + [1690222337060] [38923:6611953] [DMG] DataVersion = 0xed5d12ab, + [1690222337060] [38923:6611953] [DMG] AttributePathIB = + [1690222337060] [38923:6611953] [DMG] { + [1690222337060] [38923:6611953] [DMG] Endpoint = 0x0, + [1690222337060] [38923:6611953] [DMG] Cluster = 0x3c, + [1690222337060] [38923:6611953] [DMG] Attribute = 0x0000_0000, + [1690222337060] [38923:6611953] [DMG] } + [1690222337060] [38923:6611953] [DMG] + [1690222337060] [38923:6611953] [DMG] Data = 2, + [1690222337060] [38923:6611953] [DMG] }, + [1690222337060] [38923:6611953] [DMG] + [1690222337060] [38923:6611953] [DMG] }, + [1690222337060] [38923:6611953] [DMG] + [1690222337060] [38923:6611953] [DMG] ], + [1690222337060] [38923:6611953] [DMG] + [1690222337060] [38923:6611953] [DMG] InteractionModelRevision = 1 + [1690222337060] [38923:6611953] [DMG] } + [1690222337060] [38923:6611953] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299819 + [1690222337060] [38923:6611953] [TOO] WindowStatus: 2 + [1690222337060] [38923:6611953] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x225d94ef Peer = 02:0000000000000001 + [1690222337060] [38923:6611953] [EM] <<< [E:20763r S:46405 M:159263157 (Ack:256936833)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690222337060] [38923:6611953] [IN] (S) Sending msg 159263157 on secure session with LSID: 46405 + [1690222337062] [38923:6611953] [EM] >>> [E:20764r S:46406 M:25511800] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222337062] [38923:6611953] [EM] Handling via exchange: 20764r, Delegate: 0x101824be0 + [1690222337063] [38923:6611953] [DMG] ReportDataMessage = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] SubscriptionId = 0x86a3ec94, + [1690222337063] [38923:6611953] [DMG] AttributeReportIBs = + [1690222337063] [38923:6611953] [DMG] [ + [1690222337063] [38923:6611953] [DMG] AttributeReportIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] AttributeDataIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] DataVersion = 0xed5d12ab, + [1690222337063] [38923:6611953] [DMG] AttributePathIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] Endpoint = 0x0, + [1690222337063] [38923:6611953] [DMG] Cluster = 0x3c, + [1690222337063] [38923:6611953] [DMG] Attribute = 0x0000_0001, + [1690222337063] [38923:6611953] [DMG] } + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] Data = 1, + [1690222337063] [38923:6611953] [DMG] }, + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] }, + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] ], + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] InteractionModelRevision = 1 + [1690222337063] [38923:6611953] [DMG] } + [1690222337063] [38923:6611953] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299819 + [1690222337063] [38923:6611953] [TOO] AdminFabricIndex: 1 + [1690222337063] [38923:6611953] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x86a3ec94 Peer = 01:0000000000000001 + [1690222337063] [38923:6611953] [EM] <<< [E:20764r S:46406 M:27652527 (Ack:25511800)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222337063] [38923:6611953] [IN] (S) Sending msg 27652527 on secure session with LSID: 46406 + [1690222337063] [38923:6611953] [EM] >>> [E:20765r S:46406 M:25511801] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222337063] [38923:6611953] [EM] Handling via exchange: 20765r, Delegate: 0x101824be0 + [1690222337063] [38923:6611953] [DMG] ReportDataMessage = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] SubscriptionId = 0x9ce33771, + [1690222337063] [38923:6611953] [DMG] AttributeReportIBs = + [1690222337063] [38923:6611953] [DMG] [ + [1690222337063] [38923:6611953] [DMG] AttributeReportIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] AttributeDataIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] DataVersion = 0xed5d12ab, + [1690222337063] [38923:6611953] [DMG] AttributePathIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] Endpoint = 0x0, + [1690222337063] [38923:6611953] [DMG] Cluster = 0x3c, + [1690222337063] [38923:6611953] [DMG] Attribute = 0x0000_0002, + [1690222337063] [38923:6611953] [DMG] } + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] Data = 65521, + [1690222337063] [38923:6611953] [DMG] }, + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] }, + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] ], + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] InteractionModelRevision = 1 + [1690222337063] [38923:6611953] [DMG] } + [1690222337063] [38923:6611953] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299819 + [1690222337063] [38923:6611953] [TOO] AdminVendorId: 65521 + [1690222337063] [38923:6611953] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x9ce33771 Peer = 01:0000000000000001 + [1690222337063] [38923:6611953] [EM] <<< [E:20765r S:46406 M:27652528 (Ack:25511801)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 15: TH_CR1 revokes the commissioning window on DUT_CE using + RevokeCommissioning command" + PICS: CADMIN.S.C02.Rsp + verification: | + In interactive mode of TH_CR1, send command to revoke commissioning window + + administratorcommissioning revoke-commissioning 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + Verify TH_CR1 logs for status code 0 (success), + + + InvokeResponseMessage = + [1690222259687] [38924:6613195] [DMG] { + [1690222259687] [38924:6613195] [DMG] suppressResponse = false, + [1690222259687] [38924:6613195] [DMG] InvokeResponseIBs = + [1690222259687] [38924:6613195] [DMG] [ + [1690222259687] [38924:6613195] [DMG] InvokeResponseIB = + [1690222259688] [38924:6613195] [DMG] { + [1690222259688] [38924:6613195] [DMG] CommandStatusIB = + [1690222259688] [38924:6613195] [DMG] { + [1690222259688] [38924:6613195] [DMG] CommandPathIB = + [1690222259688] [38924:6613195] [DMG] { + [1690222259688] [38924:6613195] [DMG] EndpointId = 0x0, + [1690222259688] [38924:6613195] [DMG] ClusterId = 0x3c, + [1690222259688] [38924:6613195] [DMG] CommandId = 0x2, + [1690222259688] [38924:6613195] [DMG] }, + [1690222259688] [38924:6613195] [DMG] + [1690222259688] [38924:6613195] [DMG] StatusIB = + [1690222259688] [38924:6613195] [DMG] { + [1690222259688] [38924:6613195] [DMG] status = 0x00 (SUCCESS), + [1690222259688] [38924:6613195] [DMG] }, + [1690222259688] [38924:6613195] [DMG] + [1690222259688] [38924:6613195] [DMG] }, + [1690222259688] [38924:6613195] [DMG] + [1690222259688] [38924:6613195] [DMG] }, + [1690222259688] [38924:6613195] [DMG] + [1690222259688] [38924:6613195] [DMG] ], + [1690222259688] [38924:6613195] [DMG] + [1690222259688] [38924:6613195] [DMG] InteractionModelRevision = 1 + [1690222259688] [38924:6613195] [DMG] }, + [1690222259688] [38924:6613195] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 Status=0x0 + [1690222259688] [38924:6613195] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 16: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + ReportDataMessage = + [1690222392514] [38924:6615100] [DMG] { + [1690222392514] [38924:6615100] [DMG] SubscriptionId = 0xdba23243, + [1690222392514] [38924:6615100] [DMG] AttributeReportIBs = + [1690222392514] [38924:6615100] [DMG] [ + [1690222392514] [38924:6615100] [DMG] AttributeReportIB = + [1690222392514] [38924:6615100] [DMG] { + [1690222392514] [38924:6615100] [DMG] AttributeDataIB = + [1690222392514] [38924:6615100] [DMG] { + [1690222392514] [38924:6615100] [DMG] DataVersion = 0xed5d12ae, + [1690222392514] [38924:6615100] [DMG] AttributePathIB = + [1690222392514] [38924:6615100] [DMG] { + [1690222392514] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222392514] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222392514] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690222392514] [38924:6615100] [DMG] } + [1690222392514] [38924:6615100] [DMG] + [1690222392514] [38924:6615100] [DMG] Data = 0, + [1690222392514] [38924:6615100] [DMG] }, + [1690222392514] [38924:6615100] [DMG] + [1690222392514] [38924:6615100] [DMG] }, + [1690222392514] [38924:6615100] [DMG] + [1690222392514] [38924:6615100] [DMG] ], + [1690222392514] [38924:6615100] [DMG] + [1690222392514] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222392514] [38924:6615100] [DMG] } + [1690222392514] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299822 + [1690222392514] [38924:6615100] [TOO] WindowStatus: 0 + [1690222392514] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690222392514] [38924:6615100] [EM] <<< [E:20772r S:948 M:8871662 (Ack:208014036)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222392514] [38924:6615100] [IN] (S) Sending msg 8871662 on secure session with LSID: 948 + [1690222392537] [38924:6615100] [EM] >>> [E:20773r S:948 M:208014037] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222392537] [38924:6615100] [EM] Handling via exchange: 20773r, Delegate: 0x105234be0 + [1690222392537] [38924:6615100] [DMG] ReportDataMessage = + [1690222392537] [38924:6615100] [DMG] { + [1690222392537] [38924:6615100] [DMG] SubscriptionId = 0x3621ba48, + [1690222392537] [38924:6615100] [DMG] AttributeReportIBs = + [1690222392537] [38924:6615100] [DMG] [ + [1690222392537] [38924:6615100] [DMG] AttributeReportIB = + [1690222392537] [38924:6615100] [DMG] { + [1690222392537] [38924:6615100] [DMG] AttributeDataIB = + [1690222392537] [38924:6615100] [DMG] { + [1690222392537] [38924:6615100] [DMG] DataVersion = 0xed5d12ae, + [1690222392537] [38924:6615100] [DMG] AttributePathIB = + [1690222392537] [38924:6615100] [DMG] { + [1690222392537] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222392537] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222392537] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690222392537] [38924:6615100] [DMG] } + [1690222392537] [38924:6615100] [DMG] + [1690222392537] [38924:6615100] [DMG] Data = NULL + [1690222392537] [38924:6615100] [DMG] }, + [1690222392537] [38924:6615100] [DMG] + [1690222392537] [38924:6615100] [DMG] }, + [1690222392537] [38924:6615100] [DMG] + [1690222392537] [38924:6615100] [DMG] ], + [1690222392537] [38924:6615100] [DMG] + [1690222392537] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222392537] [38924:6615100] [DMG] } + [1690222392537] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299822 + [1690222392537] [38924:6615100] [TOO] AdminVendorId: null + [1690222392537] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690222392538] [38924:6615100] [EM] <<< [E:20773r S:948 M:8871663 (Ack:208014037)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222392538] [38924:6615100] [IN] (S) Sending msg 8871663 on secure session with LSID: 948 + [1690222392540] [38924:6615100] [EM] >>> [E:20774r S:948 M:208014038] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222392540] [38924:6615100] [EM] Handling via exchange: 20774r, Delegate: 0x105234be0 + [1690222392540] [38924:6615100] [DMG] ReportDataMessage = + [1690222392540] [38924:6615100] [DMG] { + [1690222392540] [38924:6615100] [DMG] SubscriptionId = 0x4daaefab, + [1690222392540] [38924:6615100] [DMG] AttributeReportIBs = + [1690222392541] [38924:6615100] [DMG] [ + [1690222392541] [38924:6615100] [DMG] AttributeReportIB = + [1690222392541] [38924:6615100] [DMG] { + [1690222392541] [38924:6615100] [DMG] AttributeDataIB = + [1690222392541] [38924:6615100] [DMG] { + [1690222392541] [38924:6615100] [DMG] DataVersion = 0xed5d12ae, + [1690222392541] [38924:6615100] [DMG] AttributePathIB = + [1690222392541] [38924:6615100] [DMG] { + [1690222392541] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222392541] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222392541] [38924:6615100] [DMG] Attribute = 0x0000_0001, + [1690222392541] [38924:6615100] [DMG] } + [1690222392541] [38924:6615100] [DMG] + [1690222392541] [38924:6615100] [DMG] Data = NULL + [1690222392541] [38924:6615100] [DMG] }, + [1690222392541] [38924:6615100] [DMG] + [1690222392541] [38924:6615100] [DMG] }, + [1690222392541] [38924:6615100] [DMG] + [1690222392541] [38924:6615100] [DMG] ], + [1690222392541] [38924:6615100] [DMG] + [1690222392541] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222392541] [38924:6615100] [DMG] } + [1690222392541] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299822 + [1690222392541] [38924:6615100] [TOO] AdminFabricIndex: null + [1690222392541] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690222392541] [38924:6615100] [EM] <<< [E:20774r S:948 M:8871664 (Ack:208014038)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 17: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + ReportDataMessage = + [1690222392505] [38923:6614289] [DMG] { + [1690222392505] [38923:6614289] [DMG] SubscriptionId = 0x225d94ef, + [1690222392505] [38923:6614289] [DMG] AttributeReportIBs = + [1690222392505] [38923:6614289] [DMG] [ + [1690222392505] [38923:6614289] [DMG] AttributeReportIB = + [1690222392505] [38923:6614289] [DMG] { + [1690222392505] [38923:6614289] [DMG] AttributeDataIB = + [1690222392505] [38923:6614289] [DMG] { + [1690222392505] [38923:6614289] [DMG] DataVersion = 0xed5d12ae, + [1690222392505] [38923:6614289] [DMG] AttributePathIB = + [1690222392505] [38923:6614289] [DMG] { + [1690222392505] [38923:6614289] [DMG] Endpoint = 0x0, + [1690222392505] [38923:6614289] [DMG] Cluster = 0x3c, + [1690222392505] [38923:6614289] [DMG] Attribute = 0x0000_0000, + [1690222392505] [38923:6614289] [DMG] } + [1690222392505] [38923:6614289] [DMG] + [1690222392505] [38923:6614289] [DMG] Data = 0, + [1690222392505] [38923:6614289] [DMG] }, + [1690222392505] [38923:6614289] [DMG] + [1690222392505] [38923:6614289] [DMG] }, + [1690222392505] [38923:6614289] [DMG] + [1690222392505] [38923:6614289] [DMG] ], + [1690222392505] [38923:6614289] [DMG] + [1690222392505] [38923:6614289] [DMG] InteractionModelRevision = 1 + [1690222392505] [38923:6614289] [DMG] } + [1690222392505] [38923:6614289] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299822 + [1690222392505] [38923:6614289] [TOO] WindowStatus: 0 + [1690222392505] [38923:6614289] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x225d94ef Peer = 02:0000000000000001 + [1690222392505] [38923:6614289] [EM] <<< [E:20769r S:46405 M:159263158 (Ack:256936835)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690222392505] [38923:6614289] [IN] (S) Sending msg 159263158 on secure session with LSID: 46405 + [1690222392506] [38923:6614289] [EM] >>> [E:20770r S:46406 M:25511804] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222392506] [38923:6614289] [EM] Handling via exchange: 20770r, Delegate: 0x101824be0 + [1690222392506] [38923:6614289] [DMG] ReportDataMessage = + [1690222392506] [38923:6614289] [DMG] { + [1690222392506] [38923:6614289] [DMG] SubscriptionId = 0x86a3ec94, + [1690222392506] [38923:6614289] [DMG] AttributeReportIBs = + [1690222392506] [38923:6614289] [DMG] [ + [1690222392506] [38923:6614289] [DMG] AttributeReportIB = + [1690222392506] [38923:6614289] [DMG] { + [1690222392506] [38923:6614289] [DMG] AttributeDataIB = + [1690222392506] [38923:6614289] [DMG] { + [1690222392506] [38923:6614289] [DMG] DataVersion = 0xed5d12ae, + [1690222392506] [38923:6614289] [DMG] AttributePathIB = + [1690222392506] [38923:6614289] [DMG] { + [1690222392506] [38923:6614289] [DMG] Endpoint = 0x0, + [1690222392506] [38923:6614289] [DMG] Cluster = 0x3c, + [1690222392506] [38923:6614289] [DMG] Attribute = 0x0000_0001, + [1690222392506] [38923:6614289] [DMG] } + [1690222392506] [38923:6614289] [DMG] + [1690222392506] [38923:6614289] [DMG] Data = NULL + [1690222392506] [38923:6614289] [DMG] }, + [1690222392506] [38923:6614289] [DMG] + [1690222392506] [38923:6614289] [DMG] }, + [1690222392506] [38923:6614289] [DMG] + [1690222392506] [38923:6614289] [DMG] ], + [1690222392506] [38923:6614289] [DMG] + [1690222392506] [38923:6614289] [DMG] InteractionModelRevision = 1 + [1690222392506] [38923:6614289] [DMG] } + [1690222392506] [38923:6614289] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299822 + [1690222392506] [38923:6614289] [TOO] AdminFabricIndex: null + [1690222392506] [38923:6614289] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x86a3ec94 Peer = 01:0000000000000001 + [1690222392506] [38923:6614289] [EM] <<< [E:20770r S:46406 M:27652529 (Ack:25511804)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222392506] [38923:6614289] [IN] (S) Sending msg 27652529 on secure session with LSID: 46406 + [1690222392509] [38923:6615102] [EM] >>> [E:20771r S:46406 M:25511805] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222392509] [38923:6615102] [EM] Handling via exchange: 20771r, Delegate: 0x101824be0 + [1690222392509] [38923:6615102] [DMG] ReportDataMessage = + [1690222392509] [38923:6615102] [DMG] { + [1690222392509] [38923:6615102] [DMG] SubscriptionId = 0x9ce33771, + [1690222392509] [38923:6615102] [DMG] AttributeReportIBs = + [1690222392509] [38923:6615102] [DMG] [ + [1690222392509] [38923:6615102] [DMG] AttributeReportIB = + [1690222392509] [38923:6615102] [DMG] { + [1690222392509] [38923:6615102] [DMG] AttributeDataIB = + [1690222392509] [38923:6615102] [DMG] { + [1690222392509] [38923:6615102] [DMG] DataVersion = 0xed5d12ae, + [1690222392510] [38923:6615102] [DMG] AttributePathIB = + [1690222392510] [38923:6615102] [DMG] { + [1690222392510] [38923:6615102] [DMG] Endpoint = 0x0, + [1690222392510] [38923:6615102] [DMG] Cluster = 0x3c, + [1690222392510] [38923:6615102] [DMG] Attribute = 0x0000_0002, + [1690222392510] [38923:6615102] [DMG] } + [1690222392510] [38923:6615102] [DMG] + [1690222392510] [38923:6615102] [DMG] Data = NULL + [1690222392510] [38923:6615102] [DMG] }, + [1690222392510] [38923:6615102] [DMG] + [1690222392510] [38923:6615102] [DMG] }, + [1690222392510] [38923:6615102] [DMG] + [1690222392510] [38923:6615102] [DMG] ], + [1690222392510] [38923:6615102] [DMG] + [1690222392510] [38923:6615102] [DMG] InteractionModelRevision = 1 + [1690222392510] [38923:6615102] [DMG] } + [1690222392510] [38923:6615102] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299822 + [1690222392510] [38923:6615102] [TOO] AdminVendorId: null + [1690222392510] [38923:6615102] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x9ce33771 Peer = 01:0000000000000001 + [1690222392510] [38923:6615102] [EM] <<< [E:20771r S:46406 M:27652530 (Ack:25511805)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 18: TH_CR2 opens a commissioning window on DUT_CE using BCM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C01.Rsp + verification: | + In interactive mode of TH_CR2, send command to open commissioning window using BCM + + administratorcommissioning open-basic-commissioning-window 180 1 0 --commissioner-name beta --timedInteractionTimeoutMs 1000 + + On TH_CR2 logs, verify for commissioning window to be open + + + InvokeResponseMessage = + [1690222451910] [38923:6615102] [DMG] { + [1690222451910] [38923:6615102] [DMG] suppressResponse = false, + [1690222451910] [38923:6615102] [DMG] InvokeResponseIBs = + [1690222451910] [38923:6615102] [DMG] [ + [1690222451910] [38923:6615102] [DMG] InvokeResponseIB = + [1690222451910] [38923:6615102] [DMG] { + [1690222451910] [38923:6615102] [DMG] CommandStatusIB = + [1690222451910] [38923:6615102] [DMG] { + [1690222451910] [38923:6615102] [DMG] CommandPathIB = + [1690222451910] [38923:6615102] [DMG] { + [1690222451910] [38923:6615102] [DMG] EndpointId = 0x0, + [1690222451910] [38923:6615102] [DMG] ClusterId = 0x3c, + [1690222451910] [38923:6615102] [DMG] CommandId = 0x1, + [1690222451910] [38923:6615102] [DMG] }, + [1690222451910] [38923:6615102] [DMG] + [1690222451910] [38923:6615102] [DMG] StatusIB = + [1690222451910] [38923:6615102] [DMG] { + [1690222451910] [38923:6615102] [DMG] status = 0x00 (SUCCESS), + [1690222451910] [38923:6615102] [DMG] }, + [1690222451910] [38923:6615102] [DMG] + [1690222451910] [38923:6615102] [DMG] }, + [1690222451910] [38923:6615102] [DMG] + [1690222451910] [38923:6615102] [DMG] }, + [1690222451910] [38923:6615102] [DMG] + [1690222451910] [38923:6615102] [DMG] ], + [1690222451910] [38923:6615102] [DMG] + [1690222451910] [38923:6615102] [DMG] InteractionModelRevision = 1 + [1690222451910] [38923:6615102] [DMG] }, + [1690222451910] [38923:6615102] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1690222451910] [38923:6615102] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 19: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690222451921] [38924:6615100] [DMG] { + [1690222451921] [38924:6615100] [DMG] SubscriptionId = 0xdba23243, + [1690222451921] [38924:6615100] [DMG] AttributeReportIBs = + [1690222451921] [38924:6615100] [DMG] [ + [1690222451921] [38924:6615100] [DMG] AttributeReportIB = + [1690222451921] [38924:6615100] [DMG] { + [1690222451921] [38924:6615100] [DMG] AttributeDataIB = + [1690222451921] [38924:6615100] [DMG] { + [1690222451921] [38924:6615100] [DMG] DataVersion = 0xed5d12b1, + [1690222451921] [38924:6615100] [DMG] AttributePathIB = + [1690222451921] [38924:6615100] [DMG] { + [1690222451921] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222451921] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222451921] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690222451921] [38924:6615100] [DMG] } + [1690222451921] [38924:6615100] [DMG] + [1690222451921] [38924:6615100] [DMG] Data = 2, + [1690222451921] [38924:6615100] [DMG] }, + [1690222451921] [38924:6615100] [DMG] + [1690222451921] [38924:6615100] [DMG] }, + [1690222451921] [38924:6615100] [DMG] + [1690222451921] [38924:6615100] [DMG] ], + [1690222451921] [38924:6615100] [DMG] + [1690222451921] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222451921] [38924:6615100] [DMG] } + [1690222451922] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299825 + [1690222451922] [38924:6615100] [TOO] WindowStatus: 2 + [1690222451922] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690222451922] [38924:6615100] [EM] <<< [E:20778r S:948 M:8871665 (Ack:208014042)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222451922] [38924:6615100] [IN] (S) Sending msg 8871665 on secure session with LSID: 948 + [1690222451929] [38924:6615100] [EM] >>> [E:20779r S:948 M:208014043] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222451929] [38924:6615100] [EM] Handling via exchange: 20779r, Delegate: 0x105234be0 + [1690222451929] [38924:6615100] [DMG] ReportDataMessage = + [1690222451929] [38924:6615100] [DMG] { + [1690222451929] [38924:6615100] [DMG] SubscriptionId = 0x3621ba48, + [1690222451929] [38924:6615100] [DMG] AttributeReportIBs = + [1690222451929] [38924:6615100] [DMG] [ + [1690222451929] [38924:6615100] [DMG] AttributeReportIB = + [1690222451929] [38924:6615100] [DMG] { + [1690222451929] [38924:6615100] [DMG] AttributeDataIB = + [1690222451929] [38924:6615100] [DMG] { + [1690222451929] [38924:6615100] [DMG] DataVersion = 0xed5d12b1, + [1690222451929] [38924:6615100] [DMG] AttributePathIB = + [1690222451929] [38924:6615100] [DMG] { + [1690222451929] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222451929] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222451929] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690222451929] [38924:6615100] [DMG] } + [1690222451929] [38924:6615100] [DMG] + [1690222451929] [38924:6615100] [DMG] Data = 65521, + [1690222451929] [38924:6615100] [DMG] }, + [1690222451929] [38924:6615100] [DMG] + [1690222451929] [38924:6615100] [DMG] }, + [1690222451929] [38924:6615100] [DMG] + [1690222451929] [38924:6615100] [DMG] ], + [1690222451929] [38924:6615100] [DMG] + [1690222451929] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222451929] [38924:6615100] [DMG] } + [1690222451929] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299825 + [1690222451929] [38924:6615100] [TOO] AdminVendorId: 65521 + [1690222451929] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690222451930] [38924:6615100] [EM] <<< [E:20779r S:948 M:8871666 (Ack:208014043)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222451930] [38924:6615100] [IN] (S) Sending msg 8871666 on secure session with LSID: 948 + [1690222451938] [38924:6615100] [EM] >>> [E:20780r S:948 M:208014044] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222451938] [38924:6615100] [EM] Handling via exchange: 20780r, Delegate: 0x105234be0 + [1690222451938] [38924:6615100] [DMG] ReportDataMessage = + [1690222451938] [38924:6615100] [DMG] { + [1690222451938] [38924:6615100] [DMG] SubscriptionId = 0x4daaefab, + [1690222451938] [38924:6615100] [DMG] AttributeReportIBs = + [1690222451938] [38924:6615100] [DMG] [ + [1690222451938] [38924:6615100] [DMG] AttributeReportIB = + [1690222451938] [38924:6615100] [DMG] { + [1690222451938] [38924:6615100] [DMG] AttributeDataIB = + [1690222451938] [38924:6615100] [DMG] { + [1690222451938] [38924:6615100] [DMG] DataVersion = 0xed5d12b1, + [1690222451938] [38924:6615100] [DMG] AttributePathIB = + [1690222451938] [38924:6615100] [DMG] { + [1690222451938] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222451938] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222451938] [38924:6615100] [DMG] Attribute = 0x0000_0001, + [1690222451938] [38924:6615100] [DMG] } + [1690222451938] [38924:6615100] [DMG] + [1690222451938] [38924:6615100] [DMG] Data = 2, + [1690222451938] [38924:6615100] [DMG] }, + [1690222451938] [38924:6615100] [DMG] + [1690222451938] [38924:6615100] [DMG] }, + [1690222451938] [38924:6615100] [DMG] + [1690222451938] [38924:6615100] [DMG] ], + [1690222451938] [38924:6615100] [DMG] + [1690222451938] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222451938] [38924:6615100] [DMG] } + [1690222451938] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299825 + [1690222451938] [38924:6615100] [TOO] AdminFabricIndex: 2 + [1690222451938] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690222451938] [38924:6615100] [EM] <<< [E:20780r S:948 M:8871667 (Ack:208014044)] + disabled: true + + - label: + "Step 20: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690222451914] [38923:6615102] [DMG] { + [1690222451914] [38923:6615102] [DMG] SubscriptionId = 0x225d94ef, + [1690222451914] [38923:6615102] [DMG] AttributeReportIBs = + [1690222451914] [38923:6615102] [DMG] [ + [1690222451914] [38923:6615102] [DMG] AttributeReportIB = + [1690222451914] [38923:6615102] [DMG] { + [1690222451914] [38923:6615102] [DMG] AttributeDataIB = + [1690222451914] [38923:6615102] [DMG] { + [1690222451914] [38923:6615102] [DMG] DataVersion = 0xed5d12b1, + [1690222451914] [38923:6615102] [DMG] AttributePathIB = + [1690222451914] [38923:6615102] [DMG] { + [1690222451914] [38923:6615102] [DMG] Endpoint = 0x0, + [1690222451914] [38923:6615102] [DMG] Cluster = 0x3c, + [1690222451914] [38923:6615102] [DMG] Attribute = 0x0000_0000, + [1690222451914] [38923:6615102] [DMG] } + [1690222451914] [38923:6615102] [DMG] + [1690222451914] [38923:6615102] [DMG] Data = 2, + [1690222451914] [38923:6615102] [DMG] }, + [1690222451914] [38923:6615102] [DMG] + [1690222451914] [38923:6615102] [DMG] }, + [1690222451914] [38923:6615102] [DMG] + [1690222451914] [38923:6615102] [DMG] ], + [1690222451914] [38923:6615102] [DMG] + [1690222451914] [38923:6615102] [DMG] InteractionModelRevision = 1 + [1690222451914] [38923:6615102] [DMG] } + [1690222451914] [38923:6615102] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299825 + [1690222451914] [38923:6615102] [TOO] WindowStatus: 2 + [1690222451914] [38923:6615102] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x225d94ef Peer = 02:0000000000000001 + [1690222451914] [38923:6615102] [EM] <<< [E:20775r S:46405 M:159263162 (Ack:256936839)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690222451914] [38923:6615102] [IN] (S) Sending msg 159263162 on secure session with LSID: 46405 + [1690222451917] [38923:6615102] [EM] >>> [E:20776r S:46406 M:25511808] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222451917] [38923:6615102] [EM] Handling via exchange: 20776r, Delegate: 0x101824be0 + [1690222451917] [38923:6615102] [DMG] ReportDataMessage = + [1690222451917] [38923:6615102] [DMG] { + [1690222451917] [38923:6615102] [DMG] SubscriptionId = 0x86a3ec94, + [1690222451917] [38923:6615102] [DMG] AttributeReportIBs = + [1690222451917] [38923:6615102] [DMG] [ + [1690222451917] [38923:6615102] [DMG] AttributeReportIB = + [1690222451917] [38923:6615102] [DMG] { + [1690222451917] [38923:6615102] [DMG] AttributeDataIB = + [1690222451917] [38923:6615102] [DMG] { + [1690222451917] [38923:6615102] [DMG] DataVersion = 0xed5d12b1, + [1690222451917] [38923:6615102] [DMG] AttributePathIB = + [1690222451917] [38923:6615102] [DMG] { + [1690222451917] [38923:6615102] [DMG] Endpoint = 0x0, + [1690222451917] [38923:6615102] [DMG] Cluster = 0x3c, + [1690222451917] [38923:6615102] [DMG] Attribute = 0x0000_0001, + [1690222451917] [38923:6615102] [DMG] } + [1690222451917] [38923:6615102] [DMG] + [1690222451917] [38923:6615102] [DMG] Data = 2, + [1690222451917] [38923:6615102] [DMG] }, + [1690222451917] [38923:6615102] [DMG] + [1690222451917] [38923:6615102] [DMG] }, + [1690222451917] [38923:6615102] [DMG] + [1690222451917] [38923:6615102] [DMG] ], + [1690222451917] [38923:6615102] [DMG] + [1690222451917] [38923:6615102] [DMG] InteractionModelRevision = 1 + [1690222451917] [38923:6615102] [DMG] } + [1690222451917] [38923:6615102] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299825 + [1690222451917] [38923:6615102] [TOO] AdminFabricIndex: 2 + [1690222451917] [38923:6615102] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x86a3ec94 Peer = 01:0000000000000001 + [1690222451917] [38923:6615102] [EM] <<< [E:20776r S:46406 M:27652531 (Ack:25511808)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222451917] [38923:6615102] [IN] (S) Sending msg 27652531 on secure session with LSID: 46406 + [1690222451918] [38923:6615102] [EM] >>> [E:20777r S:46406 M:25511809] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222451918] [38923:6615102] [EM] Handling via exchange: 20777r, Delegate: 0x101824be0 + [1690222451918] [38923:6615102] [DMG] ReportDataMessage = + [1690222451918] [38923:6615102] [DMG] { + [1690222451918] [38923:6615102] [DMG] SubscriptionId = 0x9ce33771, + [1690222451918] [38923:6615102] [DMG] AttributeReportIBs = + [1690222451918] [38923:6615102] [DMG] [ + [1690222451918] [38923:6615102] [DMG] AttributeReportIB = + [1690222451918] [38923:6615102] [DMG] { + [1690222451918] [38923:6615102] [DMG] AttributeDataIB = + [1690222451918] [38923:6615102] [DMG] { + [1690222451918] [38923:6615102] [DMG] DataVersion = 0xed5d12b1, + [1690222451918] [38923:6615102] [DMG] AttributePathIB = + [1690222451918] [38923:6615102] [DMG] { + [1690222451918] [38923:6615102] [DMG] Endpoint = 0x0, + [1690222451918] [38923:6615102] [DMG] Cluster = 0x3c, + [1690222451918] [38923:6615102] [DMG] Attribute = 0x0000_0002, + [1690222451918] [38923:6615102] [DMG] } + [1690222451918] [38923:6615102] [DMG] + [1690222451918] [38923:6615102] [DMG] Data = 65521, + [1690222451918] [38923:6615102] [DMG] }, + [1690222451918] [38923:6615102] [DMG] + [1690222451918] [38923:6615102] [DMG] }, + [1690222451918] [38923:6615102] [DMG] + [1690222451918] [38923:6615102] [DMG] ], + [1690222451918] [38923:6615102] [DMG] + [1690222451918] [38923:6615102] [DMG] InteractionModelRevision = 1 + [1690222451918] [38923:6615102] [DMG] } + [1690222451918] [38923:6615102] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299825 + [1690222451918] [38923:6615102] [TOO] AdminVendorId: 65521 + [1690222451918] [38923:6615102] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x9ce33771 Peer = 01:0000000000000001 + [1690222451919] [38923:6615102] [EM] <<< [E:20777r S:46406 M:27652532 (Ack:25511809)] + disabled: true + + - label: + "Step 21: Wait for the expiration of PIXIT.CADMIN.CwDuration seconds + that is set in step 18" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 18 + disabled: true + + - label: + "Step 22: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + [1690222631903] [38924:6615100] [EM] >>> [E:20784r S:948 M:208014048] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222631903] [38924:6615100] [EM] Handling via exchange: 20784r, Delegate: 0x105234be0 + [1690222631903] [38924:6615100] [DMG] ReportDataMessage = + [1690222631903] [38924:6615100] [DMG] { + [1690222631903] [38924:6615100] [DMG] SubscriptionId = 0xdba23243, + [1690222631903] [38924:6615100] [DMG] AttributeReportIBs = + [1690222631903] [38924:6615100] [DMG] [ + [1690222631903] [38924:6615100] [DMG] AttributeReportIB = + [1690222631903] [38924:6615100] [DMG] { + [1690222631903] [38924:6615100] [DMG] AttributeDataIB = + [1690222631903] [38924:6615100] [DMG] { + [1690222631903] [38924:6615100] [DMG] DataVersion = 0xed5d12b4, + [1690222631903] [38924:6615100] [DMG] AttributePathIB = + [1690222631903] [38924:6615100] [DMG] { + [1690222631903] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222631903] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222631903] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690222631903] [38924:6615100] [DMG] } + [1690222631903] [38924:6615100] [DMG] + [1690222631903] [38924:6615100] [DMG] Data = 0, + [1690222631903] [38924:6615100] [DMG] }, + [1690222631903] [38924:6615100] [DMG] + [1690222631903] [38924:6615100] [DMG] }, + [1690222631903] [38924:6615100] [DMG] + [1690222631903] [38924:6615100] [DMG] ], + [1690222631903] [38924:6615100] [DMG] + [1690222631903] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222631903] [38924:6615100] [DMG] } + [1690222631903] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299828 + [1690222631903] [38924:6615100] [TOO] WindowStatus: 0 + [1690222631903] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690222631904] [38924:6615100] [EM] <<< [E:20784r S:948 M:8871668 (Ack:208014048)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222631904] [38924:6615100] [IN] (S) Sending msg 8871668 on secure session with LSID: 948 + [1690222631928] [38924:6615100] [EM] >>> [E:20785r S:948 M:208014049] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222631928] [38924:6615100] [EM] Handling via exchange: 20785r, Delegate: 0x105234be0 + [1690222631928] [38924:6615100] [DMG] ReportDataMessage = + [1690222631928] [38924:6615100] [DMG] { + [1690222631928] [38924:6615100] [DMG] SubscriptionId = 0x3621ba48, + [1690222631928] [38924:6615100] [DMG] AttributeReportIBs = + [1690222631928] [38924:6615100] [DMG] [ + [1690222631928] [38924:6615100] [DMG] AttributeReportIB = + [1690222631928] [38924:6615100] [DMG] { + [1690222631928] [38924:6615100] [DMG] AttributeDataIB = + [1690222631928] [38924:6615100] [DMG] { + [1690222631928] [38924:6615100] [DMG] DataVersion = 0xed5d12b4, + [1690222631928] [38924:6615100] [DMG] AttributePathIB = + [1690222631928] [38924:6615100] [DMG] { + [1690222631928] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222631928] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222631928] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690222631928] [38924:6615100] [DMG] } + [1690222631928] [38924:6615100] [DMG] + [1690222631928] [38924:6615100] [DMG] Data = NULL + [1690222631928] [38924:6615100] [DMG] }, + [1690222631928] [38924:6615100] [DMG] + [1690222631928] [38924:6615100] [DMG] }, + [1690222631928] [38924:6615100] [DMG] + [1690222631928] [38924:6615100] [DMG] ], + [1690222631928] [38924:6615100] [DMG] + [1690222631928] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222631928] [38924:6615100] [DMG] } + [1690222631928] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299828 + [1690222631928] [38924:6615100] [TOO] AdminVendorId: null + [1690222631929] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690222631929] [38924:6615100] [EM] <<< [E:20785r S:948 M:8871669 (Ack:208014049)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222631929] [38924:6615100] [IN] (S) Sending msg 8871669 on secure session with LSID: 948 + [1690222631930] [38924:6615100] [EM] >>> [E:20786r S:948 M:208014050] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222631930] [38924:6615100] [EM] Handling via exchange: 20786r, Delegate: 0x105234be0 + [1690222631930] [38924:6615100] [DMG] ReportDataMessage = + [1690222631930] [38924:6615100] [DMG] { + [1690222631930] [38924:6615100] [DMG] SubscriptionId = 0x4daaefab, + [1690222631930] [38924:6615100] [DMG] AttributeReportIBs = + [1690222631930] [38924:6615100] [DMG] [ + [1690222631930] [38924:6615100] [DMG] AttributeReportIB = + [1690222631930] [38924:6615100] [DMG] { + [1690222631930] [38924:6615100] [DMG] AttributeDataIB = + [1690222631930] [38924:6615100] [DMG] { + [1690222631930] [38924:6615100] [DMG] DataVersion = 0xed5d12b4, + [1690222631931] [38924:6615100] [DMG] AttributePathIB = + [1690222631931] [38924:6615100] [DMG] { + [1690222631931] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222631931] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222631931] [38924:6615100] [DMG] Attribute = 0x0000_0001, + [1690222631931] [38924:6615100] [DMG] } + [1690222631931] [38924:6615100] [DMG] + [1690222631931] [38924:6615100] [DMG] Data = NULL + [1690222631931] [38924:6615100] [DMG] }, + [1690222631931] [38924:6615100] [DMG] + [1690222631931] [38924:6615100] [DMG] }, + [1690222631931] [38924:6615100] [DMG] + [1690222631931] [38924:6615100] [DMG] ], + [1690222631931] [38924:6615100] [DMG] + [1690222631931] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222631931] [38924:6615100] [DMG] } + [1690222631931] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299828 + [1690222631931] [38924:6615100] [TOO] AdminFabricIndex: null + [1690222631931] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690222631931] [38924:6615100] [EM] <<< [E:20786r S:948 M:8871670 (Ack:208014050)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222631931] [38924:6615100] [IN] (S) Sending msg 8871670 on secure session with LSID: 948 + [1690222631935] [38924:6615100] [EM] >>> [E:20784r S:948 M:208014051 (Ack:8871668)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631935] [38924:6615100] [EM] Found matching exchange: 20784r, Delegate: 0x0 + [1690222631935] [38924:6615100] [EM] Rxd Ack; Removing MessageCounter:8871668 from Retrans Table on exchange 20784r + [1690222631943] [38924:6615100] [EM] >>> [E:20785r S:948 M:208014052 (Ack:8871669)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631943] [38924:6615100] [EM] Found matching exchange: 20785r, Delegate: 0x0 + [1690222631943] [38924:6615100] [EM] Rxd Ack; Removing MessageCounter:8871669 from Retrans Table on exchange 20785r + [1690222631948] [38924:6615100] [EM] >>> [E:20786r S:948 M:208014053 (Ack:8871670)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631948] [38924:6615100] [EM] Found matching exchange: 20786r, Delegate: 0x0 + [1690222631948] [38924:6615100] [EM] Rxd Ack; Removing MessageCounter:8871670 from Retrans Table on exchange 20786r + disabled: true + + - label: + "Step 23: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + [1690222631896] [38923:6615905] [EM] >>> [E:20781r S:46405 M:256936841] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690222631896] [38923:6615905] [EM] Handling via exchange: 20781r, Delegate: 0x101824be0 + [1690222631896] [38923:6615905] [DMG] ReportDataMessage = + [1690222631896] [38923:6615905] [DMG] { + [1690222631896] [38923:6615905] [DMG] SubscriptionId = 0x225d94ef, + [1690222631896] [38923:6615905] [DMG] AttributeReportIBs = + [1690222631896] [38923:6615905] [DMG] [ + [1690222631896] [38923:6615905] [DMG] AttributeReportIB = + [1690222631896] [38923:6615905] [DMG] { + [1690222631896] [38923:6615905] [DMG] AttributeDataIB = + [1690222631896] [38923:6615905] [DMG] { + [1690222631896] [38923:6615905] [DMG] DataVersion = 0xed5d12b4, + [1690222631896] [38923:6615905] [DMG] AttributePathIB = + [1690222631896] [38923:6615905] [DMG] { + [1690222631896] [38923:6615905] [DMG] Endpoint = 0x0, + [1690222631896] [38923:6615905] [DMG] Cluster = 0x3c, + [1690222631896] [38923:6615905] [DMG] Attribute = 0x0000_0000, + [1690222631896] [38923:6615905] [DMG] } + [1690222631896] [38923:6615905] [DMG] + [1690222631896] [38923:6615905] [DMG] Data = 0, + [1690222631896] [38923:6615905] [DMG] }, + [1690222631896] [38923:6615905] [DMG] + [1690222631896] [38923:6615905] [DMG] }, + [1690222631896] [38923:6615905] [DMG] + [1690222631896] [38923:6615905] [DMG] ], + [1690222631896] [38923:6615905] [DMG] + [1690222631896] [38923:6615905] [DMG] InteractionModelRevision = 1 + [1690222631896] [38923:6615905] [DMG] } + [1690222631897] [38923:6615905] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299828 + [1690222631897] [38923:6615905] [TOO] WindowStatus: 0 + [1690222631897] [38923:6615905] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x225d94ef Peer = 02:0000000000000001 + [1690222631897] [38923:6615905] [EM] <<< [E:20781r S:46405 M:159263163 (Ack:256936841)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690222631897] [38923:6615905] [IN] (S) Sending msg 159263163 on secure session with LSID: 46405 + [1690222631898] [38923:6615905] [EM] >>> [E:20782r S:46406 M:25511812] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222631898] [38923:6615905] [EM] Handling via exchange: 20782r, Delegate: 0x101824be0 + [1690222631898] [38923:6615905] [DMG] ReportDataMessage = + [1690222631898] [38923:6615905] [DMG] { + [1690222631898] [38923:6615905] [DMG] SubscriptionId = 0x86a3ec94, + [1690222631898] [38923:6615905] [DMG] AttributeReportIBs = + [1690222631898] [38923:6615905] [DMG] [ + [1690222631898] [38923:6615905] [DMG] AttributeReportIB = + [1690222631898] [38923:6615905] [DMG] { + [1690222631898] [38923:6615905] [DMG] AttributeDataIB = + [1690222631898] [38923:6615905] [DMG] { + [1690222631898] [38923:6615905] [DMG] DataVersion = 0xed5d12b4, + [1690222631898] [38923:6615905] [DMG] AttributePathIB = + [1690222631898] [38923:6615905] [DMG] { + [1690222631898] [38923:6615905] [DMG] Endpoint = 0x0, + [1690222631898] [38923:6615905] [DMG] Cluster = 0x3c, + [1690222631898] [38923:6615905] [DMG] Attribute = 0x0000_0001, + [1690222631898] [38923:6615905] [DMG] } + [1690222631898] [38923:6615905] [DMG] + [1690222631898] [38923:6615905] [DMG] Data = NULL + [1690222631898] [38923:6615905] [DMG] }, + [1690222631898] [38923:6615905] [DMG] + [1690222631898] [38923:6615905] [DMG] }, + [1690222631898] [38923:6615905] [DMG] + [1690222631898] [38923:6615905] [DMG] ], + [1690222631898] [38923:6615905] [DMG] + [1690222631899] [38923:6615905] [DMG] InteractionModelRevision = 1 + [1690222631899] [38923:6615905] [DMG] } + [1690222631899] [38923:6615905] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299828 + [1690222631899] [38923:6615905] [TOO] AdminFabricIndex: null + [1690222631899] [38923:6615905] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x86a3ec94 Peer = 01:0000000000000001 + [1690222631899] [38923:6615905] [EM] <<< [E:20782r S:46406 M:27652533 (Ack:25511812)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222631899] [38923:6615905] [IN] (S) Sending msg 27652533 on secure session with LSID: 46406 + [1690222631900] [38923:6615905] [EM] >>> [E:20783r S:46406 M:25511813] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222631900] [38923:6615905] [EM] Handling via exchange: 20783r, Delegate: 0x101824be0 + [1690222631900] [38923:6615905] [DMG] ReportDataMessage = + [1690222631900] [38923:6615905] [DMG] { + [1690222631900] [38923:6615905] [DMG] SubscriptionId = 0x9ce33771, + [1690222631900] [38923:6615905] [DMG] AttributeReportIBs = + [1690222631900] [38923:6615905] [DMG] [ + [1690222631900] [38923:6615905] [DMG] AttributeReportIB = + [1690222631900] [38923:6615905] [DMG] { + [1690222631900] [38923:6615905] [DMG] AttributeDataIB = + [1690222631900] [38923:6615905] [DMG] { + [1690222631900] [38923:6615905] [DMG] DataVersion = 0xed5d12b4, + [1690222631900] [38923:6615905] [DMG] AttributePathIB = + [1690222631900] [38923:6615905] [DMG] { + [1690222631900] [38923:6615905] [DMG] Endpoint = 0x0, + [1690222631900] [38923:6615905] [DMG] Cluster = 0x3c, + [1690222631900] [38923:6615905] [DMG] Attribute = 0x0000_0002, + [1690222631900] [38923:6615905] [DMG] } + [1690222631900] [38923:6615905] [DMG] + [1690222631900] [38923:6615905] [DMG] Data = NULL + [1690222631900] [38923:6615905] [DMG] }, + [1690222631900] [38923:6615905] [DMG] + [1690222631900] [38923:6615905] [DMG] }, + [1690222631900] [38923:6615905] [DMG] + [1690222631900] [38923:6615905] [DMG] ], + [1690222631900] [38923:6615905] [DMG] + [1690222631900] [38923:6615905] [DMG] InteractionModelRevision = 1 + [1690222631900] [38923:6615905] [DMG] } + [1690222631900] [38923:6615905] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299828 + [1690222631900] [38923:6615905] [TOO] AdminVendorId: null + [1690222631900] [38923:6615905] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x9ce33771 Peer = 01:0000000000000001 + [1690222631901] [38923:6615905] [EM] <<< [E:20783r S:46406 M:27652534 (Ack:25511813)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222631901] [38923:6615905] [IN] (S) Sending msg 27652534 on secure session with LSID: 46406 + [1690222631905] [38923:6615905] [EM] >>> [E:20781r S:46405 M:256936842 (Ack:159263163)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631905] [38923:6615905] [EM] Found matching exchange: 20781r, Delegate: 0x0 + [1690222631905] [38923:6615905] [EM] Rxd Ack; Removing MessageCounter:159263163 from Retrans Table on exchange 20781r + [1690222631926] [38923:6615905] [EM] >>> [E:20782r S:46406 M:25511814 (Ack:27652533)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631926] [38923:6615905] [EM] Found matching exchange: 20782r, Delegate: 0x0 + [1690222631926] [38923:6615905] [EM] Rxd Ack; Removing MessageCounter:27652533 from Retrans Table on exchange 20782r + [1690222631932] [38923:6615905] [EM] >>> [E:20783r S:46406 M:25511815 (Ack:27652534)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631932] [38923:6615905] [EM] Found matching exchange: 20783r, Delegate: 0x0 + [1690222631932] [38923:6615905] [EM] Rxd Ack; Removing MessageCounter:27652534 from Retrans Table on exchange 20783r + disabled: true + + - label: + "Step 24: TH_CR2 opens a commissioning window on DUT_CE using BCM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C01.Rsp + verification: | + In interactive mode of TH_CR2, send command to open commissioning window using ECM + + administratorcommissioning open-basic-commissioning-window 180 1 0 --commissioner-name beta --timedInteractionTimeoutMs 1000 + + On TH_CR2 logs, verify for success response + + + InvokeResponseMessage = + [1690223534922] [38923:6627404] [DMG] { + [1690223534922] [38923:6627404] [DMG] suppressResponse = false, + [1690223534922] [38923:6627404] [DMG] InvokeResponseIBs = + [1690223534922] [38923:6627404] [DMG] [ + [1690223534922] [38923:6627404] [DMG] InvokeResponseIB = + [1690223534922] [38923:6627404] [DMG] { + [1690223534922] [38923:6627404] [DMG] CommandStatusIB = + [1690223534922] [38923:6627404] [DMG] { + [1690223534922] [38923:6627404] [DMG] CommandPathIB = + [1690223534922] [38923:6627404] [DMG] { + [1690223534922] [38923:6627404] [DMG] EndpointId = 0x0, + [1690223534922] [38923:6627404] [DMG] ClusterId = 0x3c, + [1690223534922] [38923:6627404] [DMG] CommandId = 0x1, + [1690223534922] [38923:6627404] [DMG] }, + [1690223534922] [38923:6627404] [DMG] + [1690223534922] [38923:6627404] [DMG] StatusIB = + [1690223534922] [38923:6627404] [DMG] { + [1690223534922] [38923:6627404] [DMG] status = 0x00 (SUCCESS), + [1690223534922] [38923:6627404] [DMG] }, + [1690223534922] [38923:6627404] [DMG] + [1690223534922] [38923:6627404] [DMG] }, + [1690223534922] [38923:6627404] [DMG] + [1690223534922] [38923:6627404] [DMG] }, + [1690223534922] [38923:6627404] [DMG] + [1690223534922] [38923:6627404] [DMG] ], + [1690223534922] [38923:6627404] [DMG] + [1690223534922] [38923:6627404] [DMG] InteractionModelRevision = 1 + [1690223534922] [38923:6627404] [DMG] }, + [1690223534922] [38923:6627404] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1690223534922] [38923:6627404] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 25: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690223534931] [38924:6615100] [DMG] { + [1690223534931] [38924:6615100] [DMG] SubscriptionId = 0xdba23243, + [1690223534931] [38924:6615100] [DMG] AttributeReportIBs = + [1690223534931] [38924:6615100] [DMG] [ + [1690223534931] [38924:6615100] [DMG] AttributeReportIB = + [1690223534931] [38924:6615100] [DMG] { + [1690223534931] [38924:6615100] [DMG] AttributeDataIB = + [1690223534931] [38924:6615100] [DMG] { + [1690223534931] [38924:6615100] [DMG] DataVersion = 0xed5d12b7, + [1690223534931] [38924:6615100] [DMG] AttributePathIB = + [1690223534931] [38924:6615100] [DMG] { + [1690223534931] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223534931] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223534932] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690223534932] [38924:6615100] [DMG] } + [1690223534932] [38924:6615100] [DMG] + [1690223534932] [38924:6615100] [DMG] Data = 2, + [1690223534932] [38924:6615100] [DMG] }, + [1690223534932] [38924:6615100] [DMG] + [1690223534932] [38924:6615100] [DMG] }, + [1690223534932] [38924:6615100] [DMG] + [1690223534932] [38924:6615100] [DMG] ], + [1690223534932] [38924:6615100] [DMG] + [1690223534932] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223534932] [38924:6615100] [DMG] } + [1690223534932] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299831 + [1690223534932] [38924:6615100] [TOO] WindowStatus: 2 + [1690223534932] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690223534932] [38924:6615100] [EM] <<< [E:20790r S:948 M:8871671 (Ack:208014054)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690223534932] [38924:6615100] [IN] (S) Sending msg 8871671 on secure session with LSID: 948 + [1690223534939] [38924:6615100] [EM] >>> [E:20791r S:948 M:208014055] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690223534939] [38924:6615100] [EM] Handling via exchange: 20791r, Delegate: 0x105234be0 + [1690223534939] [38924:6615100] [DMG] ReportDataMessage = + [1690223534939] [38924:6615100] [DMG] { + [1690223534939] [38924:6615100] [DMG] SubscriptionId = 0x3621ba48, + [1690223534939] [38924:6615100] [DMG] AttributeReportIBs = + [1690223534939] [38924:6615100] [DMG] [ + [1690223534939] [38924:6615100] [DMG] AttributeReportIB = + [1690223534939] [38924:6615100] [DMG] { + [1690223534939] [38924:6615100] [DMG] AttributeDataIB = + [1690223534939] [38924:6615100] [DMG] { + [1690223534939] [38924:6615100] [DMG] DataVersion = 0xed5d12b7, + [1690223534939] [38924:6615100] [DMG] AttributePathIB = + [1690223534939] [38924:6615100] [DMG] { + [1690223534939] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223534939] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223534939] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690223534939] [38924:6615100] [DMG] } + [1690223534939] [38924:6615100] [DMG] + [1690223534939] [38924:6615100] [DMG] Data = 65521, + [1690223534939] [38924:6615100] [DMG] }, + [1690223534939] [38924:6615100] [DMG] + [1690223534939] [38924:6615100] [DMG] }, + [1690223534939] [38924:6615100] [DMG] + [1690223534939] [38924:6615100] [DMG] ], + [1690223534939] [38924:6615100] [DMG] + [1690223534939] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223534939] [38924:6615100] [DMG] } + [1690223534939] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299831 + [1690223534939] [38924:6615100] [TOO] AdminVendorId: 65521 + [1690223534939] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690223534939] [38924:6615100] [EM] <<< [E:20791r S:948 M:8871672 (Ack:208014055)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690223534939] [38924:6615100] [IN] (S) Sending msg 8871672 on secure session with LSID: 948 + [1690223534944] [38924:6615100] [EM] >>> [E:20792r S:948 M:208014056] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690223534944] [38924:6615100] [EM] Handling via exchange: 20792r, Delegate: 0x105234be0 + [1690223534944] [38924:6615100] [DMG] ReportDataMessage = + [1690223534944] [38924:6615100] [DMG] { + [1690223534944] [38924:6615100] [DMG] SubscriptionId = 0x4daaefab, + [1690223534944] [38924:6615100] [DMG] AttributeReportIBs = + [1690223534944] [38924:6615100] [DMG] [ + [1690223534944] [38924:6615100] [DMG] AttributeReportIB = + [1690223534944] [38924:6615100] [DMG] { + [1690223534944] [38924:6615100] [DMG] AttributeDataIB = + [1690223534944] [38924:6615100] [DMG] { + [1690223534944] [38924:6615100] [DMG] DataVersion = 0xed5d12b7, + [1690223534944] [38924:6615100] [DMG] AttributePathIB = + [1690223534944] [38924:6615100] [DMG] { + [1690223534944] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223534944] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223534944] [38924:6615100] [DMG] Attribute = 0x0000_0001, + [1690223534944] [38924:6615100] [DMG] } + [1690223534944] [38924:6615100] [DMG] + [1690223534944] [38924:6615100] [DMG] Data = 2, + [1690223534944] [38924:6615100] [DMG] }, + [1690223534944] [38924:6615100] [DMG] + [1690223534944] [38924:6615100] [DMG] }, + [1690223534944] [38924:6615100] [DMG] + [1690223534944] [38924:6615100] [DMG] ], + [1690223534945] [38924:6615100] [DMG] + [1690223534945] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223534945] [38924:6615100] [DMG] } + [1690223534945] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299831 + [1690223534945] [38924:6615100] [TOO] AdminFabricIndex: 2 + [1690223534945] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690223534945] [38924:6615100] [EM] <<< [E:20792r S:948 M:8871673 (Ack:208014056)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690223534945] [38924:6615100] [IN] (S) Sending msg 8871673 on secure session with LSID: 948 + [1690223534952] [38924:6615100] [EM] >>> [E:20790r S:948 M:208014057 (Ack:8871671)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690223534952] [38924:6615100] [EM] Found matching exchange: 20790r, Delegate: 0x0 + [1690223534952] [38924:6615100] [EM] Rxd Ack; Removing MessageCounter:8871671 from Retrans Table on exchange 20790r + [1690223534956] [38924:6627407] [EM] >>> [E:20791r S:948 M:208014058 (Ack:8871672)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 26: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690223534924] [38923:6627404] [DMG] { + [1690223534924] [38923:6627404] [DMG] SubscriptionId = 0x225d94ef, + [1690223534924] [38923:6627404] [DMG] AttributeReportIBs = + [1690223534924] [38923:6627404] [DMG] [ + [1690223534924] [38923:6627404] [DMG] AttributeReportIB = + [1690223534924] [38923:6627404] [DMG] { + [1690223534924] [38923:6627404] [DMG] AttributeDataIB = + [1690223534924] [38923:6627404] [DMG] { + [1690223534924] [38923:6627404] [DMG] DataVersion = 0xed5d12b7, + [1690223534924] [38923:6627404] [DMG] AttributePathIB = + [1690223534924] [38923:6627404] [DMG] { + [1690223534924] [38923:6627404] [DMG] Endpoint = 0x0, + [1690223534924] [38923:6627404] [DMG] Cluster = 0x3c, + [1690223534924] [38923:6627404] [DMG] Attribute = 0x0000_0000, + [1690223534924] [38923:6627404] [DMG] } + [1690223534924] [38923:6627404] [DMG] + [1690223534924] [38923:6627404] [DMG] Data = 2, + [1690223534924] [38923:6627404] [DMG] }, + [1690223534924] [38923:6627404] [DMG] + [1690223534924] [38923:6627404] [DMG] }, + [1690223534924] [38923:6627404] [DMG] + [1690223534924] [38923:6627404] [DMG] ], + [1690223534924] [38923:6627404] [DMG] + [1690223534924] [38923:6627404] [DMG] InteractionModelRevision = 1 + [1690223534924] [38923:6627404] [DMG] } + [1690223534925] [38923:6627404] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299831 + [1690223534925] [38923:6627404] [TOO] WindowStatus: 2 + [1690223534925] [38923:6627404] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x225d94ef Peer = 02:0000000000000001 + [1690223534925] [38923:6627404] [EM] <<< [E:20787r S:46405 M:159263167 (Ack:256936845)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690223534925] [38923:6627404] [IN] (S) Sending msg 159263167 on secure session with LSID: 46405 + [1690223534927] [38923:6627404] [EM] >>> [E:20788r S:46406 M:25511816] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690223534927] [38923:6627404] [EM] Handling via exchange: 20788r, Delegate: 0x101824be0 + [1690223534927] [38923:6627404] [DMG] ReportDataMessage = + [1690223534927] [38923:6627404] [DMG] { + [1690223534927] [38923:6627404] [DMG] SubscriptionId = 0x86a3ec94, + [1690223534927] [38923:6627404] [DMG] AttributeReportIBs = + [1690223534927] [38923:6627404] [DMG] [ + [1690223534927] [38923:6627404] [DMG] AttributeReportIB = + [1690223534927] [38923:6627404] [DMG] { + [1690223534927] [38923:6627404] [DMG] AttributeDataIB = + [1690223534927] [38923:6627404] [DMG] { + [1690223534927] [38923:6627404] [DMG] DataVersion = 0xed5d12b7, + [1690223534927] [38923:6627404] [DMG] AttributePathIB = + [1690223534927] [38923:6627404] [DMG] { + [1690223534927] [38923:6627404] [DMG] Endpoint = 0x0, + [1690223534927] [38923:6627404] [DMG] Cluster = 0x3c, + [1690223534927] [38923:6627404] [DMG] Attribute = 0x0000_0001, + [1690223534927] [38923:6627404] [DMG] } + [1690223534927] [38923:6627404] [DMG] + [1690223534927] [38923:6627404] [DMG] Data = 2, + [1690223534928] [38923:6627404] [DMG] }, + [1690223534928] [38923:6627404] [DMG] + [1690223534928] [38923:6627404] [DMG] }, + [1690223534928] [38923:6627404] [DMG] + [1690223534928] [38923:6627404] [DMG] ], + [1690223534928] [38923:6627404] [DMG] + [1690223534928] [38923:6627404] [DMG] InteractionModelRevision = 1 + [1690223534928] [38923:6627404] [DMG] } + [1690223534928] [38923:6627404] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299831 + [1690223534928] [38923:6627404] [TOO] AdminFabricIndex: 2 + [1690223534928] [38923:6627404] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x86a3ec94 Peer = 01:0000000000000001 + [1690223534928] [38923:6627404] [EM] <<< [E:20788r S:46406 M:27652535 (Ack:25511816)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690223534928] [38923:6627404] [IN] (S) Sending msg 27652535 on secure session with LSID: 46406 + [1690223534928] [38923:6627404] [EM] >>> [E:20789r S:46406 M:25511817] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690223534928] [38923:6627404] [EM] Handling via exchange: 20789r, Delegate: 0x101824be0 + [1690223534928] [38923:6627404] [DMG] ReportDataMessage = + [1690223534928] [38923:6627404] [DMG] { + [1690223534928] [38923:6627404] [DMG] SubscriptionId = 0x9ce33771, + [1690223534928] [38923:6627404] [DMG] AttributeReportIBs = + [1690223534928] [38923:6627404] [DMG] [ + [1690223534928] [38923:6627404] [DMG] AttributeReportIB = + [1690223534928] [38923:6627404] [DMG] { + [1690223534928] [38923:6627404] [DMG] AttributeDataIB = + [1690223534928] [38923:6627404] [DMG] { + [1690223534928] [38923:6627404] [DMG] DataVersion = 0xed5d12b7, + [1690223534929] [38923:6627404] [DMG] AttributePathIB = + [1690223534929] [38923:6627404] [DMG] { + [1690223534929] [38923:6627404] [DMG] Endpoint = 0x0, + [1690223534929] [38923:6627404] [DMG] Cluster = 0x3c, + [1690223534929] [38923:6627404] [DMG] Attribute = 0x0000_0002, + [1690223534929] [38923:6627404] [DMG] } + [1690223534929] [38923:6627404] [DMG] + [1690223534929] [38923:6627404] [DMG] Data = 65521, + [1690223534929] [38923:6627404] [DMG] }, + [1690223534929] [38923:6627404] [DMG] + [1690223534929] [38923:6627404] [DMG] }, + [1690223534929] [38923:6627404] [DMG] + [1690223534929] [38923:6627404] [DMG] ], + [1690223534929] [38923:6627404] [DMG] + [1690223534929] [38923:6627404] [DMG] InteractionModelRevision = 1 + [1690223534929] [38923:6627404] [DMG] } + [1690223534929] [38923:6627404] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299831 + [1690223534929] [38923:6627404] [TOO] AdminVendorId: 65521 + [1690223534929] [38923:6627404] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x9ce33771 Peer = 01:0000000000000001 + [1690223534929] [38923:6627404] [EM] <<< [E:20789r S:46406 M:27652536 (Ack:25511817)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 27: Before expiration of PIXIT.CADMIN.CwDuration seconds set in + step 24, TH_CR1 sends RemoveFabric command to DUT_CE with FabricIndex + set to the fabric index of TH_CR2s fabric" + PICS: OPCREDS.S.C0a.Rsp + verification: | + Before expiration of PIXIT.CADMIN.CwDuration seconds set in step 24, from interactive mode of TH_CR1 send RemoveFabric command with FabricIndex set to the fabric index of TH_CR2’s fabric + + operationalcredentials remove-fabric 2 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + On TH_CR1 logs, verify for NOCResponse with statuscode 0 and fabric index equal to fabric index of TH_CR2's fabric + + + + InvokeResponseMessage = + [1690223865565] [38924:6615100] [DMG] { + [1690223865565] [38924:6615100] [DMG] suppressResponse = false, + [1690223865565] [38924:6615100] [DMG] InvokeResponseIBs = + [1690223865565] [38924:6615100] [DMG] [ + [1690223865565] [38924:6615100] [DMG] InvokeResponseIB = + [1690223865565] [38924:6615100] [DMG] { + [1690223865565] [38924:6615100] [DMG] CommandDataIB = + [1690223865565] [38924:6615100] [DMG] { + [1690223865565] [38924:6615100] [DMG] CommandPathIB = + [1690223865565] [38924:6615100] [DMG] { + [1690223865565] [38924:6615100] [DMG] EndpointId = 0x0, + [1690223865565] [38924:6615100] [DMG] ClusterId = 0x3e, + [1690223865566] [38924:6615100] [DMG] CommandId = 0x8, + [1690223865566] [38924:6615100] [DMG] }, + [1690223865566] [38924:6615100] [DMG] + [1690223865566] [38924:6615100] [DMG] CommandFields = + [1690223865566] [38924:6615100] [DMG] { + [1690223865566] [38924:6615100] [DMG] 0x0 = 0, + [1690223865566] [38924:6615100] [DMG] 0x1 = 2, + [1690223865566] [38924:6615100] [DMG] }, + [1690223865566] [38924:6615100] [DMG] }, + [1690223865566] [38924:6615100] [DMG] + [1690223865566] [38924:6615100] [DMG] }, + [1690223865566] [38924:6615100] [DMG] + [1690223865566] [38924:6615100] [DMG] ], + [1690223865566] [38924:6615100] [DMG] + [1690223865566] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223865566] [38924:6615100] [DMG] }, + [1690223865566] [38924:6615100] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + [1690223865566] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 + [1690223865566] [38924:6615100] [TOO] NOCResponse: { + [1690223865566] [38924:6615100] [TOO] statusCode: 0 + [1690223865566] [38924:6615100] [TOO] fabricIndex: 2 + [1690223865566] [38924:6615100] [TOO] } + [1690223865566] [38924:6615100] [DMG] ICR moving to [AwaitingDe] + [1690223865566] [38924:6615100] [EM] <<< [E:2308i S:948 M:8871682 (Ack:208014074)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 28: Verify TH_CR1 receives subscription notifications which show + AdminFabricIndex value to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show AdminFabricIndex value to be null + + + ReportDataMessage = + [1690223865568] [38924:6615100] [DMG] { + [1690223865568] [38924:6615100] [DMG] SubscriptionId = 0x4daaefab, + [1690223865568] [38924:6615100] [DMG] AttributeReportIBs = + [1690223865568] [38924:6615100] [DMG] [ + [1690223865568] [38924:6615100] [DMG] AttributeReportIB = + [1690223865568] [38924:6615100] [DMG] { + [1690223865568] [38924:6615100] [DMG] AttributeDataIB = + [1690223865568] [38924:6615100] [DMG] { + [1690223865568] [38924:6615100] [DMG] DataVersion = 0xed5d12be, + [1690223865568] [38924:6615100] [DMG] AttributePathIB = + [1690223865568] [38924:6615100] [DMG] { + [1690223865568] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223865568] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223865568] [38924:6615100] [DMG] Attribute = 0x0000_0001, + [1690223865568] [38924:6615100] [DMG] } + [1690223865568] [38924:6615100] [DMG] + [1690223865568] [38924:6615100] [DMG] Data = NULL + [1690223865568] [38924:6615100] [DMG] }, + [1690223865568] [38924:6615100] [DMG] + [1690223865568] [38924:6615100] [DMG] }, + [1690223865568] [38924:6615100] [DMG] + [1690223865568] [38924:6615100] [DMG] ], + [1690223865568] [38924:6615100] [DMG] + [1690223865568] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223865568] [38924:6615100] [DMG] } + [1690223865568] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299838 + [1690223865568] [38924:6615100] [TOO] AdminFabricIndex: null + [1690223865568] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690223865568] [38924:6615100] [EM] <<< [E:20807r S:948 M:8871683 (Ack:208014075)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: "Step 29: TH_CR1 reads WindowStatus attribute from DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In interactive mode of TH_CR1, read windowstatus attribute, + + administratorcommissioning read window-status 1 0 --commissioner-name alpha + + Verify TH_CR1 logs for windowstatus to be 1 + + + ReportDataMessage = + [1690223928167] [38924:6615100] [DMG] { + [1690223928167] [38924:6615100] [DMG] AttributeReportIBs = + [1690223928167] [38924:6615100] [DMG] [ + [1690223928167] [38924:6615100] [DMG] AttributeReportIB = + [1690223928167] [38924:6615100] [DMG] { + [1690223928167] [38924:6615100] [DMG] AttributeDataIB = + [1690223928167] [38924:6615100] [DMG] { + [1690223928167] [38924:6615100] [DMG] DataVersion = 0xed5d12be, + [1690223928167] [38924:6615100] [DMG] AttributePathIB = + [1690223928167] [38924:6615100] [DMG] { + [1690223928167] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223928167] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223928167] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690223928167] [38924:6615100] [DMG] } + [1690223928167] [38924:6615100] [DMG] + [1690223928167] [38924:6615100] [DMG] Data = 2, + [1690223928167] [38924:6615100] [DMG] }, + [1690223928167] [38924:6615100] [DMG] + [1690223928167] [38924:6615100] [DMG] }, + [1690223928167] [38924:6615100] [DMG] + [1690223928167] [38924:6615100] [DMG] ], + [1690223928167] [38924:6615100] [DMG] + [1690223928167] [38924:6615100] [DMG] SuppressResponse = true, + [1690223928167] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223928167] [38924:6615100] [DMG] } + [1690223928167] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299838 + [1690223928167] [38924:6615100] [TOO] WindowStatus: 2 + [1690223928167] [38924:6615100] [EM] <<< [E:2309i S:948 M:8871685 (Ack:208014077)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: "Step 30: TH_CR1 reads AdminVendorID attribute from DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In interactive mode of TH_CR1, read adminvendorid attribute, + + administratorcommissioning read admin-vendor-id 1 0 --commissioner-name alpha + + On TH_CR1 logs, verify the value of adminvendorid to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric + + + ReportDataMessage = + [1690223970283] [38924:6615100] [DMG] { + [1690223970283] [38924:6615100] [DMG] AttributeReportIBs = + [1690223970283] [38924:6615100] [DMG] [ + [1690223970283] [38924:6615100] [DMG] AttributeReportIB = + [1690223970283] [38924:6615100] [DMG] { + [1690223970283] [38924:6615100] [DMG] AttributeDataIB = + [1690223970283] [38924:6615100] [DMG] { + [1690223970283] [38924:6615100] [DMG] DataVersion = 0xed5d12be, + [1690223970283] [38924:6615100] [DMG] AttributePathIB = + [1690223970283] [38924:6615100] [DMG] { + [1690223970283] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223970283] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223970283] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690223970283] [38924:6615100] [DMG] } + [1690223970283] [38924:6615100] [DMG] + [1690223970283] [38924:6615100] [DMG] Data = 65521, + [1690223970283] [38924:6615100] [DMG] }, + [1690223970283] [38924:6615100] [DMG] + [1690223970283] [38924:6615100] [DMG] }, + [1690223970283] [38924:6615100] [DMG] + [1690223970283] [38924:6615100] [DMG] ], + [1690223970283] [38924:6615100] [DMG] + [1690223970283] [38924:6615100] [DMG] SuppressResponse = true, + [1690223970283] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223970283] [38924:6615100] [DMG] } + [1690223970283] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299838 + [1690223970283] [38924:6615100] [TOO] AdminVendorId: 65521 + [1690223970283] [38924:6615100] [EM] <<< [E:2310i S:948 M:8871687 (Ack:208014078)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 31: Wait for the expiration of PIXIT.CADMIN.CwDuration seconds + that is set in step 24" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 24 + disabled: true + + - label: + "Step 32: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminVendorId to be null + + ReportDataMessage = + [1690223990049] [38924:6615100] [DMG] { + [1690223990049] [38924:6615100] [DMG] SubscriptionId = 0xdba23243, + [1690223990049] [38924:6615100] [DMG] AttributeReportIBs = + [1690223990049] [38924:6615100] [DMG] [ + [1690223990049] [38924:6615100] [DMG] AttributeReportIB = + [1690223990049] [38924:6615100] [DMG] { + [1690223990049] [38924:6615100] [DMG] AttributeDataIB = + [1690223990049] [38924:6615100] [DMG] { + [1690223990049] [38924:6615100] [DMG] DataVersion = 0xed5d12c0, + [1690223990049] [38924:6615100] [DMG] AttributePathIB = + [1690223990049] [38924:6615100] [DMG] { + [1690223990049] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223990049] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223990049] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690223990050] [38924:6615100] [DMG] } + [1690223990050] [38924:6615100] [DMG] + [1690223990050] [38924:6615100] [DMG] Data = 0, + [1690223990050] [38924:6615100] [DMG] }, + [1690223990050] [38924:6615100] [DMG] + [1690223990050] [38924:6615100] [DMG] }, + [1690223990050] [38924:6615100] [DMG] + [1690223990050] [38924:6615100] [DMG] ], + [1690223990050] [38924:6615100] [DMG] + [1690223990050] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223990050] [38924:6615100] [DMG] } + [1690223990050] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299840 + [1690223990050] [38924:6615100] [TOO] WindowStatus: 0 + [1690223990050] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690223990051] [38924:6615100] [EM] <<< [E:20809r S:948 M:8871688 (Ack:208014079)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690223990051] [38924:6615100] [IN] (S) Sending msg 8871688 on secure session with LSID: 948 + [1690223990051] [38924:6615100] [EM] >>> [E:20810r S:948 M:208014080] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690223990051] [38924:6615100] [EM] Handling via exchange: 20810r, Delegate: 0x105234be0 + [1690223990051] [38924:6615100] [DMG] ReportDataMessage = + [1690223990051] [38924:6615100] [DMG] { + [1690223990051] [38924:6615100] [DMG] SubscriptionId = 0x3621ba48, + [1690223990051] [38924:6615100] [DMG] AttributeReportIBs = + [1690223990051] [38924:6615100] [DMG] [ + [1690223990051] [38924:6615100] [DMG] AttributeReportIB = + [1690223990051] [38924:6615100] [DMG] { + [1690223990051] [38924:6615100] [DMG] AttributeDataIB = + [1690223990051] [38924:6615100] [DMG] { + [1690223990051] [38924:6615100] [DMG] DataVersion = 0xed5d12c0, + [1690223990051] [38924:6615100] [DMG] AttributePathIB = + [1690223990051] [38924:6615100] [DMG] { + [1690223990051] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223990051] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223990051] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690223990051] [38924:6615100] [DMG] } + [1690223990051] [38924:6615100] [DMG] + [1690223990051] [38924:6615100] [DMG] Data = NULL + [1690223990051] [38924:6615100] [DMG] }, + [1690223990051] [38924:6615100] [DMG] + [1690223990051] [38924:6615100] [DMG] }, + [1690223990051] [38924:6615100] [DMG] + [1690223990051] [38924:6615100] [DMG] ], + [1690223990051] [38924:6615100] [DMG] + [1690223990051] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223990051] [38924:6615100] [DMG] } + [1690223990052] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299840 + [1690223990052] [38924:6615100] [TOO] AdminVendorId: null + [1690223990052] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690223990052] [38924:6615100] [EM] <<< [E:20810r S:948 M:8871689 (Ack:208014080)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index b297d4a4b1fc89..990b1b942a77a3 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -31,13 +31,25 @@ tests: - name: "nodeId" value: nodeId + #Issue: https://github.com/project-chip/connectedhomeip/issues/26598 - label: "Step 2: read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 5 - constraints: - type: int16u + verification: | + ./chip-tool colorcontrol read cluster-revision 1 1 + + Verify "ClusterRevision" value is of unit16 and reflects the highest revision number, in RPI the value of ClusterRevision is 6 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1649660967.485745][7940:7945] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_FFFD DataVersion: 4087274515 + [1649660967.485839][7940:7945] CHIP:TOO: ClusterRevision:5 + [1649660967.485946][7940:7945] CHIP:EM: Sending Standalone Ack for MessageCounter:1573389 on exchange 13361i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Step 3a: Read the global attribute: FeatureMap" PICS: ( !CC.S.F00 && !CC.S.F01 && !CC.S.F02 && !CC.S.F03 && !CC.S.F04 ) diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_2_Simulated.yaml deleted file mode 100644 index 1b487bc296e03f..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CC_2_2_Simulated.yaml +++ /dev/null @@ -1,318 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 25.2.2. [TC-CC-2.2] Attributes with client as DUT - -PICS: - - CC.C - -config: - nodeId: 0x12344321 - cluster: "Color Control" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads from the TH the (0x0000) CurrentHue attribute" - PICS: CC.C.A0000 - wait: "readAttribute" - attribute: "CurrentHue" - - - label: "DUT reads from the TH the (0x0001) CurrentSaturation attribute" - PICS: CC.C.A0001 - wait: "readAttribute" - attribute: "CurrentSaturation" - - - label: - "DUT reads from the TH the Optional (0x0002) RemainingTime attribute" - PICS: CC.C.A0002 - wait: "readAttribute" - attribute: "RemainingTime" - - - label: "DUT reads from the TH the (0x0003) CurrentX attribute" - PICS: CC.C.A0003 - wait: "readAttribute" - attribute: "CurrentX" - - - label: "DUT reads from the TH the (0x0004) CurrentY attribute" - PICS: CC.C.A0004 - wait: "readAttribute" - attribute: "CurrentY" - - - label: - "DUT reads from the TH the Optional (0x0005) DriftCompensation - attribute" - PICS: CC.C.A0005 - wait: "readAttribute" - attribute: "DriftCompensation" - - - label: - "DUT reads from the TH the Optional (0x0006) CompensationText - attribute" - PICS: CC.C.A0006 - wait: "readAttribute" - attribute: "CompensationText" - - - label: - "DUT reads from the TH the (0x0007) ColorTemperatureMireds attribute" - PICS: CC.C.A0007 - wait: "readAttribute" - attribute: "ColorTemperatureMireds" - - - label: "DUT reads from the TH the (0x0008) ColorMode attribute" - PICS: CC.C.A0008 - wait: "readAttribute" - attribute: "ColorMode" - - - label: "DUT reads from the TH the (0x000f) Options attribute" - PICS: CC.C.A000f - wait: "readAttribute" - attribute: "Options" - - - label: "DUT reads from the TH the (0x4000) EnhancedCurrentHue attribute" - PICS: CC.C.A4000 - wait: "readAttribute" - attribute: "EnhancedCurrentHue" - - - label: "DUT reads from the TH the (0x4001) EnhancedColorMode attribute" - PICS: CC.C.A4001 - wait: "readAttribute" - attribute: "EnhancedColorMode" - - - label: "DUT reads from the TH the (0x4002) ColorLoopActive attribute" - PICS: CC.C.A4002 - wait: "readAttribute" - attribute: "ColorLoopActive" - - - label: "DUT reads from the TH the (0x4003) ColorLoopDirection attribute" - PICS: CC.C.A4003 - wait: "readAttribute" - attribute: "ColorLoopDirection" - - - label: "DUT reads from the TH the (0x4004) ColorLoopTime attribute" - PICS: CC.C.A4004 - wait: "readAttribute" - attribute: "ColorLoopTime" - - - label: - "DUT reads from the TH the (0x4005) ColorLoopStartEnhancedHue - attribute" - PICS: CC.C.A4005 - wait: "readAttribute" - attribute: "ColorLoopStartEnhancedHue" - - - label: - "DUT reads from the TH the (0x4006) ColorLoopStoredEnhancedHue - attribute" - PICS: CC.C.A4006 - wait: "readAttribute" - attribute: "ColorLoopStoredEnhancedHue" - - - label: "DUT reads from the TH the (0x400a) ColorCapabilities attribute" - PICS: CC.C.A400a - wait: "readAttribute" - attribute: "ColorCapabilities" - - - label: - "DUT reads from the TH the (0x400b) ColorTempPhysicalMinMireds - attribute" - PICS: CC.C.A400b - wait: "readAttribute" - attribute: "ColorTempPhysicalMinMireds" - - - label: - "DUT reads from the TH the (0x400c) ColorTempPhysicalMaxMireds - attribute" - PICS: CC.C.A400c - wait: "readAttribute" - attribute: "ColorTempPhysicalMaxMireds" - - - label: - "DUT reads from the TH the (0x400d) CoupleColorTempToLevelMinMireds - attribute" - PICS: CC.C.A400d - wait: "readAttribute" - attribute: "CoupleColorTempToLevelMinMireds" - - - label: - "DUT reads from the TH the (0x4010) StartUpColorTemperatureMireds - attribute" - PICS: CC.C.A4010 - wait: "readAttribute" - attribute: "StartUpColorTemperatureMireds" - - - label: "DUT reads from the TH the (0x0010) NumberOfPrimaries attribute" - PICS: CC.C.A0010 - wait: "readAttribute" - attribute: "NumberOfPrimaries" - - - label: "DUT reads from the TH the (0x0011) Primary1X attribute" - PICS: CC.C.A0011 - wait: "readAttribute" - attribute: "Primary1X" - - - label: "DUT reads from the TH the (0x0012) Primary1Y attribute" - PICS: CC.C.A0012 - wait: "readAttribute" - attribute: "Primary1Y" - - - label: "DUT reads from the TH the (0x0013) Primary1Intensity attribute" - PICS: CC.C.A0013 - wait: "readAttribute" - attribute: "Primary1Intensity" - - - label: "DUT reads from the TH the (0x0015) Primary2X attribute" - PICS: CC.C.A0015 - wait: "readAttribute" - attribute: "Primary2X" - - - label: "DUT reads from the TH the (0x0016) Primary2Y attribute" - PICS: CC.C.A0016 - wait: "readAttribute" - attribute: "Primary2Y" - - - label: "DUT reads from the TH the (0x0017) Primary2Intensity attribute" - PICS: CC.C.A0017 - wait: "readAttribute" - attribute: "Primary2Intensity" - - - label: "DUT reads from the TH the (0x0019) Primary3X attribute" - PICS: CC.C.A0019 - wait: "readAttribute" - attribute: "Primary3X" - - - label: "DUT reads from the TH the (0x001a) Primary3Y attribute" - PICS: CC.C.A001a - wait: "readAttribute" - attribute: "Primary3Y" - - - label: "DUT reads from the TH the (0x001b) Primary3Intensity attribute" - PICS: CC.C.A001b - wait: "readAttribute" - attribute: "Primary3Intensity" - - - label: "DUT reads from the TH the (0x0020) Primary4X attribute" - PICS: CC.C.A0020 - wait: "readAttribute" - attribute: "Primary4X" - - - label: "DUT reads from the TH the (0x0021) Primary4Y attribute" - PICS: CC.C.A0021 - wait: "readAttribute" - attribute: "Primary4Y" - - - label: "DUT reads from the TH the (0x0022) Primary4Intensity attribute" - PICS: CC.C.A0022 - wait: "readAttribute" - attribute: "Primary4Intensity" - - - label: "DUT reads from the TH the (0x0024) Primary5X attribute" - PICS: CC.C.A0024 - wait: "readAttribute" - attribute: "Primary5X" - - - label: "DUT reads from the TH the (0x0025) Primary5Y attribute" - PICS: CC.C.A0025 - wait: "readAttribute" - attribute: "Primary5Y" - - - label: "DUT reads from the TH the (0x0026) Primary5Intensity attribute" - PICS: CC.C.A0026 - wait: "readAttribute" - attribute: "Primary5Intensity" - - - label: "DUT reads from the TH the (0x0028) Primary6X attribute" - PICS: CC.C.A0028 - wait: "readAttribute" - attribute: "Primary6X" - - - label: "DUT reads from the TH the (0x0029) Primary6Y attribute" - PICS: CC.C.A0029 - wait: "readAttribute" - attribute: "Primary6Y" - - - label: "DUT reads from the TH the (0x002a) Primary6Intensity attribute" - PICS: CC.C.A002a - wait: "readAttribute" - attribute: "Primary6Intensity" - - - label: "DUT reads from the TH the Optional (0x0030) WhitePointX attribute" - PICS: CC.C.A0030 - wait: "readAttribute" - attribute: "WhitePointX" - - - label: "DUT reads from the TH the Optional (0x0031) WhitePointY attribute" - PICS: CC.C.A0031 - wait: "readAttribute" - attribute: "WhitePointY" - - - label: - "DUT reads from the TH the Optional (0x0032) ColorPointRX attribute" - PICS: CC.C.A0032 - wait: "readAttribute" - attribute: "ColorPointRX" - - - label: - "DUT reads from the TH the Optional (0x0033) ColorPointRY attribute" - PICS: CC.C.A0033 - wait: "readAttribute" - attribute: "ColorPointRY" - - - label: - "DUT reads from the TH the Optional (0x0034) ColorPointRIntensity - attribute" - PICS: CC.C.A0034 - wait: "readAttribute" - attribute: "ColorPointRIntensity" - - - label: - "DUT reads from the TH the Optional (0x0036) ColorPointGX attribute" - PICS: CC.C.A0036 - wait: "readAttribute" - attribute: "ColorPointGX" - - - label: - "DUT reads from the TH the Optional (0x0037) ColorPointGY attribute" - PICS: CC.C.A0037 - wait: "readAttribute" - attribute: "ColorPointGY" - - - label: - "DUT reads from the TH the Optional (0x0038) ColorPointGIntensity - attribute" - PICS: CC.C.A0038 - wait: "readAttribute" - attribute: "ColorPointGIntensity" - - - label: - "DUT reads from the TH the Optional (0x003a) ColorPointBX attribute" - PICS: CC.C.A003a - wait: "readAttribute" - attribute: "ColorPointBX" - - - label: - "DUT reads from the TH the Optional (0x003b) ColorPointBY attribute" - PICS: CC.C.A003b - wait: "readAttribute" - attribute: "ColorPointBY" - - - label: - "DUT reads from the TH the Optional (0x003c) ColorPointBIntensity - attribute" - PICS: CC.C.A003c - wait: "readAttribute" - attribute: "ColorPointBIntensity" diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml index 72074fef588ca0..ed4cf48f1dea58 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml @@ -152,7 +152,7 @@ tests: - name: "ms" value: 5000 - - label: "TStep 2f: H reads CurrentHue attribute from DUT" + - label: "Step 2f: H reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" @@ -336,7 +336,7 @@ tests: value: 100 - label: - "TStep 4b: H sends MoveToHue command to DUT with Hue=120, + "Step 4b: H sends MoveToHue command to DUT with Hue=120, Direction=0x02 (up) and TransitionTime=300 (30s)" PICS: CC.S.F00 && CC.S.C00.Rsp command: "MoveToHue" diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml index 2a223b88134b8f..8a6a953fb25af8 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml @@ -228,7 +228,7 @@ tests: - name: "ms" value: 10000 - - label: "TStep 3c: H reads CurrentSaturation attribute from DUT" + - label: "Step 3c: H reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" @@ -317,7 +317,7 @@ tests: minValue: 0 maxValue: 2 - - label: "TStep 4b: H reads EnhancedColorMode attribute from DUT" + - label: "Step 4b: H reads EnhancedColorMode attribute from DUT" PICS: CC.S.F00 && CC.S.A4001 command: "readAttribute" attribute: "EnhancedColorMode" diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml index a072ad1f75ecc9..746355f0f442f1 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml @@ -48,7 +48,7 @@ tests: cluster: "On/Off" command: "On" - - label: "TStep 1a: H reads ColorTempPhysicalMinMireds attribute from DUT" + - label: "Step 1a: H reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" attribute: "ColorTempPhysicalMinMireds" diff --git a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml index 8dc61902cdfbb1..2492c644355dfc 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml @@ -44,7 +44,7 @@ tests: command: "On" - label: - "TStep 2a: H sends MoveToHue command to DUT with Hue=200, + "Step 2a: H sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." PICS: CC.S.C00.Rsp command: "MoveToHue" diff --git a/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml index 807729d36aa952..097b390ed16acc 100644 --- a/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: CDOCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !CDOCONC.S.F00 && !CDOCONC.S.F01 && !CDOCONC.S.F02 && !CDOCONC.S.F03 + && !CDOCONC.S.F04 && !CDOCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F00 + PICS: CDOCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F00 + PICS: " !CDOCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F01 + PICS: CDOCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F01 + PICS: " !CDOCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F02 + PICS: CDOCONC.S.F02 && CDOCONC.S.F01 response: constraints: type: bitmap32 @@ -113,18 +112,18 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F02 + PICS: " !CDOCONC.S.F02 && !CDOCONC.S.F01" response: constraints: type: bitmap32 - hasMasksClear: [0x4] + hasMasksClear: [0x4, 0x2] - label: "Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F03 + PICS: CDOCONC.S.F03 && CDOCONC.S.F01 response: constraints: type: bitmap32 @@ -135,18 +134,18 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F03 + PICS: " !CDOCONC.S.F03 && !CDOCONC.S.F01" response: constraints: type: bitmap32 - hasMasksClear: [0x8] + hasMasksClear: [0x8, 0x2] - label: "Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F04 + PICS: CDOCONC.S.F04 && CDOCONC.S.F00 response: constraints: type: bitmap32 @@ -157,18 +156,18 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F04 + PICS: " !CDOCONC.S.F04 && !CDOCONC.S.F00" response: constraints: type: bitmap32 - hasMasksClear: [0x10] + hasMasksClear: [0x10, 0x1] - label: "Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F05 + PICS: CDOCONC.S.F05 && CDOCONC.S.F00 response: constraints: type: bitmap32 @@ -179,16 +178,16 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F05 + PICS: " !CDOCONC.S.F05 && !CDOCONC.S.F00" response: constraints: type: bitmap32 - hasMasksClear: [0x20] + hasMasksClear: [0x20, 0x1] - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && CDOCONC.S.A0007 && CDOCONC.S.F00 + PICS: CDOCONC.S.A0007 && CDOCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when CDOCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && !CDOCONC.S.A0007 + PICS: " !CDOCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && CDOCONC.S.F00 + PICS: CDOCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when CDOCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && !CDOCONC.S.F00 + PICS: " !CDOCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && CDOCONC.S.F04 + PICS: CDOCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when CDOCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && !CDOCONC.S.F04 + PICS: " !CDOCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && CDOCONC.S.F05 + PICS: CDOCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: CDOCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && !CDOCONC.S.F05 + PICS: " !CDOCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && CDOCONC.S.F01 + PICS: CDOCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: CDOCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && !CDOCONC.S.F01 + PICS: " !CDOCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: CDOCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: CDOCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml index 725034a1575c82..3c80b3bbe7fccf 100644 --- a/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: CMOCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !CMOCONC.S.F00 && !CMOCONC.S.F01 && !CMOCONC.S.F02 && !CMOCONC.S.F03 + && !CMOCONC.S.F04 && !CMOCONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F00 + PICS: CMOCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F00 + PICS: " !CMOCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F01 + PICS: CMOCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F01 + PICS: " !CMOCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F02 + PICS: CMOCONC.S.F02 && CMOCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F02 + PICS: " !CMOCONC.S.F02 && !CMOCONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F03 + PICS: CMOCONC.S.F03 && CMOCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F03 + PICS: " !CMOCONC.S.F03 && !CMOCONC.S.F01" response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F04 + PICS: CMOCONC.S.F04 && CMOCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F04 + PICS: " !CMOCONC.S.F04 && !CMOCONC.S.F00" response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F05 + PICS: CMOCONC.S.F05 && CMOCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F05 + PICS: " !CMOCONC.S.F05 && !CMOCONC.S.F00 " response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && CMOCONC.S.A0007 && CMOCONC.S.F00 + PICS: CMOCONC.S.A0007 && CMOCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when CMOCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && !CMOCONC.S.A0007 + PICS: " !CMOCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && CMOCONC.S.F00 + PICS: CMOCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when CMOCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && !CMOCONC.S.F00 + PICS: " !CMOCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && CMOCONC.S.F04 + PICS: CMOCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when CMOCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && !CMOCONC.S.F04 + PICS: " !CMOCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && CMOCONC.S.F05 + PICS: CMOCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: CMOCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && !CMOCONC.S.F05 + PICS: " !CMOCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && CMOCONC.S.F01 + PICS: CMOCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: CMOCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && !CMOCONC.S.F01 + PICS: " !CMOCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: CMOCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: CMOCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml deleted file mode 100644 index a014fb35013667..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml +++ /dev/null @@ -1,681 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 12.4.15. [TC-CNET-4.17] [WiFi] Verification for attributes check - [DUT-Client] - -PICS: - - CNET.C.F00 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Commission TH and DUT over BLE to setup the Wi-Fi" - verification: | - - disabled: true - - - label: "Step 1: DUT reads the MaxNetworks attribute from the TH" - PICS: CNET.C.A0000 - verification: | - ./chip-tool networkcommissioning read max-networks 1 0 --trace_decode 1 - - Verify MaxNetworks attribute response on TH(all-clusters-app) log: - - [1667208272.085200][14293:14293] CHIP:EM: Handling via exchange: 31335r, Delegate: 0xaaaaaff382d8 - [1667208272.085299][14293:14293] CHIP:IM: Received Read request - [1667208272.085469][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208272.085536][14293:14293] CHIP:DMG: { - [1667208272.085591][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208272.085656][14293:14293] CHIP:DMG: [ - [1667208272.085717][14293:14293] CHIP:DMG: AttributePathIB = - [1667208272.085795][14293:14293] CHIP:DMG: { - [1667208272.085875][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208272.085965][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208272.086053][14293:14293] CHIP:DMG: Attribute = 0x0000_0000, - [1667208272.086129][14293:14293] CHIP:DMG: } - [1667208272.086305][14293:14293] CHIP:DMG: - [1667208272.086375][14293:14293] CHIP:DMG: ], - [1667208272.086446][14293:14293] CHIP:DMG: - [1667208272.086558][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208272.086623][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208272.086683][14293:14293] CHIP:DMG: }, - [1667208272.086838][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208272.087061][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208272.087133][14293:14293] CHIP:DMG: Cluster 31, Attribute 0 is dirty - [1667208272.087187][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0000 (expanded=0) - [1667208272.087411][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208272.087490][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208272.087693][14293:14293] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667208272.088306][14293:14293] CHIP:EM: <<< [E:31335r M:207979142 (Ack:102020621)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208272.088408][14293:14293] CHIP:IN: (S) Sending msg 207979142 on secure session with LSID: 36091 - [1667208272.089216][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:51656 | 207979142 | [Interaction Model (1) / Report Data (0x05) / Session = 62189 / Exchange = 31335] - [1667208272.089312][14293:14293] CHIP:DMG: Header Flags = - [1667208272.089370][14293:14293] CHIP:DMG: { - [1667208272.089455][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208272.089511][14293:14293] CHIP:DMG: { - [1667208272.089571][14293:14293] CHIP:DMG: AckMsg = 102020621 - [1667208272.089698][14293:14293] CHIP:DMG: NeedsAck = true - [1667208272.089751][14293:14293] CHIP:DMG: } - [1667208272.089825][14293:14293] CHIP:DMG: } - [1667208272.089880][14293:14293] CHIP:DMG: - [1667208272.089947][14293:14293] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667208272.090003][14293:14293] CHIP:DMG: { - [1667208272.090058][14293:14293] CHIP:DMG: data = 00edf2008682650ca88b35a87ab9790201216607af689478e5c56dad2629043281e44b91b4ac9e365e70b2ddd2a03df4d99b2f61bdd43e79d8cd1ebac7435b1d5f00ede22d15 - [1667208272.090116][14293:14293] CHIP:DMG: buffer_ptr = 187650247915488 - [1667208272.090169][14293:14293] CHIP:DMG: } - [1667208272.090220][14293:14293] CHIP:DMG: - [1667208272.090295][14293:14293] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667208272.090351][14293:14293] CHIP:DMG: { - [1667208272.090405][14293:14293] CHIP:DMG: data = 153601153501260083a6a084370124020024033124040018240201181818290424ff0118 - [1667208272.090489][14293:14293] CHIP:DMG: } - [1667208272.090613][14293:14293] CHIP:DMG: - [1667208272.090767][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208272.090833][14293:14293] CHIP:DMG: { - [1667208272.090958][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208272.091047][14293:14293] CHIP:DMG: [ - [1667208272.091111][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208272.091200][14293:14293] CHIP:DMG: { - [1667208272.091274][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208272.091356][14293:14293] CHIP:DMG: { - [1667208272.091508][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208272.091585][14293:14293] CHIP:DMG: AttributePathIB = - [1667208272.091679][14293:14293] CHIP:DMG: { - [1667208272.091772][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208272.091871][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208272.091961][14293:14293] CHIP:DMG: Attribute = 0x0000_0000, - [1667208272.092109][14293:14293] CHIP:DMG: } - [1667208272.092212][14293:14293] CHIP:DMG: - [1667208272.092308][14293:14293] CHIP:DMG: Data = 1, - [1667208272.092394][14293:14293] CHIP:DMG: }, - [1667208272.092489][14293:14293] CHIP:DMG: - [1667208272.092558][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 2: DUT reads the Networks attribute from the TH" - PICS: CNET.C.A0001 - verification: | - ./chip-tool networkcommissioning read networks 1 0 --trace_decode 1 - - Verify Networks attribute response on TH(all-clusters-app) log: - - [1667208308.741069][14293:14293] CHIP:EM: Handling via exchange: 43353r, Delegate: 0xaaaaaff382d8 - [1667208308.741175][14293:14293] CHIP:IM: Received Read request - [1667208308.741369][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208308.741460][14293:14293] CHIP:DMG: { - [1667208308.741516][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208308.741582][14293:14293] CHIP:DMG: [ - [1667208308.741667][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.741840][14293:14293] CHIP:DMG: { - [1667208308.741921][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.742024][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.742187][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.742319][14293:14293] CHIP:DMG: } - [1667208308.742512][14293:14293] CHIP:DMG: - [1667208308.742609][14293:14293] CHIP:DMG: ], - [1667208308.742684][14293:14293] CHIP:DMG: - [1667208308.742830][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208308.742954][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208308.743093][14293:14293] CHIP:DMG: }, - [1667208308.743284][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208308.743587][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208308.743666][14293:14293] CHIP:DMG: Cluster 31, Attribute 1 is dirty - [1667208308.743746][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0001 (expanded=0) - [1667208308.743815][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208308.743892][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208308.745831][14293:14293] CHIP:DMG: Sending report (payload has 73 bytes)... - [1667208308.746713][14293:14293] CHIP:EM: <<< [E:43353r M:155711130 (Ack:201136820)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208308.746838][14293:14293] CHIP:IN: (S) Sending msg 155711130 on secure session with LSID: 36092 - [1667208308.747599][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:52150 | 155711130 | [Interaction Model (1) / Report Data (0x05) / Session = 40348 / Exchange = 43353] - [1667208308.747711][14293:14293] CHIP:DMG: Header Flags = - [1667208308.747768][14293:14293] CHIP:DMG: { - [1667208308.747856][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208308.747913][14293:14293] CHIP:DMG: { - [1667208308.747974][14293:14293] CHIP:DMG: AckMsg = 201136820 - [1667208308.748053][14293:14293] CHIP:DMG: NeedsAck = true - [1667208308.748108][14293:14293] CHIP:DMG: } - [1667208308.748180][14293:14293] CHIP:DMG: } - [1667208308.748264][14293:14293] CHIP:DMG: - [1667208308.748333][14293:14293] CHIP:DMG: Encrypted Payload (107 bytes) = - [1667208308.748389][14293:14293] CHIP:DMG: { - [1667208308.748465][14293:14293] CHIP:DMG: data = 009c9d009af64709fd692537184757531ff033e57fff8702ca85430f673c4c8802c45aefde3185456e10531518fbd5f20b65eb97c3e838cb25b721f6f888c8193a57321ca2a250076c3193de634943ed81438452b3634c9eaad965089bb493bbf863758b04303f072253e7 - [1667208308.748528][14293:14293] CHIP:DMG: buffer_ptr = 187650247918064 - [1667208308.748580][14293:14293] CHIP:DMG: } - [1667208308.748659][14293:14293] CHIP:DMG: - [1667208308.748734][14293:14293] CHIP:DMG: Decrypted Payload (73 bytes) = - [1667208308.748790][14293:14293] CHIP:DMG: { - [1667208308.748868][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240401183602181818153501260083a6a0843701240200240331240401340518350230000465746830290118181818290424ff0118 - [1667208308.748924][14293:14293] CHIP:DMG: } - [1667208308.748976][14293:14293] CHIP:DMG: - [1667208308.749223][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208308.749291][14293:14293] CHIP:DMG: { - [1667208308.749345][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208308.749440][14293:14293] CHIP:DMG: [ - [1667208308.749526][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208308.749608][14293:14293] CHIP:DMG: { - [1667208308.749695][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208308.749785][14293:14293] CHIP:DMG: { - [1667208308.749889][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208308.749979][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.750094][14293:14293] CHIP:DMG: { - [1667208308.750191][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.750316][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.750437][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.750555][14293:14293] CHIP:DMG: } - [1667208308.750682][14293:14293] CHIP:DMG: - [1667208308.750770][14293:14293] CHIP:DMG: Data = [ - [1667208308.750884][14293:14293] CHIP:DMG: - [1667208308.750982][14293:14293] CHIP:DMG: ], - [1667208308.751090][14293:14293] CHIP:DMG: }, - [1667208308.751200][14293:14293] CHIP:DMG: - [1667208308.751275][14293:14293] CHIP:DMG: }, - [1667208308.751401][14293:14293] CHIP:DMG: - [1667208308.751471][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208308.751584][14293:14293] CHIP:DMG: { - [1667208308.751666][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208308.751765][14293:14293] CHIP:DMG: { - [1667208308.751856][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208308.751962][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.752053][14293:14293] CHIP:DMG: { - [1667208308.752159][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.752264][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.752376][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.752493][14293:14293] CHIP:DMG: ListIndex = Null, - [1667208308.752596][14293:14293] CHIP:DMG: } - [1667208308.752712][14293:14293] CHIP:DMG: - [1667208308.752794][14293:14293] CHIP:DMG: Data = - [1667208308.752909][14293:14293] CHIP:DMG: { - [1667208308.752998][14293:14293] CHIP:DMG: 0x0 = [ - [1667208308.753108][14293:14293] CHIP:DMG: 0x65, 0x74, 0x68, 0x30, - [1667208308.753240][14293:14293] CHIP:DMG: ] (4 bytes) - [1667208308.753335][14293:14293] CHIP:DMG: 0x1 = true, - [1667208308.753456][14293:14293] CHIP:DMG: }, - [1667208308.753544][14293:14293] CHIP:DMG: }, - [1667208308.753658][14293:14293] CHIP:DMG: - disabled: true - - - label: "Step 3: DUT reads ScanMaxTimeSeconds attribute from the TH" - PICS: CNET.C.A0002 - verification: | - ./chip-tool networkcommissioning read scan-max-time-seconds 1 0 --trace_decode 1 - - Verify ScanMaxTimeSeconds attribute response on TH(all-clusters-app) log: - - [1667208358.868821][14293:14293] CHIP:EM: Handling via exchange: 17173r, Delegate: 0xaaaaaff382d8 - [1667208358.868931][14293:14293] CHIP:IM: Received Read request - [1667208358.869170][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208358.869237][14293:14293] CHIP:DMG: { - [1667208358.869291][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208358.869370][14293:14293] CHIP:DMG: [ - [1667208358.869433][14293:14293] CHIP:DMG: AttributePathIB = - [1667208358.869511][14293:14293] CHIP:DMG: { - [1667208358.869593][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208358.869686][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208358.869775][14293:14293] CHIP:DMG: Attribute = 0x0000_0002, - [1667208358.869850][14293:14293] CHIP:DMG: } - [1667208358.869926][14293:14293] CHIP:DMG: - [1667208358.870064][14293:14293] CHIP:DMG: ], - [1667208358.870143][14293:14293] CHIP:DMG: - [1667208358.870210][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208358.870343][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208358.870407][14293:14293] CHIP:DMG: }, - [1667208358.870595][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208358.870832][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208358.870903][14293:14293] CHIP:DMG: Cluster 31, Attribute 2 is dirty - [1667208358.870958][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0002 (expanded=0) - [1667208358.871103][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=v - [1667208358.871189][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208358.871303][14293:14293] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667208358.871854][14293:14293] CHIP:EM: <<< [E:17173r M:175083412 (Ack:257131767)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208358.871956][14293:14293] CHIP:IN: (S) Sending msg 175083412 on secure session with LSID: 36093 - [1667208358.872780][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:41082 | 175083412 | [Interaction Model (1) / Report Data (0x05) / Session = 43326 / Exchange = 17173] - [1667208358.873041][14293:14293] CHIP:DMG: Header Flags = - [1667208358.873159][14293:14293] CHIP:DMG: { - [1667208358.873252][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208358.873310][14293:14293] CHIP:DMG: { - [1667208358.873369][14293:14293] CHIP:DMG: AckMsg = 257131767 - [1667208358.873425][14293:14293] CHIP:DMG: NeedsAck = true - [1667208358.873478][14293:14293] CHIP:DMG: } - [1667208358.873550][14293:14293] CHIP:DMG: } - [1667208358.873605][14293:14293] CHIP:DMG: - [1667208358.873672][14293:14293] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667208358.873727][14293:14293] CHIP:DMG: { - [1667208358.873781][14293:14293] CHIP:DMG: data = 003ea900948f6f0a64576cb350999ca4bfe0f2c004599f0e32405a5fb661b2d77968c18d24e8ca5bed619834ff7141e03479eb4aa7dfeeb71e0ac45551af4e607392c200306a - [1667208358.873849][14293:14293] CHIP:DMG: buffer_ptr = 187650247916560 - [1667208358.873902][14293:14293] CHIP:DMG: } - [1667208358.873954][14293:14293] CHIP:DMG: - [1667208358.874026][14293:14293] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667208358.874082][14293:14293] CHIP:DMG: { - [1667208358.874195][14293:14293] CHIP:DMG: data = 153601153501260083a6a084370124020024033124040218240200181818290424ff0118 - [1667208358.874255][14293:14293] CHIP:DMG: } - [1667208358.874306][14293:14293] CHIP:DMG: - [1667208358.874455][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208358.874660][14293:14293] CHIP:DMG: { - [1667208358.874714][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208358.874846][14293:14293] CHIP:DMG: [ - [1667208358.874910][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208358.874997][14293:14293] CHIP:DMG: { - [1667208358.875069][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208358.875156][14293:14293] CHIP:DMG: { - [1667208358.875392][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208358.875546][14293:14293] CHIP:DMG: AttributePathIB = - [1667208358.875633][14293:14293] CHIP:DMG: { - [1667208358.875728][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208358.875827][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208358.875926][14293:14293] CHIP:DMG: Attribute = 0x0000_0002, - [1667208358.876076][14293:14293] CHIP:DMG: } - [1667208358.876180][14293:14293] CHIP:DMG: - [1667208358.876270][14293:14293] CHIP:DMG: Data = 10, - [1667208358.876349][14293:14293] CHIP:DMG: }, - [1667208358.876442][14293:14293] CHIP:DMG: - [1667208358.876513][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 4: DUT reads ConnectMaxTimeSeconds attribute from the TH" - PICS: CNET.C.A0003 - verification: | - ./chip-tool networkcommissioning read connect-max-time-seconds 1 0 --trace_decode 1 - - Verify ConnectMaxTimeSeconds attribute response on TH(all-clusters-app) log: - - [1667208410.708719][14293:14293] CHIP:EM: Handling via exchange: 52668r, Delegate: 0xaaaaaff382d8 - [1667208410.708835][14293:14293] CHIP:IM: Received Read request - [1667208410.709030][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208410.709096][14293:14293] CHIP:DMG: { - [1667208410.709174][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208410.709242][14293:14293] CHIP:DMG: [ - [1667208410.709303][14293:14293] CHIP:DMG: AttributePathIB = - [1667208410.709385][14293:14293] CHIP:DMG: { - [1667208410.709484][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208410.709575][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208410.709676][14293:14293] CHIP:DMG: Attribute = 0x0000_0003, - [1667208410.709759][14293:14293] CHIP:DMG: } - [1667208410.709856][14293:14293] CHIP:DMG: - [1667208410.709927][14293:14293] CHIP:DMG: ], - [1667208410.710019][14293:14293] CHIP:DMG: - [1667208410.710087][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208410.710152][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208410.710232][14293:14293] CHIP:DMG: }, - [1667208410.710419][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208410.710816][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208410.710911][14293:14293] CHIP:DMG: Cluster 31, Attribute 3 is dirty - [1667208410.710967][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0003 (expanded=0) - [1667208410.711033][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=v - [1667208410.711109][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208410.711245][14293:14293] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667208410.711825][14293:14293] CHIP:EM: <<< [E:52668r M:204757753 (Ack:51978211)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208410.711925][14293:14293] CHIP:IN: (S) Sending msg 204757753 on secure session with LSID: 36094 - [1667208410.712576][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:48829 | 204757753 | [Interaction Model (1) / Report Data (0x05) / Session = 43814 / Exchange = 52668] - [1667208410.712671][14293:14293] CHIP:DMG: Header Flags = - [1667208410.712728][14293:14293] CHIP:DMG: { - [1667208410.712812][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208410.712868][14293:14293] CHIP:DMG: { - [1667208410.712927][14293:14293] CHIP:DMG: AckMsg = 51978211 - [1667208410.712982][14293:14293] CHIP:DMG: NeedsAck = true - [1667208410.713035][14293:14293] CHIP:DMG: } - [1667208410.713106][14293:14293] CHIP:DMG: } - [1667208410.713160][14293:14293] CHIP:DMG: - [1667208410.713219][14293:14293] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667208410.713266][14293:14293] CHIP:DMG: { - [1667208410.713337][14293:14293] CHIP:DMG: data = 0026ab00f95a340cdd7df02341572cbef90c9a4badc623b39e13ff0fe25d3e7649550df3a5deca3b8dbb139bd27f8ee1e519d7659c3e00f890959a903cd9c9672a1cb799e59c - [1667208410.713389][14293:14293] CHIP:DMG: buffer_ptr = 187650247919616 - [1667208410.713446][14293:14293] CHIP:DMG: } - [1667208410.713498][14293:14293] CHIP:DMG: - [1667208410.713573][14293:14293] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667208410.713657][14293:14293] CHIP:DMG: { - [1667208410.713713][14293:14293] CHIP:DMG: data = 153601153501260083a6a084370124020024033124040318240200181818290424ff0118 - [1667208410.713768][14293:14293] CHIP:DMG: } - [1667208410.713819][14293:14293] CHIP:DMG: - [1667208410.713984][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208410.714078][14293:14293] CHIP:DMG: { - [1667208410.714133][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208410.714239][14293:14293] CHIP:DMG: [ - [1667208410.714303][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208410.714389][14293:14293] CHIP:DMG: { - [1667208410.714533][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208410.714625][14293:14293] CHIP:DMG: { - [1667208410.714735][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208410.714825][14293:14293] CHIP:DMG: AttributePathIB = - [1667208410.714928][14293:14293] CHIP:DMG: { - [1667208410.715023][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208410.715144][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208410.715262][14293:14293] CHIP:DMG: Attribute = 0x0000_0003, - [1667208410.715349][14293:14293] CHIP:DMG: } - [1667208410.715460][14293:14293] CHIP:DMG: - [1667208410.715558][14293:14293] CHIP:DMG: Data = 20, - [1667208410.715820][14293:14293] CHIP:DMG: }, - [1667208410.715914][14293:14293] CHIP:DMG: - [1667208410.715987][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 5: DUT reads InterfaceEnabled attribute from the TH" - PICS: CNET.C.A0004 - verification: | - ./chip-tool networkcommissioning read interface-enabled 1 0 --trace_decode 1 - - Verify InterfaceEnabled attribute response on TH(all-clusters-app) log: - - [1667208443.008116][14293:14293] CHIP:EM: Handling via exchange: 58556r, Delegate: 0xaaaaaff382d8 - [1667208443.008243][14293:14293] CHIP:IM: Received Read request - [1667208443.008440][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208443.008508][14293:14293] CHIP:DMG: { - [1667208443.008563][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208443.008628][14293:14293] CHIP:DMG: [ - [1667208443.008713][14293:14293] CHIP:DMG: AttributePathIB = - [1667208443.008809][14293:14293] CHIP:DMG: { - [1667208443.008883][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208443.008967][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208443.009074][14293:14293] CHIP:DMG: Attribute = 0x0000_0004, - [1667208443.009158][14293:14293] CHIP:DMG: } - [1667208443.009256][14293:14293] CHIP:DMG: - [1667208443.009328][14293:14293] CHIP:DMG: ], - [1667208443.009421][14293:14293] CHIP:DMG: - [1667208443.009491][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208443.009567][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208443.009650][14293:14293] CHIP:DMG: }, - [1667208443.009833][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208443.010086][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208443.010157][14293:14293] CHIP:DMG: Cluster 31, Attribute 4 is dirty - [1667208443.010235][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0004 (expanded=0) - [1667208443.010305][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=v - [1667208443.010382][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208443.010532][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208443.011166][14293:14293] CHIP:EM: <<< [E:58556r M:187682312 (Ack:202477555)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208443.011267][14293:14293] CHIP:IN: (S) Sending msg 187682312 on secure session with LSID: 36095 - [1667208443.011979][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:55431 | 187682312 | [Interaction Model (1) / Report Data (0x05) / Session = 33043 / Exchange = 58556] - [1667208443.012078][14293:14293] CHIP:DMG: Header Flags = - [1667208443.012135][14293:14293] CHIP:DMG: { - [1667208443.012221][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208443.012277][14293:14293] CHIP:DMG: { - [1667208443.012337][14293:14293] CHIP:DMG: AckMsg = 202477555 - [1667208443.012417][14293:14293] CHIP:DMG: NeedsAck = true - [1667208443.012471][14293:14293] CHIP:DMG: } - [1667208443.012544][14293:14293] CHIP:DMG: } - [1667208443.012623][14293:14293] CHIP:DMG: - [1667208443.012689][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208443.012766][14293:14293] CHIP:DMG: { - [1667208443.012822][14293:14293] CHIP:DMG: data = 0013810008ce2f0b6a8e60eea7fcefa14510f7d1d921eac543f9f7fa8e2a5a6c200fe67232673f9d798999b6784b99d7eb3c84e98ff73a9cc013cd53663d1fd14135e4f579 - [1667208443.012880][14293:14293] CHIP:DMG: buffer_ptr = 187650247916304 - [1667208443.013136][14293:14293] CHIP:DMG: } - [1667208443.013195][14293:14293] CHIP:DMG: - [1667208443.013272][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208443.013353][14293:14293] CHIP:DMG: { - [1667208443.013410][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240404182902181818290424ff0118 - [1667208443.013465][14293:14293] CHIP:DMG: } - [1667208443.013517][14293:14293] CHIP:DMG: - [1667208443.013685][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208443.013773][14293:14293] CHIP:DMG: { - [1667208443.013828][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208443.013928][14293:14293] CHIP:DMG: [ - [1667208443.013993][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208443.014103][14293:14293] CHIP:DMG: { - [1667208443.014188][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208443.014297][14293:14293] CHIP:DMG: { - [1667208443.014391][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208443.014520][14293:14293] CHIP:DMG: AttributePathIB = - [1667208443.014612][14293:14293] CHIP:DMG: { - [1667208443.014723][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208443.014814][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208443.014930][14293:14293] CHIP:DMG: Attribute = 0x0000_0004, - [1667208443.015015][14293:14293] CHIP:DMG: } - [1667208443.015134][14293:14293] CHIP:DMG: - [1667208443.015245][14293:14293] CHIP:DMG: Data = true, - [1667208443.015327][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 6: DUT reads LastNetworkingStatus attribute from the TH" - PICS: CNET.C.A0005 - verification: | - ./chip-tool networkcommissioning read last-networking-status 1 0 --trace_decode 1 - - Verify LastNetworkingStatus attribute response on TH(all-clusters-app) log: - - [1667208469.154755][14293:14293] CHIP:EM: Handling via exchange: 45977r, Delegate: 0xaaaaaff382d8 - [1667208469.154875][14293:14293] CHIP:IM: Received Read request - [1667208469.155241][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208469.155315][14293:14293] CHIP:DMG: { - [1667208469.155395][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208469.155461][14293:14293] CHIP:DMG: [ - [1667208469.155514][14293:14293] CHIP:DMG: AttributePathIB = - [1667208469.155586][14293:14293] CHIP:DMG: { - [1667208469.155664][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208469.155777][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208469.155868][14293:14293] CHIP:DMG: Attribute = 0x0000_0005, - [1667208469.155968][14293:14293] CHIP:DMG: } - [1667208469.156047][14293:14293] CHIP:DMG: - [1667208469.156136][14293:14293] CHIP:DMG: ], - [1667208469.156210][14293:14293] CHIP:DMG: - [1667208469.156277][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208469.156361][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208469.156422][14293:14293] CHIP:DMG: }, - [1667208469.156602][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208469.156848][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208469.156943][14293:14293] CHIP:DMG: Cluster 31, Attribute 5 is dirty - [1667208469.156998][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0005 (expanded=0) - [1667208469.157065][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208469.157164][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208469.157295][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208469.157908][14293:14293] CHIP:EM: <<< [E:45977r M:124480128 (Ack:41106952)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208469.158007][14293:14293] CHIP:IN: (S) Sending msg 124480128 on secure session with LSID: 36096 - [1667208469.158760][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:42766 | 124480128 | [Interaction Model (1) / Report Data (0x05) / Session = 62096 / Exchange = 45977] - [1667208469.158858][14293:14293] CHIP:DMG: Header Flags = - [1667208469.158915][14293:14293] CHIP:DMG: { - [1667208469.158999][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208469.159055][14293:14293] CHIP:DMG: { - [1667208469.159113][14293:14293] CHIP:DMG: AckMsg = 41106952 - [1667208469.159200][14293:14293] CHIP:DMG: NeedsAck = true - [1667208469.159254][14293:14293] CHIP:DMG: } - [1667208469.159327][14293:14293] CHIP:DMG: } - [1667208469.159406][14293:14293] CHIP:DMG: - [1667208469.159475][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208469.159531][14293:14293] CHIP:DMG: { - [1667208469.159609][14293:14293] CHIP:DMG: data = 0090f200806a6b07d642bf93d4c8b77a7c81b3f962ba8e786850a3096e2e6ec88d07c84d2be0da74164ac245461957f335581afcfccced791c8558dc20ac7837f4c3e563ac - [1667208469.159668][14293:14293] CHIP:DMG: buffer_ptr = 187650247921216 - [1667208469.159721][14293:14293] CHIP:DMG: } - [1667208469.159796][14293:14293] CHIP:DMG: - [1667208469.159872][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208469.159951][14293:14293] CHIP:DMG: { - [1667208469.160007][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240405183402181818290424ff0118 - [1667208469.160063][14293:14293] CHIP:DMG: } - [1667208469.160136][14293:14293] CHIP:DMG: - [1667208469.160282][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208469.160369][14293:14293] CHIP:DMG: { - [1667208469.160423][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208469.160528][14293:14293] CHIP:DMG: [ - [1667208469.160593][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208469.160702][14293:14293] CHIP:DMG: { - [1667208469.160785][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208469.160900][14293:14293] CHIP:DMG: { - [1667208469.160994][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208469.161104][14293:14293] CHIP:DMG: AttributePathIB = - [1667208469.161196][14293:14293] CHIP:DMG: { - [1667208469.161310][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208469.161424][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208469.161517][14293:14293] CHIP:DMG: Attribute = 0x0000_0005, - [1667208469.161634][14293:14293] CHIP:DMG: } - [1667208469.161732][14293:14293] CHIP:DMG: - [1667208469.161834][14293:14293] CHIP:DMG: Data = 0, - [1667208469.161919][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 7: DUT reads LastNetworkID attribute from the TH" - PICS: CNET.C.A0006 - verification: | - ./chip-tool networkcommissioning read last-network-id 1 0 --trace_decode 1 - - Verify LastNetworkID attribute response on TH(all-clusters-app) log: - - [1667208560.669590][14293:14293] CHIP:EM: Handling via exchange: 8923r, Delegate: 0xaaaaaff382d8 - [1667208560.669685][14293:14293] CHIP:IM: Received Read request - [1667208560.669852][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208560.669918][14293:14293] CHIP:DMG: { - [1667208560.669971][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208560.670037][14293:14293] CHIP:DMG: [ - [1667208560.670098][14293:14293] CHIP:DMG: AttributePathIB = - [1667208560.670181][14293:14293] CHIP:DMG: { - [1667208560.670254][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208560.670337][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208560.670411][14293:14293] CHIP:DMG: Attribute = 0x0000_0006, - [1667208560.670531][14293:14293] CHIP:DMG: } - [1667208560.670600][14293:14293] CHIP:DMG: - [1667208560.670656][14293:14293] CHIP:DMG: ], - [1667208560.670717][14293:14293] CHIP:DMG: - [1667208560.670813][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208560.670879][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208560.670938][14293:14293] CHIP:DMG: }, - [1667208560.671124][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208560.671497][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208560.671571][14293:14293] CHIP:DMG: Cluster 31, Attribute 6 is dirty - [1667208560.671652][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0006 (expanded=0) - [1667208560.671721][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208560.671798][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208560.671909][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208560.672533][14293:14293] CHIP:EM: <<< [E:8923r M:15654191 (Ack:76394150)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208560.672634][14293:14293] CHIP:IN: (S) Sending msg 15654191 on secure session with LSID: 36097 - [1667208560.673339][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58362 | 15654191 | [Interaction Model (1) / Report Data (0x05) / Session = 25183 / Exchange = 8923] - [1667208560.673436][14293:14293] CHIP:DMG: Header Flags = - [1667208560.673492][14293:14293] CHIP:DMG: { - [1667208560.673577][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208560.673633][14293:14293] CHIP:DMG: { - [1667208560.673692][14293:14293] CHIP:DMG: AckMsg = 76394150 - [1667208560.673772][14293:14293] CHIP:DMG: NeedsAck = true - [1667208560.673827][14293:14293] CHIP:DMG: } - [1667208560.673899][14293:14293] CHIP:DMG: } - [1667208560.673977][14293:14293] CHIP:DMG: - [1667208560.674046][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208560.674101][14293:14293] CHIP:DMG: { - [1667208560.674178][14293:14293] CHIP:DMG: data = 005f62002fddee00d80c8412f88ff071d10fe8c05870e885a47452243d3e90e359d9d7a0e44c456808561806f24b7814babb12c7762f1633bf6489e9baabe9ae6fd8c49efb - [1667208560.674237][14293:14293] CHIP:DMG: buffer_ptr = 187650247916272 - [1667208560.674290][14293:14293] CHIP:DMG: } - [1667208560.674369][14293:14293] CHIP:DMG: - [1667208560.674445][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208560.674546][14293:14293] CHIP:DMG: { - [1667208560.674622][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240406183402181818290424ff0118 - [1667208560.674679][14293:14293] CHIP:DMG: } - [1667208560.674730][14293:14293] CHIP:DMG: - [1686200885.068762][2221:2223] CHIP:DMG: ReportDataMessage = - [1686200885.068823][2221:2223] CHIP:DMG: { - [1686200885.068872][2221:2223] CHIP:DMG: AttributeReportIBs = - [1686200885.068944][2221:2223] CHIP:DMG: [ - [1686200885.069000][2221:2223] CHIP:DMG: AttributeReportIB = - [1686200885.069077][2221:2223] CHIP:DMG: { - [1686200885.069138][2221:2223] CHIP:DMG: AttributeDataIB = - [1686200885.069209][2221:2223] CHIP:DMG: { - [1686200885.069283][2221:2223] CHIP:DMG: DataVersion = 0xe8e1d5c0, - [1686200885.069354][2221:2223] CHIP:DMG: AttributePathIB = - [1686200885.069429][2221:2223] CHIP:DMG: { - [1686200885.069504][2221:2223] CHIP:DMG: Endpoint = 0x0, - [1686200885.069621][2221:2223] CHIP:DMG: Cluster = 0x31, - [1686200885.069710][2221:2223] CHIP:DMG: Attribute = 0x0000_0006, - [1686200885.069785][2221:2223] CHIP:DMG: } - [1686200885.069860][2221:2223] CHIP:DMG: - [1686200885.069933][2221:2223] CHIP:DMG: Data = [ - [1686200885.070011][2221:2223] CHIP:DMG: 0x47, 0x52, 0x4c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - [1686200885.070094][2221:2223] CHIP:DMG: ] (10 bytes) - [1686200885.070161][2221:2223] CHIP:DMG: }, - [1686200885.070236][2221:2223] CHIP:DMG: - [1686200885.070296][2221:2223] CHIP:DMG: }, - [1686200885.070369][2221:2223] CHIP:DMG: - [1686200885.070424][2221:2223] CHIP:DMG: ], - [1686200885.070494][2221:2223] CHIP:DMG: - [1686200885.070550][2221:2223] CHIP:DMG: SuppressResponse = true, - [1686200885.070608][2221:2223] CHIP:DMG: InteractionModelRevision = 1 - [1686200885.070662][2221:2223] CHIP:DMG: } - disabled: true - - - label: "Step 8: DUT reads LastConnectErrorValue attribute from the TH" - PICS: CNET.C.A0007 - verification: | - ./chip-tool networkcommissioning read last-connect-error-value 1 0 --trace_decode 1 - - Verify LastConnectErrorValue attribute response on TH(all-clusters-app) log: - - [1667208660.521154][14293:14293] CHIP:EM: Handling via exchange: 50685r, Delegate: 0xaaaaaff382d8 - [1667208660.521272][14293:14293] CHIP:IM: Received Read request - [1667208660.521464][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208660.521530][14293:14293] CHIP:DMG: { - [1667208660.521585][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208660.521649][14293:14293] CHIP:DMG: [ - [1667208660.521732][14293:14293] CHIP:DMG: AttributePathIB = - [1667208660.521810][14293:14293] CHIP:DMG: { - [1667208660.521889][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208660.522001][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208660.522112][14293:14293] CHIP:DMG: Attribute = 0x0000_0007, - [1667208660.522195][14293:14293] CHIP:DMG: } - [1667208660.522294][14293:14293] CHIP:DMG: - [1667208660.522366][14293:14293] CHIP:DMG: ], - [1667208660.522437][14293:14293] CHIP:DMG: - [1667208660.522624][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208660.522716][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208660.522777][14293:14293] CHIP:DMG: }, - [1667208660.522959][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208660.523199][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208660.523295][14293:14293] CHIP:DMG: Cluster 31, Attribute 7 is dirty - [1667208660.523354][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0007 (expanded=0) - [1667208660.523415][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208660.523490][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208660.523597][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208660.524201][14293:14293] CHIP:EM: <<< [E:50685r M:187408347 (Ack:256041164)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208660.524304][14293:14293] CHIP:IN: (S) Sending msg 187408347 on secure session with LSID: 36098 - [1667208660.525002][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:41724 | 187408347 | [Interaction Model (1) / Report Data (0x05) / Session = 11768 / Exchange = 50685] - [1667208660.525101][14293:14293] CHIP:DMG: Header Flags = - [1667208660.525159][14293:14293] CHIP:DMG: { - [1667208660.525244][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208660.525300][14293:14293] CHIP:DMG: { - [1667208660.525358][14293:14293] CHIP:DMG: AckMsg = 256041164 - [1667208660.525438][14293:14293] CHIP:DMG: NeedsAck = true - [1667208660.525493][14293:14293] CHIP:DMG: } - [1667208660.525567][14293:14293] CHIP:DMG: } - [1667208660.525646][14293:14293] CHIP:DMG: - [1667208660.525716][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208660.525771][14293:14293] CHIP:DMG: { - [1667208660.525851][14293:14293] CHIP:DMG: data = 00f82d00db9f2b0bfc92cc46b01644793468172d04b473e3be4af5b2ac225fbab6a8196d30b3b489100a7c4a3acb5939adce0594f1b13bb12e488a8a8d655958887b4f367c - [1667208660.525910][14293:14293] CHIP:DMG: buffer_ptr = 187650247916496 - [1667208660.525963][14293:14293] CHIP:DMG: } - [1667208660.526038][14293:14293] CHIP:DMG: - [1667208660.526115][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208660.526171][14293:14293] CHIP:DMG: { - [1667208660.526249][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240407183402181818290424ff0118 - [1667208660.526305][14293:14293] CHIP:DMG: } - [1667208660.526357][14293:14293] CHIP:DMG: - [1667208660.526570][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208660.526666][14293:14293] CHIP:DMG: { - [1667208660.526721][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208660.526820][14293:14293] CHIP:DMG: [ - [1667208660.526885][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208660.526972][14293:14293] CHIP:DMG: { - [1667208660.527061][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208660.527142][14293:14293] CHIP:DMG: { - [1667208660.527245][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208660.527329][14293:14293] CHIP:DMG: AttributePathIB = - [1667208660.527432][14293:14293] CHIP:DMG: { - [1667208660.527527][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208660.527633][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208660.527733][14293:14293] CHIP:DMG: Attribute = 0x0000_0007, - [1667208660.527840][14293:14293] CHIP:DMG: } - [1667208660.527951][14293:14293] CHIP:DMG: - [1667208660.528048][14293:14293] CHIP:DMG: Data = NULL - [1667208660.528152][14293:14293] CHIP:DMG: }, - [1667208660.528240][14293:14293] CHIP:DMG: - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml deleted file mode 100644 index 22453236dde1be..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml +++ /dev/null @@ -1,193 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 12.4.16. [TC-CNET-4.18] [Thread] Verification for attributes check - [DUT-Client] - -PICS: - - CNET.C.F01 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Commission TH and DUT on Thread setup" - verification: | - - disabled: true - - - label: "Step 1: DUT reads the MaxNetworks attribute from the TH" - PICS: CNET.C.A0000 - verification: | - ./chip-tool networkcommissioning read max-networks 54 0 - - Verify MaxNetworks attribute response on TH(all-clusters-app) log: - - D: 7993601 [SC]Allocated SecureSession (0x20003680) - waiting for Sigma1 msg - D: 7993608 [EM]Retransmitting MessageCounter:53368032 on exchange 5643r Send Cnt 1 - I: 7993615 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53368032 to 0x0000000000000000c - I: 7993630 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:231115534 on exchar - D: 7993640 [EM]Handling via exchange: 5644r, Delegate: 0x200070ec - D: 7993647 [IM]Received Read request - D: 7993651 [DMG]IM RH moving to [GeneratingReports] - D: 7993657 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 7993666 [DMG] Cluster 31, Attribute 0 is dirty - D: 7993671 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0000 (expanded=0) - D: 7993682 [DMG] Sending report (payload has 36 bytes)... - I: 7993688 [IN]Prepared secure message 0x200048b4 to 0x00000000000 - disabled: true - - - label: "Step 2: DUT reads the Networks attribute from the TH" - PICS: CNET.C.A0001 - verification: | - ./chip-tool networkcommissioning read networks 54 0 - - Verify Networks attribute response on TH(all-clusters-app) log: - - D: 8065181 [SC]Allocated SecureSession (0x20003738) - waiting for Sigma1 msg - D: 8065188 [EM]Retransmitting MessageCounter:53368036 on exchange 57159r Send Cnt 1 - I: 8065196 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53368036 to 0x0000000000000000c - I: 8065213 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:15008713 on exchanr - D: 8065223 [EM]Handling via exchange: 57160r, Delegate: 0x200070ec - D: 8065229 [IM]Received Read request - D: 8065233 [DMG]IM RH moving to [GeneratingReports] - D: 8065240 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8065248 [DMG] Cluster 31, Attribute 1 is dirty - D: 8065254 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0001 (expanded=0) - D: 8065265 [DMG] Sending report (payload has 77 bytes)... - disabled: true - - - label: "Step 3: DUT reads ScanMaxTimeSeconds attribute from the TH" - PICS: CNET.C.A0002 - verification: | - ./chip-tool networkcommissioning read scan-max-time-seconds 54 0 - - Verify ScanMaxTimeSeconds attribute response on TH(all-clusters-app) log: - - - D: 8108702 [SC]Allocated SecureSession (0x200037f0) - waiting for Sigma1 msg - I: 8108710 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:194637583 on exchar - D: 8108720 [EM]Handling via exchange: 42632r, Delegate: 0x200070ec - D: 8108726 [IM]Received Read request - D: 8108730 [DMG]IM RH moving to [GeneratingReports] - D: 8108735 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8108743 [DMG] Cluster 31, Attribute 2 is dirty - D: 8108749 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0002 (expanded=0) - D: 8108758 [DMG] Sending report (payload has 36 bytes)... - disabled: true - - - label: "Step 4: DUT reads ConnectMaxTimeSeconds attribute from the TH" - PICS: CNET.C.A0003 - verification: | - ./chip-tool networkcommissioning read connect-max-time-seconds 54 0 - - Verify InterfaceEnabled attribute response on TH(all-clusters-app) log: - - D: 8145477 [SC]Allocated SecureSession (0x20002c70) - waiting for Sigma1 msg - I: 8145484 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:134704639 on exchar - D: 8145495 [EM]Handling via exchange: 57526r, Delegate: 0x200070ec - D: 8145502 [IM]Received Read request - D: 8145506 [DMG]IM RH moving to [GeneratingReports] - D: 8145511 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8145520 [DMG] Cluster 31, Attribute 3 is dirty - D: 8145525 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0003 (expanded=0) - D: 8145534 [DMG] Sending report (payload has 36 bytes)... - disabled: true - - - label: "Step 5: DUT reads InterfaceEnabled attribute from the TH" - PICS: CNET.C.A0004 - verification: | - ./chip-tool networkcommissioning read interface-enabled 54 0 - - Verify InterfaceEnabled attribute response on TH(all-clusters-app) log: - - D: 8179717 [SC]Allocated SecureSession (0x20002de0) - waiting for Sigma1 msg - I: 8179725 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:158532673 on exchar - D: 8179735 [EM]Handling via exchange: 13106r, Delegate: 0x200070ec - D: 8179741 [IM]Received Read request - D: 8179745 [DMG]IM RH moving to [GeneratingReports] - D: 8179750 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8179759 [DMG] Cluster 31, Attribute 4 is dirty - D: 8179764 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0004 (expanded=0) - D: 8179775 [DMG] Sending report (payload has 35 bytes)... - disabled: true - - - label: "Step 6: DUT reads LastNetworkingStatus attribute from the TH" - PICS: CNET.C.A0005 - verification: | - ./chip-tool networkcommissioning read last-networking-status 54 0 - - Verify LastNetworkingStatus attribute response on TH(all-clusters-app) log: - - D: 8428403 [SC]Allocated SecureSession (0x20002d28) - waiting for Sigma1 msg - I: 8428410 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:135181543 on exchar - D: 8428421 [EM]Handling via exchange: 29697r, Delegate: 0x200070ec - D: 8428427 [IM]Received Read request - D: 8428431 [DMG]IM RH moving to [GeneratingReports] - D: 8428435 [EM]Retransmitting MessageCounter:53368052 on exchange 29696r Send Cnt 1 - I: 8428443 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53368052 to 0x0000000000000000c - D: 8428459 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8428468 [DMG] Cluster 31, Attribute 5 is dirty - D: 8428473 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0005 (expanded=0) - D: 8428483 [DMG] Sending report (payload has 36 bytes)... - disabled: true - - - label: "Step 7: DUT reads LastNetworkID attribute from the TH" - PICS: CNET.C.A0006 - verification: | - ./chip-tool networkcommissioning read last-network-id 54 0 - - Verify LastNetworkID attribute response on TH(all-clusters-app) log: - - D: 8469179 [SC]Allocated SecureSession (0x20002e98) - waiting for Sigma1 msg - I: 8469187 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:91003604 on exchanr - D: 8469197 [EM]Handling via exchange: 63120r, Delegate: 0x200070ec - D: 8469203 [IM]Received Read request - D: 8469207 [DMG]IM RH moving to [GeneratingReports] - D: 8469212 [EM]Retransmitting MessageCounter:53368056 on exchange 63119r Send Cnt 1 - I: 8469219 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53368056 to 0x0000000000000000c - D: 8469233 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8469242 [DMG] Cluster 31, Attribute 6 is dirty - D: 8469248 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0006 (expanded=0) - D: 8469258 [DMG] Sending report (payload has 44 bytes)... - disabled: true - - - label: "Step 8: DUT reads LastConnectErrorValue attribute from the TH" - PICS: CNET.C.A0007 - verification: | - ./chip-tool networkcommissioning read last-connect-error-value 54 0 - - Verify LastConnectErrorValue attribute response on TH(all-clusters-app) log: - - D: 8729020 [SC]Allocated SecureSession (0x20002f50) - waiting for Sigma1 msg - I: 8729028 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:249692114 on exchar - D: 8729038 [EM]Handling via exchange: 17068r, Delegate: 0x200070ec - D: 8729044 [IM]Received Read request - D: 8729048 [DMG]IM RH moving to [GeneratingReports] - D: 8729053 [EM]Retransmitting MessageCounter:53368060 on exchange 17067r Send Cnt 1 - I: 8729060 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53368060 to 0x0000000000000000c - D: 8729074 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8729083 [DMG] Cluster 31, Attribute 7 is dirty - D: 8729089 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0007 (expanded=0) - D: 8729100 [DMG] Sending report (payload has 35 bytes)... - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml deleted file mode 100644 index fc77ec9f4b2e59..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml +++ /dev/null @@ -1,517 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 12.4.17. [TC-CNET-4.19] [Ethernet] Verification for attributes check - [DUT-Client] - -PICS: - - CNET.C.F02 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Commission TH and DUT on Ethernet setup" - verification: | - - disabled: true - - - label: "Step 1: DUT reads the MaxNetworks attribute from the TH" - PICS: CNET.C.A0000 - verification: | - ./chip-tool networkcommissioning read max-networks 1 0 --trace_decode 1 - - Verify MaxNetworks attribute response on TH(all-clusters-app) log: - - [1667208272.085200][14293:14293] CHIP:EM: Handling via exchange: 31335r, Delegate: 0xaaaaaff382d8 - [1667208272.085299][14293:14293] CHIP:IM: Received Read request - [1667208272.085469][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208272.085536][14293:14293] CHIP:DMG: { - [1667208272.085591][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208272.085656][14293:14293] CHIP:DMG: [ - [1667208272.085717][14293:14293] CHIP:DMG: AttributePathIB = - [1667208272.085795][14293:14293] CHIP:DMG: { - [1667208272.085875][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208272.085965][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208272.086053][14293:14293] CHIP:DMG: Attribute = 0x0000_0000, - [1667208272.086129][14293:14293] CHIP:DMG: } - [1667208272.086305][14293:14293] CHIP:DMG: - [1667208272.086375][14293:14293] CHIP:DMG: ], - [1667208272.086446][14293:14293] CHIP:DMG: - [1667208272.086558][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208272.086623][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208272.086683][14293:14293] CHIP:DMG: }, - [1667208272.086838][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208272.087061][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208272.087133][14293:14293] CHIP:DMG: Cluster 31, Attribute 0 is dirty - [1667208272.087187][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0000 (expanded=0) - [1667208272.087411][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208272.087490][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208272.087693][14293:14293] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667208272.088306][14293:14293] CHIP:EM: <<< [E:31335r M:207979142 (Ack:102020621)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208272.088408][14293:14293] CHIP:IN: (S) Sending msg 207979142 on secure session with LSID: 36091 - [1667208272.089216][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:51656 | 207979142 | [Interaction Model (1) / Report Data (0x05) / Session = 62189 / Exchange = 31335] - [1667208272.089312][14293:14293] CHIP:DMG: Header Flags = - [1667208272.089370][14293:14293] CHIP:DMG: { - [1667208272.089455][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208272.089511][14293:14293] CHIP:DMG: { - [1667208272.089571][14293:14293] CHIP:DMG: AckMsg = 102020621 - [1667208272.089698][14293:14293] CHIP:DMG: NeedsAck = true - [1667208272.089751][14293:14293] CHIP:DMG: } - [1667208272.089825][14293:14293] CHIP:DMG: } - [1667208272.089880][14293:14293] CHIP:DMG: - [1667208272.089947][14293:14293] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667208272.090003][14293:14293] CHIP:DMG: { - [1667208272.090058][14293:14293] CHIP:DMG: data = 00edf2008682650ca88b35a87ab9790201216607af689478e5c56dad2629043281e44b91b4ac9e365e70b2ddd2a03df4d99b2f61bdd43e79d8cd1ebac7435b1d5f00ede22d15 - [1667208272.090116][14293:14293] CHIP:DMG: buffer_ptr = 187650247915488 - [1667208272.090169][14293:14293] CHIP:DMG: } - [1667208272.090220][14293:14293] CHIP:DMG: - [1667208272.090295][14293:14293] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667208272.090351][14293:14293] CHIP:DMG: { - [1667208272.090405][14293:14293] CHIP:DMG: data = 153601153501260083a6a084370124020024033124040018240201181818290424ff0118 - [1667208272.090489][14293:14293] CHIP:DMG: } - [1667208272.090613][14293:14293] CHIP:DMG: - [1667208272.090767][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208272.090833][14293:14293] CHIP:DMG: { - [1667208272.090958][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208272.091047][14293:14293] CHIP:DMG: [ - [1667208272.091111][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208272.091200][14293:14293] CHIP:DMG: { - [1667208272.091274][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208272.091356][14293:14293] CHIP:DMG: { - [1667208272.091508][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208272.091585][14293:14293] CHIP:DMG: AttributePathIB = - [1667208272.091679][14293:14293] CHIP:DMG: { - [1667208272.091772][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208272.091871][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208272.091961][14293:14293] CHIP:DMG: Attribute = 0x0000_0000, - [1667208272.092109][14293:14293] CHIP:DMG: } - [1667208272.092212][14293:14293] CHIP:DMG: - [1667208272.092308][14293:14293] CHIP:DMG: Data = 1, - [1667208272.092394][14293:14293] CHIP:DMG: }, - [1667208272.092489][14293:14293] CHIP:DMG: - [1667208272.092558][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 2: DUT reads the Networks attribute from the TH" - PICS: CNET.C.A0001 - verification: | - ./chip-tool networkcommissioning read networks 1 0 --trace_decode 1 - - Verify Networks attribute response on TH(all-clusters-app) log: - - [1667208308.741069][14293:14293] CHIP:EM: Handling via exchange: 43353r, Delegate: 0xaaaaaff382d8 - [1667208308.741175][14293:14293] CHIP:IM: Received Read request - [1667208308.741369][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208308.741460][14293:14293] CHIP:DMG: { - [1667208308.741516][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208308.741582][14293:14293] CHIP:DMG: [ - [1667208308.741667][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.741840][14293:14293] CHIP:DMG: { - [1667208308.741921][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.742024][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.742187][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.742319][14293:14293] CHIP:DMG: } - [1667208308.742512][14293:14293] CHIP:DMG: - [1667208308.742609][14293:14293] CHIP:DMG: ], - [1667208308.742684][14293:14293] CHIP:DMG: - [1667208308.742830][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208308.742954][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208308.743093][14293:14293] CHIP:DMG: }, - [1667208308.743284][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208308.743587][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208308.743666][14293:14293] CHIP:DMG: Cluster 31, Attribute 1 is dirty - [1667208308.743746][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0001 (expanded=0) - [1667208308.743815][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208308.743892][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208308.745831][14293:14293] CHIP:DMG: Sending report (payload has 73 bytes)... - [1667208308.746713][14293:14293] CHIP:EM: <<< [E:43353r M:155711130 (Ack:201136820)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208308.746838][14293:14293] CHIP:IN: (S) Sending msg 155711130 on secure session with LSID: 36092 - [1667208308.747599][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:52150 | 155711130 | [Interaction Model (1) / Report Data (0x05) / Session = 40348 / Exchange = 43353] - [1667208308.747711][14293:14293] CHIP:DMG: Header Flags = - [1667208308.747768][14293:14293] CHIP:DMG: { - [1667208308.747856][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208308.747913][14293:14293] CHIP:DMG: { - [1667208308.747974][14293:14293] CHIP:DMG: AckMsg = 201136820 - [1667208308.748053][14293:14293] CHIP:DMG: NeedsAck = true - [1667208308.748108][14293:14293] CHIP:DMG: } - [1667208308.748180][14293:14293] CHIP:DMG: } - [1667208308.748264][14293:14293] CHIP:DMG: - [1667208308.748333][14293:14293] CHIP:DMG: Encrypted Payload (107 bytes) = - [1667208308.748389][14293:14293] CHIP:DMG: { - [1667208308.748465][14293:14293] CHIP:DMG: data = 009c9d009af64709fd692537184757531ff033e57fff8702ca85430f673c4c8802c45aefde3185456e10531518fbd5f20b65eb97c3e838cb25b721f6f888c8193a57321ca2a250076c3193de634943ed81438452b3634c9eaad965089bb493bbf863758b04303f072253e7 - [1667208308.748528][14293:14293] CHIP:DMG: buffer_ptr = 187650247918064 - [1667208308.748580][14293:14293] CHIP:DMG: } - [1667208308.748659][14293:14293] CHIP:DMG: - [1667208308.748734][14293:14293] CHIP:DMG: Decrypted Payload (73 bytes) = - [1667208308.748790][14293:14293] CHIP:DMG: { - [1667208308.748868][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240401183602181818153501260083a6a0843701240200240331240401340518350230000465746830290118181818290424ff0118 - [1667208308.748924][14293:14293] CHIP:DMG: } - [1667208308.748976][14293:14293] CHIP:DMG: - [1667208308.749223][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208308.749291][14293:14293] CHIP:DMG: { - [1667208308.749345][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208308.749440][14293:14293] CHIP:DMG: [ - [1667208308.749526][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208308.749608][14293:14293] CHIP:DMG: { - [1667208308.749695][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208308.749785][14293:14293] CHIP:DMG: { - [1667208308.749889][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208308.749979][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.750094][14293:14293] CHIP:DMG: { - [1667208308.750191][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.750316][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.750437][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.750555][14293:14293] CHIP:DMG: } - [1667208308.750682][14293:14293] CHIP:DMG: - [1667208308.750770][14293:14293] CHIP:DMG: Data = [ - [1667208308.750884][14293:14293] CHIP:DMG: - [1667208308.750982][14293:14293] CHIP:DMG: ], - [1667208308.751090][14293:14293] CHIP:DMG: }, - [1667208308.751200][14293:14293] CHIP:DMG: - [1667208308.751275][14293:14293] CHIP:DMG: }, - [1667208308.751401][14293:14293] CHIP:DMG: - [1667208308.751471][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208308.751584][14293:14293] CHIP:DMG: { - [1667208308.751666][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208308.751765][14293:14293] CHIP:DMG: { - [1667208308.751856][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208308.751962][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.752053][14293:14293] CHIP:DMG: { - [1667208308.752159][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.752264][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.752376][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.752493][14293:14293] CHIP:DMG: ListIndex = Null, - [1667208308.752596][14293:14293] CHIP:DMG: } - [1667208308.752712][14293:14293] CHIP:DMG: - [1667208308.752794][14293:14293] CHIP:DMG: Data = - [1667208308.752909][14293:14293] CHIP:DMG: { - [1667208308.752998][14293:14293] CHIP:DMG: 0x0 = [ - [1667208308.753108][14293:14293] CHIP:DMG: 0x65, 0x74, 0x68, 0x30, - [1667208308.753240][14293:14293] CHIP:DMG: ] (4 bytes) - [1667208308.753335][14293:14293] CHIP:DMG: 0x1 = true, - [1667208308.753456][14293:14293] CHIP:DMG: }, - [1667208308.753544][14293:14293] CHIP:DMG: }, - [1667208308.753658][14293:14293] CHIP:DMG: - disabled: true - - - label: "Step 3: DUT reads InterfaceEnabled attribute from the TH" - PICS: CNET.C.A0004 - verification: | - ./chip-tool networkcommissioning read interface-enabled 1 0 --trace_decode 1 - - Verify InterfaceEnabled attribute response on TH(all-clusters-app) log: - - [1667208443.008116][14293:14293] CHIP:EM: Handling via exchange: 58556r, Delegate: 0xaaaaaff382d8 - [1667208443.008243][14293:14293] CHIP:IM: Received Read request - [1667208443.008440][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208443.008508][14293:14293] CHIP:DMG: { - [1667208443.008563][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208443.008628][14293:14293] CHIP:DMG: [ - [1667208443.008713][14293:14293] CHIP:DMG: AttributePathIB = - [1667208443.008809][14293:14293] CHIP:DMG: { - [1667208443.008883][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208443.008967][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208443.009074][14293:14293] CHIP:DMG: Attribute = 0x0000_0004, - [1667208443.009158][14293:14293] CHIP:DMG: } - [1667208443.009256][14293:14293] CHIP:DMG: - [1667208443.009328][14293:14293] CHIP:DMG: ], - [1667208443.009421][14293:14293] CHIP:DMG: - [1667208443.009491][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208443.009567][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208443.009650][14293:14293] CHIP:DMG: }, - [1667208443.009833][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208443.010086][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208443.010157][14293:14293] CHIP:DMG: Cluster 31, Attribute 4 is dirty - [1667208443.010235][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0004 (expanded=0) - [1667208443.010305][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=v - [1667208443.010382][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208443.010532][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208443.011166][14293:14293] CHIP:EM: <<< [E:58556r M:187682312 (Ack:202477555)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208443.011267][14293:14293] CHIP:IN: (S) Sending msg 187682312 on secure session with LSID: 36095 - [1667208443.011979][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:55431 | 187682312 | [Interaction Model (1) / Report Data (0x05) / Session = 33043 / Exchange = 58556] - [1667208443.012078][14293:14293] CHIP:DMG: Header Flags = - [1667208443.012135][14293:14293] CHIP:DMG: { - [1667208443.012221][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208443.012277][14293:14293] CHIP:DMG: { - [1667208443.012337][14293:14293] CHIP:DMG: AckMsg = 202477555 - [1667208443.012417][14293:14293] CHIP:DMG: NeedsAck = true - [1667208443.012471][14293:14293] CHIP:DMG: } - [1667208443.012544][14293:14293] CHIP:DMG: } - [1667208443.012623][14293:14293] CHIP:DMG: - [1667208443.012689][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208443.012766][14293:14293] CHIP:DMG: { - [1667208443.012822][14293:14293] CHIP:DMG: data = 0013810008ce2f0b6a8e60eea7fcefa14510f7d1d921eac543f9f7fa8e2a5a6c200fe67232673f9d798999b6784b99d7eb3c84e98ff73a9cc013cd53663d1fd14135e4f579 - [1667208443.012880][14293:14293] CHIP:DMG: buffer_ptr = 187650247916304 - [1667208443.013136][14293:14293] CHIP:DMG: } - [1667208443.013195][14293:14293] CHIP:DMG: - [1667208443.013272][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208443.013353][14293:14293] CHIP:DMG: { - [1667208443.013410][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240404182902181818290424ff0118 - [1667208443.013465][14293:14293] CHIP:DMG: } - [1667208443.013517][14293:14293] CHIP:DMG: - [1667208443.013685][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208443.013773][14293:14293] CHIP:DMG: { - [1667208443.013828][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208443.013928][14293:14293] CHIP:DMG: [ - [1667208443.013993][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208443.014103][14293:14293] CHIP:DMG: { - [1667208443.014188][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208443.014297][14293:14293] CHIP:DMG: { - [1667208443.014391][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208443.014520][14293:14293] CHIP:DMG: AttributePathIB = - [1667208443.014612][14293:14293] CHIP:DMG: { - [1667208443.014723][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208443.014814][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208443.014930][14293:14293] CHIP:DMG: Attribute = 0x0000_0004, - [1667208443.015015][14293:14293] CHIP:DMG: } - [1667208443.015134][14293:14293] CHIP:DMG: - [1667208443.015245][14293:14293] CHIP:DMG: Data = true, - [1667208443.015327][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 4: DUT reads LastNetworkingStatus attribute from the TH" - PICS: CNET.C.A0005 - verification: | - ./chip-tool networkcommissioning read last-networking-status 1 0 --trace_decode 1 - - Verify LastNetworkingStatus attribute response on TH(all-clusters-app) log: - - [1667208469.154755][14293:14293] CHIP:EM: Handling via exchange: 45977r, Delegate: 0xaaaaaff382d8 - [1667208469.154875][14293:14293] CHIP:IM: Received Read request - [1667208469.155241][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208469.155315][14293:14293] CHIP:DMG: { - [1667208469.155395][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208469.155461][14293:14293] CHIP:DMG: [ - [1667208469.155514][14293:14293] CHIP:DMG: AttributePathIB = - [1667208469.155586][14293:14293] CHIP:DMG: { - [1667208469.155664][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208469.155777][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208469.155868][14293:14293] CHIP:DMG: Attribute = 0x0000_0005, - [1667208469.155968][14293:14293] CHIP:DMG: } - [1667208469.156047][14293:14293] CHIP:DMG: - [1667208469.156136][14293:14293] CHIP:DMG: ], - [1667208469.156210][14293:14293] CHIP:DMG: - [1667208469.156277][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208469.156361][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208469.156422][14293:14293] CHIP:DMG: }, - [1667208469.156602][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208469.156848][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208469.156943][14293:14293] CHIP:DMG: Cluster 31, Attribute 5 is dirty - [1667208469.156998][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0005 (expanded=0) - [1667208469.157065][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208469.157164][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208469.157295][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208469.157908][14293:14293] CHIP:EM: <<< [E:45977r M:124480128 (Ack:41106952)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208469.158007][14293:14293] CHIP:IN: (S) Sending msg 124480128 on secure session with LSID: 36096 - [1667208469.158760][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:42766 | 124480128 | [Interaction Model (1) / Report Data (0x05) / Session = 62096 / Exchange = 45977] - [1667208469.158858][14293:14293] CHIP:DMG: Header Flags = - [1667208469.158915][14293:14293] CHIP:DMG: { - [1667208469.158999][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208469.159055][14293:14293] CHIP:DMG: { - [1667208469.159113][14293:14293] CHIP:DMG: AckMsg = 41106952 - [1667208469.159200][14293:14293] CHIP:DMG: NeedsAck = true - [1667208469.159254][14293:14293] CHIP:DMG: } - [1667208469.159327][14293:14293] CHIP:DMG: } - [1667208469.159406][14293:14293] CHIP:DMG: - [1667208469.159475][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208469.159531][14293:14293] CHIP:DMG: { - [1667208469.159609][14293:14293] CHIP:DMG: data = 0090f200806a6b07d642bf93d4c8b77a7c81b3f962ba8e786850a3096e2e6ec88d07c84d2be0da74164ac245461957f335581afcfccced791c8558dc20ac7837f4c3e563ac - [1667208469.159668][14293:14293] CHIP:DMG: buffer_ptr = 187650247921216 - [1667208469.159721][14293:14293] CHIP:DMG: } - [1667208469.159796][14293:14293] CHIP:DMG: - [1667208469.159872][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208469.159951][14293:14293] CHIP:DMG: { - [1667208469.160007][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240405183402181818290424ff0118 - [1667208469.160063][14293:14293] CHIP:DMG: } - [1667208469.160136][14293:14293] CHIP:DMG: - [1667208469.160282][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208469.160369][14293:14293] CHIP:DMG: { - [1667208469.160423][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208469.160528][14293:14293] CHIP:DMG: [ - [1667208469.160593][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208469.160702][14293:14293] CHIP:DMG: { - [1667208469.160785][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208469.160900][14293:14293] CHIP:DMG: { - [1667208469.160994][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208469.161104][14293:14293] CHIP:DMG: AttributePathIB = - [1667208469.161196][14293:14293] CHIP:DMG: { - [1667208469.161310][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208469.161424][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208469.161517][14293:14293] CHIP:DMG: Attribute = 0x0000_0005, - [1667208469.161634][14293:14293] CHIP:DMG: } - [1667208469.161732][14293:14293] CHIP:DMG: - [1667208469.161834][14293:14293] CHIP:DMG: Data = NULL - [1667208469.161919][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 5: DUT reads LastNetworkID attribute from the TH" - PICS: CNET.C.A0006 - verification: | - ./chip-tool networkcommissioning read last-network-id 1 0 --trace_decode 1 - - Verify LastNetworkID attribute response from TH(all-clusters-app) log: - - [1667208560.669590][14293:14293] CHIP:EM: Handling via exchange: 8923r, Delegate: 0xaaaaaff382d8 - [1667208560.669685][14293:14293] CHIP:IM: Received Read request - [1667208560.669852][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208560.669918][14293:14293] CHIP:DMG: { - [1667208560.669971][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208560.670037][14293:14293] CHIP:DMG: [ - [1667208560.670098][14293:14293] CHIP:DMG: AttributePathIB = - [1667208560.670181][14293:14293] CHIP:DMG: { - [1667208560.670254][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208560.670337][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208560.670411][14293:14293] CHIP:DMG: Attribute = 0x0000_0006, - [1667208560.670531][14293:14293] CHIP:DMG: } - [1667208560.670600][14293:14293] CHIP:DMG: - [1667208560.670656][14293:14293] CHIP:DMG: ], - [1667208560.670717][14293:14293] CHIP:DMG: - [1667208560.670813][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208560.670879][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208560.670938][14293:14293] CHIP:DMG: }, - [1667208560.671124][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208560.671497][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208560.671571][14293:14293] CHIP:DMG: Cluster 31, Attribute 6 is dirty - [1667208560.671652][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0006 (expanded=0) - [1667208560.671721][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208560.671798][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208560.671909][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208560.672533][14293:14293] CHIP:EM: <<< [E:8923r M:15654191 (Ack:76394150)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208560.672634][14293:14293] CHIP:IN: (S) Sending msg 15654191 on secure session with LSID: 36097 - [1667208560.673339][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58362 | 15654191 | [Interaction Model (1) / Report Data (0x05) / Session = 25183 / Exchange = 8923] - [1667208560.673436][14293:14293] CHIP:DMG: Header Flags = - [1667208560.673492][14293:14293] CHIP:DMG: { - [1667208560.673577][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208560.673633][14293:14293] CHIP:DMG: { - [1667208560.673692][14293:14293] CHIP:DMG: AckMsg = 76394150 - [1667208560.673772][14293:14293] CHIP:DMG: NeedsAck = true - [1667208560.673827][14293:14293] CHIP:DMG: } - [1667208560.673899][14293:14293] CHIP:DMG: } - [1667208560.673977][14293:14293] CHIP:DMG: - [1667208560.674046][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208560.674101][14293:14293] CHIP:DMG: { - [1667208560.674178][14293:14293] CHIP:DMG: data = 005f62002fddee00d80c8412f88ff071d10fe8c05870e885a47452243d3e90e359d9d7a0e44c456808561806f24b7814babb12c7762f1633bf6489e9baabe9ae6fd8c49efb - [1667208560.674237][14293:14293] CHIP:DMG: buffer_ptr = 187650247916272 - [1667208560.674290][14293:14293] CHIP:DMG: } - [1667208560.674369][14293:14293] CHIP:DMG: - [1667208560.674445][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208560.674546][14293:14293] CHIP:DMG: { - [1667208560.674622][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240406183402181818290424ff0118 - [1667208560.674679][14293:14293] CHIP:DMG: } - [1667208560.674730][14293:14293] CHIP:DMG: - [1667208560.674900][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208560.674967][14293:14293] CHIP:DMG: { - [1667208560.675021][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208560.675129][14293:14293] CHIP:DMG: [ - [1667208560.675193][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208560.675302][14293:14293] CHIP:DMG: { - [1667208560.675383][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208560.675488][14293:14293] CHIP:DMG: { - [1667208560.675595][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208560.675681][14293:14293] CHIP:DMG: AttributePathIB = - [1667208560.675788][14293:14293] CHIP:DMG: { - [1667208560.675884][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208560.676000][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208560.676102][14293:14293] CHIP:DMG: Attribute = 0x0000_0006, - [1667208560.676211][14293:14293] CHIP:DMG: } - [1667208560.676303][14293:14293] CHIP:DMG: - [1667208560.676413][14293:14293] CHIP:DMG: Data = NULL - [1667208560.676494][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 6: DUT reads LastConnectErrorValue attribute from the TH" - PICS: CNET.C.A0007 - verification: | - ./chip-tool networkcommissioning read last-connect-error-value 1 0 --trace_decode 1 - - Verify LastConnectErrorValue attribute response from on TH(all-clusters-app) log: - - [1667208660.521154][14293:14293] CHIP:EM: Handling via exchange: 50685r, Delegate: 0xaaaaaff382d8 - [1667208660.521272][14293:14293] CHIP:IM: Received Read request - [1667208660.521464][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208660.521530][14293:14293] CHIP:DMG: { - [1667208660.521585][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208660.521649][14293:14293] CHIP:DMG: [ - [1667208660.521732][14293:14293] CHIP:DMG: AttributePathIB = - [1667208660.521810][14293:14293] CHIP:DMG: { - [1667208660.521889][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208660.522001][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208660.522112][14293:14293] CHIP:DMG: Attribute = 0x0000_0007, - [1667208660.522195][14293:14293] CHIP:DMG: } - [1667208660.522294][14293:14293] CHIP:DMG: - [1667208660.522366][14293:14293] CHIP:DMG: ], - [1667208660.522437][14293:14293] CHIP:DMG: - [1667208660.522624][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208660.522716][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208660.522777][14293:14293] CHIP:DMG: }, - [1667208660.522959][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208660.523199][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208660.523295][14293:14293] CHIP:DMG: Cluster 31, Attribute 7 is dirty - [1667208660.523354][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0007 (expanded=0) - [1667208660.523415][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208660.523490][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208660.523597][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208660.524201][14293:14293] CHIP:EM: <<< [E:50685r M:187408347 (Ack:256041164)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208660.524304][14293:14293] CHIP:IN: (S) Sending msg 187408347 on secure session with LSID: 36098 - [1667208660.525002][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:41724 | 187408347 | [Interaction Model (1) / Report Data (0x05) / Session = 11768 / Exchange = 50685] - [1667208660.525101][14293:14293] CHIP:DMG: Header Flags = - [1667208660.525159][14293:14293] CHIP:DMG: { - [1667208660.525244][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208660.525300][14293:14293] CHIP:DMG: { - [1667208660.525358][14293:14293] CHIP:DMG: AckMsg = 256041164 - [1667208660.525438][14293:14293] CHIP:DMG: NeedsAck = true - [1667208660.525493][14293:14293] CHIP:DMG: } - [1667208660.525567][14293:14293] CHIP:DMG: } - [1667208660.525646][14293:14293] CHIP:DMG: - [1667208660.525716][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208660.525771][14293:14293] CHIP:DMG: { - [1667208660.525851][14293:14293] CHIP:DMG: data = 00f82d00db9f2b0bfc92cc46b01644793468172d04b473e3be4af5b2ac225fbab6a8196d30b3b489100a7c4a3acb5939adce0594f1b13bb12e488a8a8d655958887b4f367c - [1667208660.525910][14293:14293] CHIP:DMG: buffer_ptr = 187650247916496 - [1667208660.525963][14293:14293] CHIP:DMG: } - [1667208660.526038][14293:14293] CHIP:DMG: - [1667208660.526115][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208660.526171][14293:14293] CHIP:DMG: { - [1667208660.526249][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240407183402181818290424ff0118 - [1667208660.526305][14293:14293] CHIP:DMG: } - [1667208660.526357][14293:14293] CHIP:DMG: - [1667208660.526570][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208660.526666][14293:14293] CHIP:DMG: { - [1667208660.526721][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208660.526820][14293:14293] CHIP:DMG: [ - [1667208660.526885][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208660.526972][14293:14293] CHIP:DMG: { - [1667208660.527061][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208660.527142][14293:14293] CHIP:DMG: { - [1667208660.527245][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208660.527329][14293:14293] CHIP:DMG: AttributePathIB = - [1667208660.527432][14293:14293] CHIP:DMG: { - [1667208660.527527][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208660.527633][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208660.527733][14293:14293] CHIP:DMG: Attribute = 0x0000_0007, - [1667208660.527840][14293:14293] CHIP:DMG: } - [1667208660.527951][14293:14293] CHIP:DMG: - [1667208660.528048][14293:14293] CHIP:DMG: Data = NULL - [1667208660.528152][14293:14293] CHIP:DMG: }, - [1667208660.528240][14293:14293] CHIP:DMG: - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml index ce0b858b614348..8a4565b3f310dd 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml @@ -302,9 +302,9 @@ tests: "Step 11: TH sends ArmFailSafe command to the DUT with ExpiryLengthSeconds set to 900" verification: | - ./chip-tool generalcommissioning arm-fail-safe 90 1 1 0 + ./chip-tool generalcommissioning arm-fail-safe 900 1 1 0 - Via the TH (chip-tool), Verify the DUT sends ArmFailSafe with timeout as 90 secs to the TH. + Via the TH (chip-tool), Verify the DUT sends ArmFailSafe with timeout as 900 secs to the TH. [1657288428.409103][2382:2388] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1657288428.409191][2382:2388] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml index 34d6396a670121..a82b0a37f5682a 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml @@ -38,9 +38,9 @@ tests: - Printed using a minimum font size of 6 points, typically producing a typeface height of 2.1 mm (6/72 inches) - - Include dashes between the groups of Manual Pairing Code digits (e.g. "MATTER 1234-5678-901") + - Include dashes between the groups of Manual Pairing Code digits with the following spacing: - - If the code is presented in audio format it SHOULD be read in groups of 4 digits, with the last group being only 3 or 1 digits depending on overall size. + - For 11 or 21-digit codes, the first row spacing is 4-3-4 (First Row: "1234-567-8901") - - If a Matter logo cannot be printed alongside the code then the code SHOULD be prefixed with MATTER (e.g. "MATTER 1234-5678-901") + - For 21-digit codes, the second row spacing is 4-3-2-1 (Second Row:"9876-543-21-0") disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml index 3923c8291cf4d8..2e469df84d7d10 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml @@ -33,7 +33,6 @@ tests: value: nodeId - label: "Step 2: Read the global attribute: ClusterRevision" - PICS: DESC.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -42,7 +41,6 @@ tests: type: int16u - label: "Step 3: Read the global attribute: FeatureMap" - PICS: DESC.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -51,7 +49,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && DESC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -61,7 +59,7 @@ tests: #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && DESC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -100,7 +98,7 @@ tests: [1676280023.477370][3892:3894] CHIP:TOO: [10]: 65533 cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DESC.S.Afffb + PICS: PICS_USER_PROMPT arguments: values: - name: "message" @@ -125,7 +123,7 @@ tests: [1676366852.531334][9747:9749] CHIP:TOO: EventList: 0 entries cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DESC.S.Afffa + PICS: PICS_USER_PROMPT arguments: values: - name: "message" @@ -152,7 +150,7 @@ tests: [1649425400.031430][3493:3498] CHIP:TOO: AcceptedCommandList: 0 entries cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DESC.S.Afff9 + PICS: PICS_USER_PROMPT arguments: values: - name: "message" @@ -179,7 +177,7 @@ tests: [1649425614.162088][3509:3514] CHIP:TOO: GeneratedCommandList: 0 entries cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DESC.S.Afff8 + PICS: PICS_USER_PROMPT arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml index 3e725d334c4b05..04ffc88831b5d4 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml @@ -244,14 +244,7 @@ tests: disabled: true - label: "Step 5: TH reads from the DUT the 'TagList' attribute." + PICS: DESC.S.A0004 verification: | - Chip-tool has to implement the Taglist attribute - disabled: true - - - label: - "Step 6: The cluster tests applicable to each Device Type should be - executed to make sure all mandatory (and applicable optional) - attributes/commands are implemented." - verification: | - This step is redundant as during certification the appropriate tests are being run + SDK has to implement the Taglist attribute disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_2_Simulated.yaml deleted file mode 100644 index 6a5cc7c919395e..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_2_Simulated.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 84.2.2. [TC-DESC-2.2] Descriptor Cluster Attributes [DUT-Client] - -PICS: - - DESC.C - -config: - nodeId: 0x12344321 - cluster: "Descriptor" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads DeviceTypeList from TH." - PICS: DESC.C.A0000 - wait: "readAttribute" - attribute: "DeviceTypeList" - - - label: "DUT reads ServerList from the TH" - PICS: DESC.C.A0001 - wait: "readAttribute" - attribute: "ServerList" - - - label: "DUT reads ClientList attribute from the TH" - PICS: DESC.C.A0002 - wait: "readAttribute" - attribute: "ClientList" - - - label: "DUT reads PartsList attribute from the TH" - PICS: DESC.C.A0003 - wait: "readAttribute" - attribute: "PartsList" - - - label: "DUT reads TagList from the TH" - PICS: PICS_USER_PROMPT - verification: | - Chip-tool has to implement the Taglist attribute - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_3_1_Simulated.yaml deleted file mode 100644 index d9d5df4e8e4c31..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGETH_3_1_Simulated.yaml +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 47.3.1. [TC-DGETH-3.1] Attributes [DUT as Client] - -PICS: - - DGETH.C - -config: - nodeId: 0x12344321 - cluster: "Ethernet Network Diagnostics" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: PHYRate" - PICS: DGETH.C.A0000 - wait: "readAttribute" - attribute: "PHYRate" - - - label: "Read attribute: FullDuplex" - PICS: DGETH.C.A0001 - wait: "readAttribute" - attribute: "FullDuplex" - - - label: "Read attribute: PacketRxCount" - PICS: DGETH.C.A0002 - wait: "readAttribute" - attribute: "PacketRxCount" - - - label: "Read attribute: PacketTxCount" - PICS: DGETH.C.A0003 - wait: "readAttribute" - attribute: "PacketTxCount" - - - label: "Read attribute: TxErrCount" - PICS: DGETH.C.A0004 - wait: "readAttribute" - attribute: "TxErrCount" - - - label: "Read attribute: CollisionCount" - PICS: DGETH.C.A0005 - wait: "readAttribute" - attribute: "CollisionCount" - - - label: "Read attribute: OverrunCount" - PICS: DGETH.C.A0006 - wait: "readAttribute" - attribute: "OverrunCount" - - - label: "Read attribute: CarrierDetect" - PICS: DGETH.C.A0007 - wait: "readAttribute" - attribute: "CarrierDetect" - - - label: "Read attribute: TimeSinceReset" - PICS: DGETH.C.A0008 - wait: "readAttribute" - attribute: "TimeSinceReset" diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_3_1.yaml deleted file mode 100644 index 4d9de778ecbee0..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_3_1.yaml +++ /dev/null @@ -1,864 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 88.3.1. [TC-DGGEN-3.1] Attributes [DUT as Client] - -PICS: - - DGGEN.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Step 1: Commission TH to DUT" - verification: | - execute the below mentioned command to put TH into a commissionable state in RPI platform, Pls use equivalent command on the respective platform - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt --trace_decode 1 - - - - Once TH reach the commissionable state pls send below mentioned command on DUT in RPI platform. Pls use equivalent command on the respective platform - ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 - Verify the commissioning completed with success on TH(chip-tool) from DUT - [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success - disabled: true - - - label: "Step 2: DUT reads NetworkInterfaces structure attribute from TH." - PICS: DGGEN.C.A0000 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool generaldiagnostics read network-interfaces 1 0 - - On TH(all-clusters-app), Verify that The NetworkInterfaces attribute SHALL be a list of NetworkInterface structs, i.e The read data type( NetworkInterface struct) must match the value listed below - • Name(interface name) - • IsOperational (indicates the node is operational in the fabric) - • OffPremiseServicesReachableIPv4(Ability to reach off-premise services it uses by utilizing IPv4, if not NULL) - • OffPremiseServicesReachableIPv6(Ability to reach off-premise services it uses by utilizing IPv6, if not NULL) - • HardwareAddress(MAC-layer address for a 802.3 or IEEE 802.11-2020 network interface, or 802.15.4) - • IPv4Addresses and IPv6Addresses (a list of the unicast IPv6 addresses that are GUA and ULA) - • Type(Interface types). - - Below is the example log which is observed in the RPI platform : - - 06e45f010f19ff36051004c0a800641836061010fe80000000000000e65f01fffe0f19ff1824070218152c00026c6f290134023403300406000000000000360510047f000001183606101000000000000000000000000000000001182407001818181818290424ff0118 - [1686306559.824697][57013:57013] CHIP:DMG: } - [1686306559.824743][57013:57013] CHIP:DMG: - [1686306559.825340][57013:57013] CHIP:DMG: ReportDataMessage = - [1686306559.825522][57013:57013] CHIP:DMG: { - [1686306559.825576][57013:57013] CHIP:DMG: AttributeReportIBs = - [1686306559.825825][57013:57013] CHIP:DMG: [ - [1686306559.825887][57013:57013] CHIP:DMG: AttributeReportIB = - [1686306559.826121][57013:57013] CHIP:DMG: { - [1686306559.826183][57013:57013] CHIP:DMG: AttributeDataIB = - [1686306559.826249][57013:57013] CHIP:DMG: { - [1686306559.826324][57013:57013] CHIP:DMG: DataVersion = 0x280892f3, - [1686306559.826397][57013:57013] CHIP:DMG: AttributePathIB = - [1686306559.826472][57013:57013] CHIP:DMG: { - [1686306559.826549][57013:57013] CHIP:DMG: Endpoint = 0x0, - [1686306559.826631][57013:57013] CHIP:DMG: Cluster = 0x33, - [1686306559.826711][57013:57013] CHIP:DMG: Attribute = 0x0000_0000, - [1686306559.826788][57013:57013] CHIP:DMG: } - [1686306559.826867][57013:57013] CHIP:DMG: - [1686306559.826943][57013:57013] CHIP:DMG: Data = [ - [1686306559.827019][57013:57013] CHIP:DMG: - [1686306559.827100][57013:57013] CHIP:DMG: { - [1686306559.827190][57013:57013] CHIP:DMG: 0x0 = "veth272794b" (11 chars), - [1686306559.827279][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.827366][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.827452][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.827537][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.827623][57013:57013] CHIP:DMG: 0xa2, 0x2a, 0xce, 0x32, 0x00, 0x85, - [1686306559.827721][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.827804][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.827885][57013:57013] CHIP:DMG: - [1686306559.827973][57013:57013] CHIP:DMG: ], - [1686306559.828056][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.828141][57013:57013] CHIP:DMG: [ - [1686306559.828258][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x2a, 0xce, 0xff, 0xfe, 0x32, 0x00, 0x85, - [1686306559.828360][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.828451][57013:57013] CHIP:DMG: ], - [1686306559.828537][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.828622][57013:57013] CHIP:DMG: }, - [1686306559.828702][57013:57013] CHIP:DMG: { - [1686306559.828786][57013:57013] CHIP:DMG: 0x0 = "vethcfd3c36" (11 chars), - [1686306559.828875][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.828960][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.829041][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.829124][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.829209][57013:57013] CHIP:DMG: 0x2a, 0x59, 0xb8, 0x51, 0x27, 0xa9, - [1686306559.829303][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.829386][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.829467][57013:57013] CHIP:DMG: - [1686306559.829559][57013:57013] CHIP:DMG: ], - [1686306559.829642][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.829747][57013:57013] CHIP:DMG: [ - [1686306559.829856][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x59, 0xb8, 0xff, 0xfe, 0x51, 0x27, 0xa9, - [1686306559.829959][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.830047][57013:57013] CHIP:DMG: ], - [1686306559.830133][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.830217][57013:57013] CHIP:DMG: }, - [1686306559.830297][57013:57013] CHIP:DMG: { - [1686306559.830380][57013:57013] CHIP:DMG: 0x0 = "veth1237750" (11 chars), - [1686306559.830467][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.830554][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.830641][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.830724][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.830809][57013:57013] CHIP:DMG: 0x22, 0x0b, 0x8c, 0xe3, 0x7a, 0x60, - [1686306559.830902][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.830984][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.831066][57013:57013] CHIP:DMG: - [1686306559.831154][57013:57013] CHIP:DMG: ], - [1686306559.831236][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.831320][57013:57013] CHIP:DMG: [ - [1686306559.831430][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0b, 0x8c, 0xff, 0xfe, 0xe3, 0x7a, 0x60, - [1686306559.831532][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.831615][57013:57013] CHIP:DMG: ], - [1686306559.831701][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.831785][57013:57013] CHIP:DMG: }, - [1686306559.831865][57013:57013] CHIP:DMG: { - [1686306559.831949][57013:57013] CHIP:DMG: 0x0 = "veth9ebd7bf" (11 chars), - [1686306559.832037][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.832122][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.832208][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.832292][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.832378][57013:57013] CHIP:DMG: 0x26, 0xa7, 0x64, 0xaf, 0x5f, 0xfb, - [1686306559.832479][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.832562][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.832644][57013:57013] CHIP:DMG: - [1686306559.832733][57013:57013] CHIP:DMG: ], - [1686306559.832816][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.832900][57013:57013] CHIP:DMG: [ - [1686306559.833008][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0xa7, 0x64, 0xff, 0xfe, 0xaf, 0x5f, 0xfb, - [1686306559.833109][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.833198][57013:57013] CHIP:DMG: ], - [1686306559.833284][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.833367][57013:57013] CHIP:DMG: }, - [1686306559.833463][57013:57013] CHIP:DMG: { - [1686306559.833577][57013:57013] CHIP:DMG: 0x0 = "veth82c835f" (11 chars), - [1686306559.833673][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.834130][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.834229][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.834315][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.834399][57013:57013] CHIP:DMG: 0xf6, 0x3b, 0x4e, 0x45, 0xb5, 0xea, - [1686306559.834498][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.834583][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.834879][57013:57013] CHIP:DMG: - [1686306559.834980][57013:57013] CHIP:DMG: ], - [1686306559.835064][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.835148][57013:57013] CHIP:DMG: [ - [1686306559.835256][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x3b, 0x4e, 0xff, 0xfe, 0x45, 0xb5, 0xea, - [1686306559.835540][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.835638][57013:57013] CHIP:DMG: ], - [1686306559.835726][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.835813][57013:57013] CHIP:DMG: }, - [1686306559.835894][57013:57013] CHIP:DMG: { - [1686306559.835980][57013:57013] CHIP:DMG: 0x0 = "docker0" (7 chars), - [1686306559.836068][57013:57013] CHIP:DMG: 0x1 = false, - [1686306559.836154][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.836240][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.836323][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.836410][57013:57013] CHIP:DMG: 0x02, 0x42, 0x83, 0xd0, 0x85, 0xc7, - [1686306559.836515][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.836598][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.836683][57013:57013] CHIP:DMG: [ - [1686306559.836780][57013:57013] CHIP:DMG: 0xac, 0x11, 0x00, 0x01, - [1686306559.836880][57013:57013] CHIP:DMG: ] (4 bytes) - [1686306559.836974][57013:57013] CHIP:DMG: ], - [1686306559.837057][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.837141][57013:57013] CHIP:DMG: [ - [1686306559.837243][57013:57013] CHIP:DMG: - [1686306559.837348][57013:57013] CHIP:DMG: ] (0 bytes) - [1686306559.837438][57013:57013] CHIP:DMG: ], - [1686306559.837523][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.837609][57013:57013] CHIP:DMG: }, - [1686306559.837727][57013:57013] CHIP:DMG: { - [1686306559.837818][57013:57013] CHIP:DMG: 0x0 = "br-78aec9e78929" (15 chars), - [1686306559.837908][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.837994][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.838080][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.838164][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.838250][57013:57013] CHIP:DMG: 0x02, 0x42, 0xfc, 0xcb, 0x3f, 0xc9, - [1686306559.838339][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.838422][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.838508][57013:57013] CHIP:DMG: [ - [1686306559.838605][57013:57013] CHIP:DMG: 0xac, 0x13, 0x00, 0x01, - [1686306559.838699][57013:57013] CHIP:DMG: ] (4 bytes) - [1686306559.838794][57013:57013] CHIP:DMG: ], - [1686306559.838871][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.838956][57013:57013] CHIP:DMG: [ - [1686306559.839055][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xfc, 0xff, 0xfe, 0xcb, 0x3f, 0xc9, - [1686306559.839159][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.839254][57013:57013] CHIP:DMG: ], - [1686306559.839342][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.839426][57013:57013] CHIP:DMG: }, - [1686306559.839507][57013:57013] CHIP:DMG: { - [1686306559.839591][57013:57013] CHIP:DMG: 0x0 = "br-33eb65c97608" (15 chars), - [1686306559.839678][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.839759][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.839845][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.839923][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.840007][57013:57013] CHIP:DMG: 0x02, 0x42, 0x25, 0x3e, 0x90, 0xfe, - [1686306559.840097][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.840179][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.840263][57013:57013] CHIP:DMG: [ - [1686306559.840361][57013:57013] CHIP:DMG: 0xac, 0x12, 0x00, 0x01, - [1686306559.840455][57013:57013] CHIP:DMG: ] (4 bytes) - [1686306559.840546][57013:57013] CHIP:DMG: ], - [1686306559.840628][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.840713][57013:57013] CHIP:DMG: [ - [1686306559.840817][57013:57013] CHIP:DMG: 0xfd, 0x00, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - [1686306559.840922][57013:57013] CHIP:DMG: ] (16 bytes)[ - [1686306559.841023][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x25, 0xff, 0xfe, 0x3e, 0x90, 0xfe, - [1686306559.841126][57013:57013] CHIP:DMG: ] (16 bytes)[ - [1686306559.841234][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - [1686306559.841337][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.841432][57013:57013] CHIP:DMG: ], - [1686306559.841519][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.841604][57013:57013] CHIP:DMG: }, - [1686306559.841684][57013:57013] CHIP:DMG: { - [1686306559.841811][57013:57013] CHIP:DMG: 0x0 = "wlan0" (5 chars), - [1686306559.841900][57013:57013] CHIP:DMG: 0x1 = false, - [1686306559.841985][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.842072][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.842155][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.842241][57013:57013] CHIP:DMG: 0xe4, 0x5f, 0x01, 0x0f, 0x1a, 0x01, - [1686306559.842327][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.842408][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.842490][57013:57013] CHIP:DMG: - [1686306559.842579][57013:57013] CHIP:DMG: ], - [1686306559.842662][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.842743][57013:57013] CHIP:DMG: - [1686306559.842834][57013:57013] CHIP:DMG: ], - [1686306559.842922][57013:57013] CHIP:DMG: 0x7 = 1, - [1686306559.843006][57013:57013] CHIP:DMG: }, - [1686306559.843088][57013:57013] CHIP:DMG: { - [1686306559.843171][57013:57013] CHIP:DMG: 0x0 = "eth0" (4 chars), - [1686306559.843259][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.843346][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.843431][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.843516][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.843602][57013:57013] CHIP:DMG: 0xe4, 0x5f, 0x01, 0x0f, 0x19, 0xff, - [1686306559.843698][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.843775][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.843860][57013:57013] CHIP:DMG: [ - [1686306559.843950][57013:57013] CHIP:DMG: 0xc0, 0xa8, 0x00, 0x64, - [1686306559.844050][57013:57013] CHIP:DMG: ] (4 bytes) - [1686306559.844133][57013:57013] CHIP:DMG: ], - [1686306559.844215][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.844299][57013:57013] CHIP:DMG: [ - [1686306559.844407][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x5f, 0x01, 0xff, 0xfe, 0x0f, 0x19, 0xff, - [1686306559.844513][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.844603][57013:57013] CHIP:DMG: ], - [1686306559.844690][57013:57013] CHIP:DMG: 0x7 = 2, - [1686306559.844774][57013:57013] CHIP:DMG: }, - [1686306559.844854][57013:57013] CHIP:DMG: { - [1686306559.844938][57013:57013] CHIP:DMG: 0x0 = "lo" (2 chars), - [1686306559.845025][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.845112][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.845197][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.845281][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.845367][57013:57013] CHIP:DMG: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - [1686306559.845463][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.845546][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.845632][57013:57013] CHIP:DMG: [ - [1686306559.845753][57013:57013] CHIP:DMG: 0x7f, 0x00, 0x00, 0x01, - [1686306559.845856][57013:57013] CHIP:DMG: ] (4 bytes) - [1686306559.845948][57013:57013] CHIP:DMG: ], - [1686306559.846031][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.846116][57013:57013] CHIP:DMG: [ - [1686306559.846226][57013:57013] CHIP:DMG: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - [1686306559.846331][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.846419][57013:57013] CHIP:DMG: ], - [1686306559.846504][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.846587][57013:57013] CHIP:DMG: }, - [1686306559.846667][57013:57013] CHIP:DMG: ], - [1686306559.846737][57013:57013] CHIP:DMG: }, - [1686306559.846960][57013:57013] CHIP:DMG: - [1686306559.847020][57013:57013] CHIP:DMG: }, - [1686306559.847234][57013:57013] CHIP:DMG: - [1686306559.847290][57013:57013] CHIP:DMG: ], - [1686306559.847502][57013:57013] CHIP:DMG: - [1686306559.847560][57013:57013] CHIP:DMG: SuppressResponse = true, - [1686306559.847619][57013:57013] CHIP:DMG: InteractionModelRevision = 1 - [1686306559.847674][57013:57013] CHIP:DMG: } - [1686306559.847727][57013:57013] CHIP:DMG: - [1686306559.848154][57013:57013] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686306559.848223][57013:57013] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - disabled: true - - - label: - "Step 3: DUT reads a RebootCount attribute value from TH. Then a TH - (node) gets rebooted more than 2 times." - PICS: DGGEN.C.A0001 - verification: | - ./chip-tool generaldiagnostics read reboot-count 1 0 - On TH(all-clusters-app), Verify that RebootCount attribute data type must be UINT16 - Below is the example log which is observed in the RPI platform : - - [1686307500.023849][57061:57061] CHIP:DMG: - [1686307500.023993][57061:57061] CHIP:DMG: ReportDataMessage = - [1686307500.024054][57061:57061] CHIP:DMG: { - [1686307500.024103][57061:57061] CHIP:DMG: AttributeReportIBs = - [1686307500.024175][57061:57061] CHIP:DMG: [ - [1686307500.024233][57061:57061] CHIP:DMG: AttributeReportIB = - [1686307500.024308][57061:57061] CHIP:DMG: { - [1686307500.024370][57061:57061] CHIP:DMG: AttributeDataIB = - [1686307500.024440][57061:57061] CHIP:DMG: { - [1686307500.024513][57061:57061] CHIP:DMG: DataVersion = 0x73550a54, - [1686307500.024586][57061:57061] CHIP:DMG: AttributePathIB = - [1686307500.024661][57061:57061] CHIP:DMG: { - [1686307500.024737][57061:57061] CHIP:DMG: Endpoint = 0x0, - [1686307500.024819][57061:57061] CHIP:DMG: Cluster = 0x33, - [1686307500.024899][57061:57061] CHIP:DMG: Attribute = 0x0000_0001, - [1686307500.024974][57061:57061] CHIP:DMG: } - [1686307500.025050][57061:57061] CHIP:DMG: - [1686307500.025129][57061:57061] CHIP:DMG: Data = 1, - [1686307500.025200][57061:57061] CHIP:DMG: }, - [1686307500.025279][57061:57061] CHIP:DMG: - [1686307500.025340][57061:57061] CHIP:DMG: }, - [1686307500.025411][57061:57061] CHIP:DMG: - [1686307500.025467][57061:57061] CHIP:DMG: ], - [1686307500.025539][57061:57061] CHIP:DMG: - [1686307500.025598][57061:57061] CHIP:DMG: SuppressResponse = true, - [1686307500.025658][57061:57061] CHIP:DMG: InteractionModelRevision = 1 - [1686307500.025745][57061:57061] CHIP:DMG: } - [1686307500.025800][57061:57061] CHIP:DMG: - [1686307500.026135][57061:57061] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307500.026203][57061:57061] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686307500.026252][57061:57061] CHIP:DMG: IM RH moving to [AwaitingDestruction] - [1686307500.026313][57061:57061] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet - - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - To reboot the TH(all-clusters-app) more than 2 times please follow the mentioned procedure and it's Only applicable on raspi, Pls use equivalent command to reboot on the respective DUT - - Kill DUT and launch again, without commission follow the next steps - - ./chip-tool generaldiagnostics read reboot-count 1 0 - The reboot-count count should match with the number of rebooted times - [1686307529.634007][57073:57073] CHIP:DMG: - [1686307529.634151][57073:57073] CHIP:DMG: ReportDataMessage = - [1686307529.634212][57073:57073] CHIP:DMG: { - [1686307529.634260][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686307529.634332][57073:57073] CHIP:DMG: [ - [1686307529.634390][57073:57073] CHIP:DMG: AttributeReportIB = - [1686307529.634465][57073:57073] CHIP:DMG: { - [1686307529.634527][57073:57073] CHIP:DMG: AttributeDataIB = - [1686307529.634596][57073:57073] CHIP:DMG: { - [1686307529.634669][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686307529.634737][57073:57073] CHIP:DMG: AttributePathIB = - [1686307529.634811][57073:57073] CHIP:DMG: { - [1686307529.634883][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686307529.634965][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686307529.635046][57073:57073] CHIP:DMG: Attribute = 0x0000_0001, - [1686307529.635118][57073:57073] CHIP:DMG: } - [1686307529.635195][57073:57073] CHIP:DMG: - [1686307529.635273][57073:57073] CHIP:DMG: Data = 3, - [1686307529.635342][57073:57073] CHIP:DMG: }, - [1686307529.635419][57073:57073] CHIP:DMG: - [1686307529.635479][57073:57073] CHIP:DMG: }, - [1686307529.635549][57073:57073] CHIP:DMG: - [1686307529.635605][57073:57073] CHIP:DMG: ], - [1686307529.635674][57073:57073] CHIP:DMG: - [1686307529.635732][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686307529.635792][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307529.635846][57073:57073] CHIP:DMG: } - [1686307529.635896][57073:57073] CHIP:DMG: - [1686307529.636229][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307529.636296][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686307529.636346][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - [1686307529.636411][57073:57073] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet - disabled: true - - - label: - "Step 4: TH reboots and DUT reads a UpTime attribute value of TH since - some arbitrary start time of TH rebooting." - PICS: DGGEN.C.A0002 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - - ./chip-tool generaldiagnostics read up-time 1 0 - - On TH(all-clusters-app), Verify that UpTime attribute data type must be UINT64 and the time duratoin should be represented in seconds since TH (node) has been rebooted. - Below is the example log which is observed in the RPI platform : - - [1686307643.700814][57073:57073] CHIP:DMG: - [1686307643.700956][57073:57073] CHIP:DMG: ReportDataMessage = - [1686307643.701016][57073:57073] CHIP:DMG: { - [1686307643.701064][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686307643.701136][57073:57073] CHIP:DMG: [ - [1686307643.701193][57073:57073] CHIP:DMG: AttributeReportIB = - [1686307643.701267][57073:57073] CHIP:DMG: { - [1686307643.701329][57073:57073] CHIP:DMG: AttributeDataIB = - [1686307643.701397][57073:57073] CHIP:DMG: { - [1686307643.701467][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686307643.701538][57073:57073] CHIP:DMG: AttributePathIB = - [1686307643.701611][57073:57073] CHIP:DMG: { - [1686307643.701719][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686307643.701822][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686307643.701902][57073:57073] CHIP:DMG: Attribute = 0x0000_0002, - [1686307643.701979][57073:57073] CHIP:DMG: } - [1686307643.702056][57073:57073] CHIP:DMG: - [1686307643.702135][57073:57073] CHIP:DMG: Data = 118, - [1686307643.702205][57073:57073] CHIP:DMG: }, - [1686307643.702287][57073:57073] CHIP:DMG: - [1686307643.702346][57073:57073] CHIP:DMG: }, - [1686307643.702415][57073:57073] CHIP:DMG: - [1686307643.702470][57073:57073] CHIP:DMG: ], - [1686307643.702539][57073:57073] CHIP:DMG: - [1686307643.702596][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686307643.702654][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307643.702707][57073:57073] CHIP:DMG: } - [1686307643.702756][57073:57073] CHIP:DMG: - [1686307643.703091][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307643.703157][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686307643.703207][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - [1686307643.703273][57073:57073] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet - disabled: true - - - label: - "Step 5: DUT reads a TotalOperationalHours attribute value from TH." - PICS: DGGEN.C.A0003 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - - ./chip-tool generaldiagnostics read total-operational-hours 1 0 - - On TH(all-clusters-app), Verify that TotalOperationalHours attribute data type must be UINT32 and the value indicates the number of hours the node has been operational since TH (node) has been rebooted, - - Below is the example log which is observed in the RPI platform : - - [1686307701.675949][57073:57073] CHIP:DMG: - [1686307701.676094][57073:57073] CHIP:DMG: ReportDataMessage = - [1686307701.676154][57073:57073] CHIP:DMG: { - [1686307701.676202][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686307701.676273][57073:57073] CHIP:DMG: [ - [1686307701.676331][57073:57073] CHIP:DMG: AttributeReportIB = - [1686307701.676405][57073:57073] CHIP:DMG: { - [1686307701.676466][57073:57073] CHIP:DMG: AttributeDataIB = - [1686307701.676534][57073:57073] CHIP:DMG: { - [1686307701.676607][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686307701.676679][57073:57073] CHIP:DMG: AttributePathIB = - [1686307701.676749][57073:57073] CHIP:DMG: { - [1686307701.676825][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686307701.676906][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686307701.676986][57073:57073] CHIP:DMG: Attribute = 0x0000_0003, - [1686307701.677062][57073:57073] CHIP:DMG: } - [1686307701.677140][57073:57073] CHIP:DMG: - [1686307701.677219][57073:57073] CHIP:DMG: Data = 0, - [1686307701.677286][57073:57073] CHIP:DMG: }, - [1686307701.677363][57073:57073] CHIP:DMG: - [1686307701.677423][57073:57073] CHIP:DMG: }, - [1686307701.677493][57073:57073] CHIP:DMG: - [1686307701.677547][57073:57073] CHIP:DMG: ], - [1686307701.677616][57073:57073] CHIP:DMG: - [1686307701.677674][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686307701.677865][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307701.677920][57073:57073] CHIP:DMG: } - [1686307701.677970][57073:57073] CHIP:DMG: - [1686307701.678326][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307701.678393][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686307701.678445][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - disabled: true - - - label: - "Step 6: TH undergoes a reboot process. DUT reads a attribute value - from TH." - PICS: DGGEN.C.A0004 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - - ./chip-tool generaldiagnostics read boot-reason 1 0 - - On TH(all-clusters-app), Verify that bootreason attribute data type must match the value listed in Table 105 BootReason ENUM table in spec. - - Below is the example log which is observed in the RPI platform : - - [1686307743.025877][57073:57073] CHIP:DMG: ReportDataMessage = - [1686307743.025942][57073:57073] CHIP:DMG: { - [1686307743.025991][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686307743.026063][57073:57073] CHIP:DMG: [ - [1686307743.026121][57073:57073] CHIP:DMG: AttributeReportIB = - [1686307743.026197][57073:57073] CHIP:DMG: { - [1686307743.026259][57073:57073] CHIP:DMG: AttributeDataIB = - [1686307743.026329][57073:57073] CHIP:DMG: { - [1686307743.026402][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686307743.026475][57073:57073] CHIP:DMG: AttributePathIB = - [1686307743.026549][57073:57073] CHIP:DMG: { - [1686307743.026626][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686307743.026706][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686307743.026786][57073:57073] CHIP:DMG: Attribute = 0x0000_0004, - [1686307743.026863][57073:57073] CHIP:DMG: } - [1686307743.026942][57073:57073] CHIP:DMG: - [1686307743.027017][57073:57073] CHIP:DMG: Data = 0, - [1686307743.027088][57073:57073] CHIP:DMG: }, - [1686307743.027165][57073:57073] CHIP:DMG: - [1686307743.027226][57073:57073] CHIP:DMG: }, - [1686307743.027297][57073:57073] CHIP:DMG: - [1686307743.027353][57073:57073] CHIP:DMG: ], - [1686307743.027422][57073:57073] CHIP:DMG: - [1686307743.027481][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686307743.027617][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307743.027672][57073:57073] CHIP:DMG: } - [1686307743.027722][57073:57073] CHIP:DMG: - [1686307743.028065][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307743.028132][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686307743.028183][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - disabled: true - - - label: - "Step 7: DUT reads ActiveHardwareFaults attribute value from TH. - Subscription is possible option for this attribute." - PICS: DGGEN.C.A0005 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - - ./chip-tool generaldiagnostics read active-hardware-faults 1 0 - - On TH(all-clusters-app), Verify that ActiveHardwareFaults attribute the attribute response should be empty. But when a hardware fault occurs, the return attribute value must match the value listed in the HardwareFault ENUM table 11.11.6.1. - - Below is the example log which is observed in the RPI platform : - - [1686307781.603898][57073:57073] CHIP:DMG: ReportDataMessage = - [1686307781.603957][57073:57073] CHIP:DMG: { - [1686307781.604008][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686307781.604080][57073:57073] CHIP:DMG: [ - [1686307781.604138][57073:57073] CHIP:DMG: AttributeReportIB = - [1686307781.604214][57073:57073] CHIP:DMG: { - [1686307781.604276][57073:57073] CHIP:DMG: AttributeDataIB = - [1686307781.604344][57073:57073] CHIP:DMG: { - [1686307781.604417][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686307781.604490][57073:57073] CHIP:DMG: AttributePathIB = - [1686307781.604563][57073:57073] CHIP:DMG: { - [1686307781.604639][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686307781.604715][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686307781.604796][57073:57073] CHIP:DMG: Attribute = 0x0000_0005, - [1686307781.604872][57073:57073] CHIP:DMG: } - [1686307781.604950][57073:57073] CHIP:DMG: - [1686307781.605024][57073:57073] CHIP:DMG: Data = [ - [1686307781.605097][57073:57073] CHIP:DMG: - [1686307781.605177][57073:57073] CHIP:DMG: ], - [1686307781.605243][57073:57073] CHIP:DMG: }, - [1686307781.605320][57073:57073] CHIP:DMG: - [1686307781.605380][57073:57073] CHIP:DMG: }, - [1686307781.605451][57073:57073] CHIP:DMG: - [1686307781.605507][57073:57073] CHIP:DMG: ], - [1686307781.605577][57073:57073] CHIP:DMG: - [1686307781.605634][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686307781.605730][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307781.605790][57073:57073] CHIP:DMG: } - [1686307781.605840][57073:57073] CHIP:DMG: - [1686307781.606181][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307781.606249][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - Please perform subscription in Interactive mode - Here the command to enter interactive mode:-- ./chip-tool interactive start - - generaldiagnostics subscribe active-hardware-faults 3 100 1 0 - - On TH(all-clusters-app), Verify that ActiveHardwareFaults attribute the attribute response should be empty. But when a hardware fault occurs, the return attribute value must match the value listed in the HardwareFault ENUM table 11.11.6.1. This value may be subscribed. - - Below is the example log which is observed in the RPI platform : - - [1686307843.510650][57073:57073] CHIP:EM: Rxd Ack; Removing MessageCounter:23103056 from Retrans Table on exchange 24036r - [1686307843.510781][57073:57073] CHIP:DMG: StatusResponseMessage = - [1686307843.510845][57073:57073] CHIP:DMG: { - [1686307843.510922][57073:57073] CHIP:DMG: Status = 0x00 (SUCCESS), - [1686307843.510984][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307843.511038][57073:57073] CHIP:DMG: } - [1686307843.511116][57073:57073] CHIP:IM: Received status response, status is 0x00 (SUCCESS) - [1686307843.511216][57073:57073] CHIP:DMG: Refresh Subscribe Sync Timer with min 3 seconds and max 100 seconds - [1686307843.511770][57073:57073] CHIP:EM: <<< [E:24036r S:63322 M:23103057 (Ack:112203453)] (S) Msg TX to 1:000000000001B669 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686307843.511859][57073:57073] CHIP:IN: (S) Sending msg 23103057 on secure session with LSID: 63322 - [1686307843.512510][57073:57073] CHIP:DMG: >> to UDP:[fe80::e9f6:2c08:2794:357d%eth0]:59421 | 23103057 | [Interaction Model (1) / Subscribe Response (0x04) / Session = 6810 / Exchange = 24036] - [1686307843.512597][57073:57073] CHIP:DMG: Header Flags = - [1686307843.512648][57073:57073] CHIP:DMG: { - [1686307843.512724][57073:57073] CHIP:DMG: Exchange (0x06) = - [1686307843.512775][57073:57073] CHIP:DMG: { - [1686307843.512826][57073:57073] CHIP:DMG: AckMsg = 112203453 - [1686307843.512898][57073:57073] CHIP:DMG: NeedsAck = true - [1686307843.512949][57073:57073] CHIP:DMG: } - [1686307843.513013][57073:57073] CHIP:DMG: } - [1686307843.513083][57073:57073] CHIP:DMG: - [1686307843.513145][57073:57073] CHIP:DMG: Encrypted Payload (48 bytes) = - [1686307843.513194][57073:57073] CHIP:DMG: { - [1686307843.513264][57073:57073] CHIP:DMG: data = 009a1a00518660011eb0619ea074318af4478c0426dc2e7e25cc783a1f14f0c1919836a77ef5e395bbdae42d05c30c31 - [1686307843.513316][57073:57073] CHIP:DMG: buffer_ptr = 187651312554688 - [1686307843.513363][57073:57073] CHIP:DMG: } - [1686307843.513408][57073:57073] CHIP:DMG: - [1686307843.513496][57073:57073] CHIP:DMG: Decrypted Payload (14 bytes) = - [1686307843.513548][57073:57073] CHIP:DMG: { - [1686307843.513595][57073:57073] CHIP:DMG: data = 15260084a6fd9624026424ff0118 - [1686307843.513667][57073:57073] CHIP:DMG: } - [1686307843.513826][57073:57073] CHIP:DMG: - [1686307843.513939][57073:57073] CHIP:DMG: SubscribeResponseMessage = - [1686307843.513998][57073:57073] CHIP:DMG: { - [1686307843.514073][57073:57073] CHIP:DMG: SubscriptionId = 0x96fda684, - [1686307843.514136][57073:57073] CHIP:DMG: MaxInterval = 0x64, - [1686307843.514196][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307843.514273][57073:57073] CHIP:DMG: } - [1686307843.514323][57073:57073] CHIP:DMG: - [1686307843.514684][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307843.514768][57073:57073] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: - "Step 8: DUT reads ActiveRadioFaults attribute value from TH. - Subscription is possible option for this attribute." - PICS: DGGEN.C.A0006 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - - ./chip-tool generaldiagnostics read active-radio-faults 1 0 - On TH(all-clusters-app), Verify that ActiveRadioFaults attribute response should be empty. But when a radio fault occurs, the return attribute value must match the value listed in the RadioFault ENUM table. 11.11.6.2. - Below is the example log which is observed in the RPI platform : - [1686308161.710734][57073:57073] CHIP:DMG: ReportDataMessage = - [1686308161.710792][57073:57073] CHIP:DMG: { - [1686308161.710840][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686308161.710912][57073:57073] CHIP:DMG: [ - [1686308161.710969][57073:57073] CHIP:DMG: AttributeReportIB = - [1686308161.711044][57073:57073] CHIP:DMG: { - [1686308161.711105][57073:57073] CHIP:DMG: AttributeDataIB = - [1686308161.711175][57073:57073] CHIP:DMG: { - [1686308161.711245][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686308161.711317][57073:57073] CHIP:DMG: AttributePathIB = - [1686308161.711392][57073:57073] CHIP:DMG: { - [1686308161.711466][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686308161.711546][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686308161.711626][57073:57073] CHIP:DMG: Attribute = 0x0000_0006, - [1686308161.711702][57073:57073] CHIP:DMG: } - [1686308161.711780][57073:57073] CHIP:DMG: - [1686308161.711854][57073:57073] CHIP:DMG: Data = [ - [1686308161.711928][57073:57073] CHIP:DMG: - [1686308161.712008][57073:57073] CHIP:DMG: ], - [1686308161.712078][57073:57073] CHIP:DMG: }, - [1686308161.712161][57073:57073] CHIP:DMG: - [1686308161.712221][57073:57073] CHIP:DMG: }, - [1686308161.712292][57073:57073] CHIP:DMG: - [1686308161.712348][57073:57073] CHIP:DMG: ], - [1686308161.712418][57073:57073] CHIP:DMG: - [1686308161.712475][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686308161.712533][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686308161.712587][57073:57073] CHIP:DMG: } - [1686308161.712637][57073:57073] CHIP:DMG: - [1686308161.712974][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686308161.713043][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 1, RE has no more messages - [1686308161.713094][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - - - - Please perform subscription in Interactive mode - Here the command to enter interactive mode:-- ./chip-tool interactive start - - generaldiagnostics subscribe active-radio-faults 100 1000 1 0 - - On TH(all-clusters-app), Verify that ActiveRadioFaults attribute response should be empty. But when a radio fault occurs, the return attribute value must match the value listed in the RadioFault ENUM table. 11.11.6.2. . This value may be subscribed. - Below is the example log which is observed in the RPI platform : - - - [1686307919.469064][57073:57073] CHIP:DMG: StatusResponseMessage = - [1686307919.469149][57073:57073] CHIP:DMG: { - [1686307919.469207][57073:57073] CHIP:DMG: Status = 0x00 (SUCCESS), - [1686307919.469267][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307919.469344][57073:57073] CHIP:DMG: } - [1686307919.469400][57073:57073] CHIP:IM: Received status response, status is 0x00 (SUCCESS) - [1686307919.469519][57073:57073] CHIP:DMG: Refresh Subscribe Sync Timer with min 100 seconds and max 1000 seconds - [1686307919.470080][57073:57073] CHIP:EM: <<< [E:24037r S:63322 M:23103059 (Ack:112203456)] (S) Msg TX to 1:000000000001B669 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686307919.470170][57073:57073] CHIP:IN: (S) Sending msg 23103059 on secure session with LSID: 63322 - [1686307919.470842][57073:57073] CHIP:DMG: >> to UDP:[fe80::e9f6:2c08:2794:357d%eth0]:59421 | 23103059 | [Interaction Model (1) / Subscribe Response (0x04) / Session = 6810 / Exchange = 24037] - [1686307919.470931][57073:57073] CHIP:DMG: Header Flags = - [1686307919.470983][57073:57073] CHIP:DMG: { - [1686307919.471061][57073:57073] CHIP:DMG: Exchange (0x06) = - [1686307919.471112][57073:57073] CHIP:DMG: { - [1686307919.471164][57073:57073] CHIP:DMG: AckMsg = 112203456 - [1686307919.471237][57073:57073] CHIP:DMG: NeedsAck = true - [1686307919.471288][57073:57073] CHIP:DMG: } - [1686307919.471352][57073:57073] CHIP:DMG: } - [1686307919.471420][57073:57073] CHIP:DMG: - [1686307919.471484][57073:57073] CHIP:DMG: Encrypted Payload (49 bytes) = - [1686307919.471534][57073:57073] CHIP:DMG: { - [1686307919.471604][57073:57073] CHIP:DMG: data = 009a1a0053866001e6272a390623bd75fd74354aab79de80781818aa40a6d57a63027f9adb46fa0c80dbcbea6e887e7814 - [1686307919.471658][57073:57073] CHIP:DMG: buffer_ptr = 187651312554688 - [1686307919.471704][57073:57073] CHIP:DMG: } - [1686307919.471750][57073:57073] CHIP:DMG: - [1686307919.471839][57073:57073] CHIP:DMG: Decrypted Payload (15 bytes) = - [1686307919.471891][57073:57073] CHIP:DMG: { - [1686307919.471938][57073:57073] CHIP:DMG: data = 1526009ab98a6b2502e80324ff0118 - [1686307919.472007][57073:57073] CHIP:DMG: } - [1686307919.472054][57073:57073] CHIP:DMG: - [1686307919.472164][57073:57073] CHIP:DMG: SubscribeResponseMessage = - [1686307919.472223][57073:57073] CHIP:DMG: { - [1686307919.472276][57073:57073] CHIP:DMG: SubscriptionId = 0x6b8ab99a, - [1686307919.472362][57073:57073] CHIP:DMG: MaxInterval = 0x3e8, - [1686307919.472422][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307919.472477][57073:57073] CHIP:DMG: } - [1686307919.472547][57073:57073] CHIP:DMG: - [1686307919.472904][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307919.472965][57073:57073] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: - "Step 9: DUT reads ActiveNetworkFaults attribute value from TH. - Subscription is possible option for this attribute." - PICS: DGGEN.C.A0007 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - ./chip-tool generaldiagnostics read active-network-faults 1 0 - - On TH(all-clusters-app), Verify that ActiveNetworkFaults attribute value attribute response should be empty. But when a network fault occurs, the return attribute value must match the value listed in the NetworkFault ENUM table 11.11.6.3 - - Below is the example log which is observed in the RPI platform : - [1686308088.267488][57073:57073] CHIP:DMG: - [1686308088.267658][57073:57073] CHIP:DMG: ReportDataMessage = - [1686308088.267719][57073:57073] CHIP:DMG: { - [1686308088.267790][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686308088.267866][57073:57073] CHIP:DMG: [ - [1686308088.267923][57073:57073] CHIP:DMG: AttributeReportIB = - [1686308088.268026][57073:57073] CHIP:DMG: { - [1686308088.268088][57073:57073] CHIP:DMG: AttributeDataIB = - [1686308088.268179][57073:57073] CHIP:DMG: { - [1686308088.268254][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686308088.268345][57073:57073] CHIP:DMG: AttributePathIB = - [1686308088.268421][57073:57073] CHIP:DMG: { - [1686308088.268519][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686308088.268602][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686308088.268703][57073:57073] CHIP:DMG: Attribute = 0x0000_0007, - [1686308088.268781][57073:57073] CHIP:DMG: } - [1686308088.268881][57073:57073] CHIP:DMG: - [1686308088.268958][57073:57073] CHIP:DMG: Data = [ - [1686308088.269053][57073:57073] CHIP:DMG: - [1686308088.269136][57073:57073] CHIP:DMG: ], - [1686308088.269227][57073:57073] CHIP:DMG: }, - [1686308088.269307][57073:57073] CHIP:DMG: - [1686308088.269370][57073:57073] CHIP:DMG: }, - [1686308088.269464][57073:57073] CHIP:DMG: - [1686308088.269520][57073:57073] CHIP:DMG: ], - [1686308088.269618][57073:57073] CHIP:DMG: - [1686308088.269677][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686308088.269803][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686308088.269860][57073:57073] CHIP:DMG: } - [1686308088.269910][57073:57073] CHIP:DMG: - [1686308088.270319][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686308088.270385][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 1, RE has no more messages - [1686308088.270436][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - - - - Please perform subscription in Interactive mode - Here the command to enter interactive mode:-- ./chip-tool interactive start - - generaldiagnostics subscribe active-network-faults 100 1000 1 0 - - On TH(all-clusters-app), Verify that ActiveNetworkFaults attribute value attribute response should be empty. But when a network fault occurs, the return attribute value must match the value listed in the NetworkFault ENUM table 11.11.6.3. This value may be subscribed. - Below is the example log which is observed in the RPI platform : - - [1686307960.687673][57073:57073] CHIP:EM: Rxd Ack; Removing MessageCounter:30942835 from Retrans Table on exchange 24039r - [1686307960.687802][57073:57073] CHIP:DMG: StatusResponseMessage = - [1686307960.687864][57073:57073] CHIP:DMG: { - [1686307960.687942][57073:57073] CHIP:DMG: Status = 0x00 (SUCCESS), - [1686307960.688003][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307960.688057][57073:57073] CHIP:DMG: } - [1686307960.688136][57073:57073] CHIP:IM: Received status response, status is 0x00 (SUCCESS) - [1686307960.688230][57073:57073] CHIP:DMG: Refresh Subscribe Sync Timer with min 100 seconds and max 1000 seconds - [1686307960.688774][57073:57073] CHIP:EM: <<< [E:24039r S:63323 M:30942836 (Ack:186563629)] (S) Msg TX to 1:000000000001B669 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686307960.688863][57073:57073] CHIP:IN: (S) Sending msg 30942836 on secure session with LSID: 63323 - [1686307960.689504][57073:57073] CHIP:DMG: >> to UDP:[fe80::e9f6:2c08:2794:357d%eth0]:59421 | 30942836 | [Interaction Model (1) / Subscribe Response (0x04) / Session = 6811 / Exchange = 24039] - [1686307960.689591][57073:57073] CHIP:DMG: Header Flags = - [1686307960.689643][57073:57073] CHIP:DMG: { - [1686307960.689755][57073:57073] CHIP:DMG: Exchange (0x06) = - [1686307960.689810][57073:57073] CHIP:DMG: { - [1686307960.689862][57073:57073] CHIP:DMG: AckMsg = 186563629 - [1686307960.689911][57073:57073] CHIP:DMG: NeedsAck = true - [1686307960.689958][57073:57073] CHIP:DMG: } - [1686307960.690048][57073:57073] CHIP:DMG: } - [1686307960.690100][57073:57073] CHIP:DMG: - [1686307960.690161][57073:57073] CHIP:DMG: Encrypted Payload (49 bytes) = - [1686307960.690232][57073:57073] CHIP:DMG: { - [1686307960.690283][57073:57073] CHIP:DMG: data = 009b1a007426d801508f052c4f353e1e4f7f65e371e88ed11df4630e03e488f1f4acbf93785d02417643644ac79541c2d0 - [1686307960.690333][57073:57073] CHIP:DMG: buffer_ptr = 187651312560480 - [1686307960.690379][57073:57073] CHIP:DMG: } - [1686307960.690446][57073:57073] CHIP:DMG: - [1686307960.690514][57073:57073] CHIP:DMG: Decrypted Payload (15 bytes) = - [1686307960.690565][57073:57073] CHIP:DMG: { - [1686307960.690640][57073:57073] CHIP:DMG: data = 152600031dfc822502e80324ff0118 - [1686307960.690688][57073:57073] CHIP:DMG: } - [1686307960.690733][57073:57073] CHIP:DMG: - [1686307960.690837][57073:57073] CHIP:DMG: SubscribeResponseMessage = - [1686307960.690897][57073:57073] CHIP:DMG: { - [1686307960.690950][57073:57073] CHIP:DMG: SubscriptionId = 0x82fc1d03, - [1686307960.691035][57073:57073] CHIP:DMG: MaxInterval = 0x3e8, - [1686307960.691094][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307960.691168][57073:57073] CHIP:DMG: } - [1686307960.691221][57073:57073] CHIP:DMG: - [1686307960.691577][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307960.691640][57073:57073] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: - "Step 10: TH reads TestEventTriggersEnabled attribute value. If this - value is set True, then a certain test mode will be performed (or - triggered) according to pre-provisioned client and server test mode." - PICS: DGGEN.C.A0008 - verification: | - ./chip-tool generaldiagnostics read test-event-triggers-enabled 1 0 - - On TH(all-clusters-app), Verify that TestEventTriggersEnabled attribute value should be data type bool - Below is the example log which is observed in the RPI platform : - - [1686308043.575660][57073:57073] CHIP:DMG: - [1686308043.575826][57073:57073] CHIP:DMG: ReportDataMessage = - [1686308043.575887][57073:57073] CHIP:DMG: { - [1686308043.575958][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686308043.576032][57073:57073] CHIP:DMG: [ - [1686308043.576116][57073:57073] CHIP:DMG: AttributeReportIB = - [1686308043.576192][57073:57073] CHIP:DMG: { - [1686308043.576253][57073:57073] CHIP:DMG: AttributeDataIB = - [1686308043.576345][57073:57073] CHIP:DMG: { - [1686308043.576416][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686308043.576501][57073:57073] CHIP:DMG: AttributePathIB = - [1686308043.576576][57073:57073] CHIP:DMG: { - [1686308043.576652][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686308043.576755][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686308043.576837][57073:57073] CHIP:DMG: Attribute = 0x0000_0008, - [1686308043.576934][57073:57073] CHIP:DMG: } - [1686308043.577014][57073:57073] CHIP:DMG: - [1686308043.577114][57073:57073] CHIP:DMG: Data = false, - [1686308043.577188][57073:57073] CHIP:DMG: }, - [1686308043.577286][57073:57073] CHIP:DMG: - [1686308043.577348][57073:57073] CHIP:DMG: }, - [1686308043.577419][57073:57073] CHIP:DMG: - [1686308043.577495][57073:57073] CHIP:DMG: ], - [1686308043.577566][57073:57073] CHIP:DMG: - [1686308043.577645][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686308043.577759][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686308043.577817][57073:57073] CHIP:DMG: } - [1686308043.577891][57073:57073] CHIP:DMG: - [1686308043.578276][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686308043.578344][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 1, RE has no more messages - [1686308043.578395][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_3_1_Simulated.yaml deleted file mode 100644 index e315cd95958a6f..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGSW_3_1_Simulated.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 44.3.1. [TC-DGSW-3.1] Attributes [DUT as Client] - -PICS: - - DGSW.C - -config: - nodeId: 0x12344321 - cluster: "Software Diagnostics" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: ThreadMetrics" - PICS: DGSW.C.A0000 - wait: "readAttribute" - attribute: "ThreadMetrics" - - - label: "Read attribute: CurrentHeapFree" - PICS: DGSW.C.A0001 - wait: "readAttribute" - attribute: "CurrentHeapFree" - - - label: "Read attribute: CurrentHeapUsed" - PICS: DGSW.C.A0002 - wait: "readAttribute" - attribute: "CurrentHeapUsed" - - - label: "Read attribute: CurrentHeapHighWatermark" - PICS: DGSW.C.A0003 - wait: "readAttribute" - attribute: "CurrentHeapHighWatermark" diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1_Simulated.yaml deleted file mode 100644 index d2d4358b92fda1..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1_Simulated.yaml +++ /dev/null @@ -1,174 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 50.3.1. [TC-DGTHREAD-3.1] Attributes [DUT- Client] - -PICS: - - DGTHREAD.C - -config: - nodeId: 0x12344321 - cluster: "Thread Network Diagnostics" - endpoint: 0 - -tests: - - label: "Wait for the device to be commissioned" - cluster: "DelayCommands" - command: "WaitForCommissioning" - - - label: "DUT reads Channel attribute value from TH" - wait: "readAttribute" - attribute: "Channel" - PICS: DGTHREAD.C.A0000 - - - label: "DUT reads RoutingRole attribute value from TH" - wait: "readAttribute" - attribute: "RoutingRole" - PICS: DGTHREAD.C.A0001 - - - label: "DUT reads NetworkName attribute value from TH" - wait: "readAttribute" - attribute: "NetworkName" - PICS: DGTHREAD.C.A0002 - - - label: "DUT reads PanId attribute value from TH" - wait: "readAttribute" - attribute: "PanId" - PICS: DGTHREAD.C.A0003 - - - label: "DUT reads ExtendedPanId attribute value from TH" - wait: "readAttribute" - attribute: "ExtendedPanId" - PICS: DGTHREAD.C.A0004 - - - label: "DUT reads MeshLocalPrefix attribute value from TH" - wait: "readAttribute" - attribute: "MeshLocalPrefix" - PICS: DGTHREAD.C.A0005 - - - label: "DUT reads OverrunCount attribute value from TH" - wait: "readAttribute" - attribute: "OverrunCount" - PICS: DGTHREAD.C.A0006 - - - label: "DUT reads NeighborTable attribute value from TH" - wait: "readAttribute" - attribute: "NeighborTable" - PICS: DGTHREAD.C.A0007 - - - label: "DUT reads RouteTable attribute value from TH" - wait: "readAttribute" - attribute: "RouteTable" - PICS: DGTHREAD.C.A0008 - - - label: "DUT reads PartitionId attribute value from TH" - wait: "readAttribute" - attribute: "PartitionId" - PICS: DGTHREAD.C.A0009 - - - label: "DUT reads Weighting attribute value from TH" - wait: "readAttribute" - attribute: "Weighting" - PICS: DGTHREAD.C.A000a - - - label: "DUT reads DataVersion attribute value from TH" - wait: "readAttribute" - attribute: "DataVersion" - PICS: DGTHREAD.C.A000b - - - label: "DUT reads StableDataVersion attribute value from TH" - wait: "readAttribute" - attribute: "StableDataVersion" - PICS: DGTHREAD.C.A000c - - - label: "DUT reads LeaderRouterId attribute value from TH" - wait: "readAttribute" - attribute: "LeaderRouterId" - PICS: DGTHREAD.C.A000d - - - label: "DUT reads DetachedRoleCount attribute value from TH" - wait: "readAttribute" - attribute: "DetachedRoleCount" - PICS: DGTHREAD.C.A000e - - - label: "DUT reads ChildRoleCount attribute value from TH" - wait: "readAttribute" - attribute: "ChildRoleCount" - PICS: DGTHREAD.C.A000f - - - label: "DUT reads RouterRoleCount attribute value from TH" - wait: "readAttribute" - attribute: "RouterRoleCount" - PICS: DGTHREAD.C.A0010 - - - label: "DUT reads LeaderRoleCount attribute value from TH" - wait: "readAttribute" - attribute: "LeaderRoleCount" - PICS: DGTHREAD.C.A0011 - - - label: "DUT reads AttachAttemptCount attribute value from TH" - wait: "readAttribute" - attribute: "AttachAttemptCount" - PICS: DGTHREAD.C.A0012 - - - label: "DUT reads PartitionIdChangeCount attribute value from TH" - wait: "readAttribute" - attribute: "PartitionIdChangeCount" - PICS: DGTHREAD.C.A0013 - - - label: - "DUT reads BetterPartitionAttachAttemptCount attribute value from TH" - wait: "readAttribute" - attribute: "BetterPartitionAttachAttemptCount" - PICS: DGTHREAD.C.A0014 - - - label: "DUT reads ParentChangeCount attribute value from TH" - wait: "readAttribute" - attribute: "ParentChangeCount" - PICS: DGTHREAD.C.A0015 - - - label: "DUT reads ActiveTimestamp attribute value from TH" - wait: "readAttribute" - attribute: "ActiveTimestamp" - PICS: DGTHREAD.C.A0038 - - - label: "DUT reads PendingTimestamp attribute value from TH" - wait: "readAttribute" - attribute: "PendingTimestamp" - PICS: DGTHREAD.C.A0039 - - - label: "DUT reads Delay attribute value from TH" - wait: "readAttribute" - attribute: "Delay" - PICS: DGTHREAD.C.A003a - - - label: "DUT reads SecurityPolicy attribute value from TH" - wait: "readAttribute" - attribute: "SecurityPolicy" - PICS: DGTHREAD.C.A003b - - - label: "DUT reads ChannelPage0Mask attribute value from TH" - wait: "readAttribute" - attribute: "ChannelPage0Mask" - PICS: DGTHREAD.C.A003c - - - label: "DUT reads OperationalDatasetComponents attribute value from TH" - wait: "readAttribute" - attribute: "OperationalDatasetComponents" - PICS: DGTHREAD.C.A003d - - - label: "DUT reads ActiveNetworkFaults attribute value from TH" - wait: "readAttribute" - attribute: "ActiveNetworkFaultsList" - PICS: DGTHREAD.C.A003e diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_2_Simulated.yaml deleted file mode 100644 index 992eaa3da0bd23..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_2_Simulated.yaml +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 3.3.2. [TC-DGTHREAD-3.2] Command Generated {DUT_Client}] - -PICS: - - DGTHREAD.C - -config: - nodeId: 0x12344321 - cluster: "Thread Network Diagnostics" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads TxTotalCount attribute value from TH" - wait: "readAttribute" - attribute: "TxTotalCount" - PICS: DGTHREAD.C.A0016 - - - label: "DUT reads TxUnicastCount attribute value from TH" - wait: "readAttribute" - attribute: "TxUnicastCount" - PICS: DGTHREAD.C.A0017 - - - label: "DUT reads TxBroadcastCount attribute value from TH" - wait: "readAttribute" - attribute: "TxBroadcastCount" - PICS: DGTHREAD.C.A0018 - - - label: "DUT reads TxAckRequestedCount attribute value from TH" - wait: "readAttribute" - attribute: "TxAckRequestedCount" - PICS: DGTHREAD.C.A0019 - - - label: "DUT reads TxAckedCount attribute value from TH" - wait: "readAttribute" - attribute: "TxAckedCount" - PICS: DGTHREAD.C.A001a - - - label: "DUT reads TxNoAckRequestedCount attribute value from TH" - wait: "readAttribute" - attribute: "TxNoAckRequestedCount" - PICS: DGTHREAD.C.A001b - - - label: "DUT reads TxDataCount attribute value from TH" - wait: "readAttribute" - attribute: "TxDataCount" - PICS: DGTHREAD.C.A001c - - - label: "DUT reads TxDataPollCount attribute value from TH" - wait: "readAttribute" - attribute: "TxDataPollCount" - PICS: DGTHREAD.C.A001d - - - label: "DUT reads TxBeaconCount attribute value from TH" - wait: "readAttribute" - attribute: "TxBeaconCount" - PICS: DGTHREAD.C.A001e - - - label: "DUT reads TxBeaconRequestCount attribute value from TH" - wait: "readAttribute" - attribute: "TxBeaconRequestCount" - PICS: DGTHREAD.C.A001f - - - label: "DUT reads TxOtherCount attribute value from TH" - wait: "readAttribute" - attribute: "TxOtherCount" - PICS: DGTHREAD.C.A0020 - - - label: "DUT reads TxRetryCount attribute value from TH" - wait: "readAttribute" - attribute: "TxRetryCount" - PICS: DGTHREAD.C.A0021 - - - label: "DUT reads TxDirectMaxRetryExpiryCount attribute value from TH" - wait: "readAttribute" - attribute: "TxDirectMaxRetryExpiryCount" - PICS: DGTHREAD.C.A0022 - - - label: "DUT reads TxIndirectMaxRetryExpiryCount attribute value from TH" - wait: "readAttribute" - attribute: "TxIndirectMaxRetryExpiryCount" - PICS: DGTHREAD.C.A0023 - - - label: "DUT reads TxErrCcaCount attribute value from TH" - wait: "readAttribute" - attribute: "TxErrCcaCount" - PICS: DGTHREAD.C.A0024 - - - label: "DUT reads TxErrAbortCount attribute value from TH" - wait: "readAttribute" - attribute: "TxErrAbortCount" - PICS: DGTHREAD.C.A0025 - - - label: "DUT reads TxErrBusyChannelCount attribute value from TH" - wait: "readAttribute" - attribute: "TxErrBusyChannelCount" - PICS: DGTHREAD.C.A0026 diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_3_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_3_Simulated.yaml deleted file mode 100644 index 8a343dce13b85b..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_3_Simulated.yaml +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 3.3.2. [TC-DGTHREAD-3.3] Command Generated {DUT_Client}] - -PICS: - - DGTHREAD.C - -config: - nodeId: 0x12344321 - cluster: "Thread Network Diagnostics" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads RxTotalCount attribute value from TH" - wait: "readAttribute" - attribute: "RxTotalCount" - PICS: DGTHREAD.C.A0027 - - - label: "DUT reads RxUnicastCount attribute value from TH" - wait: "readAttribute" - attribute: "RxUnicastCount" - PICS: DGTHREAD.C.A0028 - - - label: "DUT reads RxBroadcastCount attribute value from TH" - wait: "readAttribute" - attribute: "RxBroadcastCount" - PICS: DGTHREAD.C.A0029 - - - label: "DUT reads RxDataCount attribute value from TH" - wait: "readAttribute" - attribute: "RxDataCount" - PICS: DGTHREAD.C.A002a - - - label: "DUT reads RxDataPollCount attribute value from TH" - wait: "readAttribute" - attribute: "RxDataPollCount" - PICS: DGTHREAD.C.A002b - - - label: "DUT reads RxBeaconCount attribute value from TH" - wait: "readAttribute" - attribute: "RxBeaconCount" - PICS: DGTHREAD.C.A002c - - - label: "DUT reads RxBeaconRequestCount attribute value from TH" - wait: "readAttribute" - attribute: "RxBeaconRequestCount" - PICS: DGTHREAD.C.A002d - - - label: "DUT reads RxOtherCount attribute value from TH" - wait: "readAttribute" - attribute: "RxOtherCount" - PICS: DGTHREAD.C.A002e - - - label: "DUT reads RxAddressFilteredCount attribute value from TH" - wait: "readAttribute" - attribute: "RxAddressFilteredCount" - PICS: DGTHREAD.C.A002f - - - label: "DUT reads RxDestAddrFilteredCount attribute value from TH" - wait: "readAttribute" - attribute: "RxDestAddrFilteredCount" - PICS: DGTHREAD.C.A0030 - - - label: "DUT reads RxDuplicatedCount attribute value from TH" - wait: "readAttribute" - attribute: "RxDuplicatedCount" - PICS: DGTHREAD.C.A0031 - - - label: "DUT reads RxErrNoFrameCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrNoFrameCount" - PICS: DGTHREAD.C.A0032 - - - label: "DUT reads RxErrUnknownNeighborCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrUnknownNeighborCount" - PICS: DGTHREAD.C.A0033 - - - label: "DUT reads RxErrInvalidSrcAddrCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrInvalidSrcAddrCount" - PICS: DGTHREAD.C.A0034 - - - label: "DUT reads RxErrSecCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrSecCount" - PICS: DGTHREAD.C.A0035 - - - label: "DUT reads RxErrFcsCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrFcsCount" - PICS: DGTHREAD.C.A0036 - - - label: "DUT reads RxErrOtherCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrOtherCount" - PICS: DGTHREAD.C.A0037 diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1_Simulated.yaml deleted file mode 100644 index 6205550ad8abbc..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1_Simulated.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 53.3.1. [TC-DGWIFI-3.1] Attributes [DUT as Client] - -PICS: - - DGWIFI.C.A - - DGWIFI.C - -config: - nodeId: 0x12344321 - cluster: "WiFi Network Diagnostics" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: BSSID" - PICS: DGWIFI.C.A0000 - wait: "readAttribute" - attribute: "BSSID" - - - label: "Read attribute: SecurityType" - PICS: DGWIFI.C.A0001 - wait: "readAttribute" - attribute: "SecurityType" - - - label: "Read attribute: WiFiVersion" - PICS: DGWIFI.C.A0002 - wait: "readAttribute" - attribute: "WiFiVersion" - - - label: "Read attribute: ChannelNumber" - PICS: DGWIFI.C.A0003 - wait: "readAttribute" - attribute: "ChannelNumber" - - - label: "Read attribute: RSSI" - PICS: DGWIFI.C.A0004 - wait: "readAttribute" - attribute: "RSSI" - - - label: "Read attribute: BeaconLostCount" - PICS: DGWIFI.C.A0005 - wait: "readAttribute" - attribute: "BeaconLostCount" - - - label: "Read attribute: BeaconRxCount" - PICS: DGWIFI.C.A0006 - wait: "readAttribute" - attribute: "BeaconRxCount" - - - label: "Read attribute: PacketMulticastRxCount" - PICS: DGWIFI.C.A0007 - wait: "readAttribute" - attribute: "PacketMulticastRxCount" - - - label: "Read attribute: PacketMulticastTxCount" - PICS: DGWIFI.C.A0008 - wait: "readAttribute" - attribute: "PacketMulticastTxCount" - - - label: "Read attribute: PacketUnicastRxCount" - PICS: DGWIFI.C.A0009 - wait: "readAttribute" - attribute: "PacketUnicastRxCount" - - - label: "Read attribute: PacketUnicastTxCount" - PICS: DGWIFI.C.A000a - wait: "readAttribute" - attribute: "PacketUnicastTxCount" - - - label: "Read attribute: CurrentMaxRate" - PICS: DGWIFI.C.A000b - wait: "readAttribute" - attribute: "CurrentMaxRate" - - - label: "Read attribute: OverrunCount" - PICS: DGWIFI.C.A000c - wait: "readAttribute" - attribute: "OverrunCount" diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index b79bbbd590df01..e27bf45da37446 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -33,70 +33,75 @@ tests: - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." verification: | - ./chip-tool dishwashermodeselect read cluster-revision 1 1 + ./chip-tool dishwashermode read cluster-revision 1 1 - Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 2 on the TH(chip-tool) and below is the sample log provided for the raspi platform: + Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: - [1645775623.658997][3277:3282] CHIP:TOO: ClusterRevision: 1 + [1690365584.246794][27436:27438] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFD DataVersion: 1130015440 + [1690365584.246860][27436:27438] CHIP:TOO: ClusterRevision: 1 disabled: true - label: "Step 3: TH reads from the DUT the FeatureMap attribute." verification: | - ./chip-tool dishwashermodeselect read feature-map 1 1 + ./chip-tool dishwashermode read feature-map 1 1 - On the TH(chip-tool) Log, Verify featureMap value is 1, This value changes depending on DUT implementing the features and below is the sample log provided for the raspi platform: + On the TH(Chip-tool) Log, Verify featureMap value is 1 If TCCM.S.F00(DEPONOFF) true, Otherwise 0, T and below is the sample log provided for the raspi platform: - [1649052001.646939][8355:8360] CHIP:TOO: FeatureMap: 1 + [1690365613.351850][27441:27443] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFC DataVersion: 1130015440 + [1690365613.351911][27441:27443] CHIP:TOO: FeatureMap: 1 disabled: true - label: "Step 4: TH reads from the DUT the AttributeList attribute." verification: | - ./chip-tool dishwashermodeselect read attribute-list 1 1 - - Verify the "AttributeList " should include the mandatory attributes (values 0, 2, 3), - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and - list may include optional attribute(value 0x0004), if MOD.S.A0004(StartUpMode) supports, - list contains feature dependent attribute (values 0x0005), if MOD.S.F00(DEPONOFF) is true on the TH(chip-tool) Log and below is the sample log provided for the raspi platform: - - [1676288620.483812][4014:4016] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_FFFB DataVersion: 2649295313 - [1676288620.483850][4014:4016] CHIP:TOO: AttributeList: 13 entries - [1676288620.483861][4014:4016] CHIP:TOO: [1]: 0 - [1676288620.483870][4014:4016] CHIP:TOO: [2]: 1 - [1676288620.483878][4014:4016] CHIP:TOO: [3]: 65528 - [1676288620.483886][4014:4016] CHIP:TOO: [4]: 65529 - [1676288620.483892][4014:4016] CHIP:TOO: [5]: 65530 - [1676288620.483899][4014:4016] CHIP:TOO: [6]: 65531 - [1676288620.483906][4014:4016] CHIP:TOO: [7]: 4293984257 - [1676288620.483915][4014:4016] CHIP:TOO: [8]: 2 - [1676288620.483922][4014:4016] CHIP:TOO: [9]: 3 - [1676288620.483929][4014:4016] CHIP:TOO: [10]: 4 - [1676288620.483934][4014:4016] CHIP:TOO: [11]: 5 - [1676288620.483941][4014:4016] CHIP:TOO: [12]: 65532 - [1676288620.483947][4014:4016] CHIP:TOO: [13]: 65533 - [1676288620.484034][4014:4016] CHIP:EM: <<< [E:29816i M:167554497 (Ack:41020138)] (S) Msg TX to 1:000000000 - - - *NOTE* : This sample attribute list reflects the currently implemented attributes on the all-clusters-app. + ./chip-tool dishwashermode read attribute-list 1 1 + + Verify the "AttributeList " should include the mandatory attributes (values 0, 1), + - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and + - list may include optional attribute(value 0x0002), if MOD.S.A0004(StartUpMode) supports, + - list contains feature dependent attribute (values 0x0003), if MOD.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689930814.439457][300741:300743] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFB DataVersion: 2031856391 + [1689930814.439500][300741:300743] CHIP:TOO: AttributeList: 10 entries + [1689930814.439520][300741:300743] CHIP:TOO: [1]: 0 + [1689930814.439538][300741:300743] CHIP:TOO: [2]: 1 + [1689930814.439565][300741:300743] CHIP:TOO: [3]: 2 + [1689930814.439584][300741:300743] CHIP:TOO: [4]: 3 + [1689930814.439599][300741:300743] CHIP:TOO: [5]: 65528 + [1689930814.439602][300741:300743] CHIP:TOO: [6]: 65529 + [1689930814.439604][300741:300743] CHIP:TOO: [7]: 65530 + [1689930814.439616][300741:300743] CHIP:TOO: [8]: 65531 + [1689930814.439619][300741:300743] CHIP:TOO: [9]: 65532 + [1689930814.439621][300741:300743] CHIP:TOO: [10]: 65533 disabled: true - - label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute." + - label: "Step 5: TH reads from the DUT the EventList attribute." verification: | - ./chip-tool dishwashermodeselect read accepted-command-list 1 1 + ./chip-tool dishwashermode read event-list 1 1 - Verify the "AcceptedCommandList" contains feature dependent commands - if !MOD.S.F02(DEPCTM) feature supports list includes(value 0x0000) and - if MOD.S.F01(EXT) feature supports list includes(value 0x0001) on the TH (chip-tool) and below is the sample log provided for the raspi platform: + Verify "EventList" contains a list of supported events, for this cluster the list is emty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - [1650274602.826352][8965:8970] CHIP:TOO: AcceptedCommandList: 1 entries - [1650274602.826442][8965:8970] CHIP:TOO: [1]: 0 + [1689996691.141081][359868:359870] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFA DataVersion: 1427220838 + [1689996691.141341][359868:359870] CHIP:TOO: EventList: 0 entries disabled: true - - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." + - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." verification: | - ./chip-tool dishwashermodeselect read generated-command-list 1 1 + ./chip-tool dishwashermode read accepted-command-list 1 1 - Verify "GeneratedCommandList" contains feature dependent commands - if MOD.S.F01(EXT) feature supports list includes(value 0x0002), otherwise value is 0 on the TH(chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the "AcceptedCommandList" contains a list of mandatory commands (value 0) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - [1650274662.075309][8972:8977] CHIP:TOO: GeneratedCommandList: 0 entries + [1690365651.143190][27451:27453] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFF9 DataVersion: 1130015440 + [1690365651.143256][27451:27453] CHIP:TOO: AcceptedCommandList: 1 entries + [1690365651.143284][27451:27453] CHIP:TOO: [1]: 0 + disabled: true + + - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." + verification: | + ./chip-tool dishwashermode read generated-command-list 1 1 + + Verify "GeneratedCommandList" contains a list of mandatory commands (value 1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689997224.280302][360025:360027] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFF8 DataVersion: 1427220838 + [1689997224.280330][360025:360027] CHIP:TOO: GeneratedCommandList: 1 entries + [1689997224.280346][360025:360027] CHIP:TOO: [1]: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index a4304e3d1d715c..34053c3f7f5ad2 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -34,85 +34,82 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } + ./chip-tool dishwashermode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that list should contain at least one entry + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value + - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 + - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1689997453.610123][360094:360096] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1427220838 + [1689997453.610169][360094:360096] CHIP:TOO: SupportedModes: 3 entries + [1689997453.610483][360094:360096] CHIP:TOO: [1]: { + [1689997453.610503][360094:360096] CHIP:TOO: Label: Normal + [1689997453.610530][360094:360096] CHIP:TOO: Mode: 0 + [1689997453.610536][360094:360096] CHIP:TOO: ModeTags: 1 entries + [1689997453.610540][360094:360096] CHIP:TOO: [1]: { + [1689997453.610542][360094:360096] CHIP:TOO: Value: 16384 + [1689997453.610551][360094:360096] CHIP:TOO: } + [1689997453.610553][360094:360096] CHIP:TOO: } + [1689997453.610559][360094:360096] CHIP:TOO: [2]: { + [1689997453.610571][360094:360096] CHIP:TOO: Label: Heavy + [1689997453.610574][360094:360096] CHIP:TOO: Mode: 1 + [1689997453.610577][360094:360096] CHIP:TOO: ModeTags: 2 entries + [1689997453.610580][360094:360096] CHIP:TOO: [1]: { + [1689997453.610582][360094:360096] CHIP:TOO: Value: 7 + [1689997453.610583][360094:360096] CHIP:TOO: } + [1689997453.610585][360094:360096] CHIP:TOO: [2]: { + [1689997453.610587][360094:360096] CHIP:TOO: Value: 16385 + [1689997453.610588][360094:360096] CHIP:TOO: } + [1689997453.610590][360094:360096] CHIP:TOO: } + [1689997453.610594][360094:360096] CHIP:TOO: [3]: { + [1689997453.610595][360094:360096] CHIP:TOO: Label: Light + [1689997453.610597][360094:360096] CHIP:TOO: Mode: 2 + [1689997453.610600][360094:360096] CHIP:TOO: ModeTags: 3 entries + [1689997453.610602][360094:360096] CHIP:TOO: [1]: { + [1689997453.610604][360094:360096] CHIP:TOO: Value: 16386 + [1689997453.610605][360094:360096] CHIP:TOO: } + [1689997453.610607][360094:360096] CHIP:TOO: [2]: { + [1689997453.610609][360094:360096] CHIP:TOO: Value: 8 + [1689997453.610610][360094:360096] CHIP:TOO: } + [1689997453.610612][360094:360096] CHIP:TOO: [3]: { + [1689997453.610614][360094:360096] CHIP:TOO: Value: 2 + [1689997453.610615][360094:360096] CHIP:TOO: } + [1689997453.610617][360094:360096] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 - - [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 + [1689997642.999367][360160:360162] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1994417976 + [1689997642.999395][360160:360162] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the OnMode attribute." PICS: DISHM.S.A0003 verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 - - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform: - + ./chip-tool dishwashermode read on-mode 1 1 - [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null + [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 4277065072 [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null disabled: true - label: "Step 5: TH reads from the DUT the StartUpMode attribute." PICS: DISHM.S.A0002 verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 + ./chip-tool dishwashermode read start-up-mode 1 1 - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null - [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 - [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 + [1689997956.636092][360258:360260] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 1994417976 + [1689997956.636125][360258:360260] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 57546907ea001a..767bf66498b0fe 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -24,6 +24,28 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool dishwashermode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + + [1690188722.057858][15975:15977] CHIP:DMG: StatusIB = + [1690188722.057862][15975:15977] CHIP:DMG: { + [1690188722.057865][15975:15977] CHIP:DMG: status = 0x00 (SUCCESS), + [1690188722.057867][15975:15977] CHIP:DMG: }, + disabled: true + + - label: "Precondition" + verification: | + 1 Dishwasher Mode and OnOff clusters are available on the same endpoint + + 2 The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,152 +56,193 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and - Save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } - disabled: true - - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + ./chip-tool dishwashermode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1689998005.121163][360287:360289] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1994417976 + [1689998005.121241][360287:360289] CHIP:TOO: SupportedModes: 3 entries + [1689998005.121250][360287:360289] CHIP:TOO: [1]: { + [1689998005.121256][360287:360289] CHIP:TOO: Label: Normal + [1689998005.121261][360287:360289] CHIP:TOO: Mode: 0 + [1689998005.121264][360287:360289] CHIP:TOO: ModeTags: 1 entries + [1689998005.121268][360287:360289] CHIP:TOO: [1]: { + [1689998005.121270][360287:360289] CHIP:TOO: Value: 16384 + [1689998005.121272][360287:360289] CHIP:TOO: } + [1689998005.121274][360287:360289] CHIP:TOO: } + [1689998005.121278][360287:360289] CHIP:TOO: [2]: { + [1689998005.121279][360287:360289] CHIP:TOO: Label: Heavy + [1689998005.121280][360287:360289] CHIP:TOO: Mode: 1 + [1689998005.121283][360287:360289] CHIP:TOO: ModeTags: 2 entries + [1689998005.121285][360287:360289] CHIP:TOO: [1]: { + [1689998005.121287][360287:360289] CHIP:TOO: Value: 7 + [1689998005.121288][360287:360289] CHIP:TOO: } + [1689998005.121291][360287:360289] CHIP:TOO: [2]: { + [1689998005.121292][360287:360289] CHIP:TOO: Value: 16385 + [1689998005.121293][360287:360289] CHIP:TOO: } + [1689998005.121295][360287:360289] CHIP:TOO: } + [1689998005.121299][360287:360289] CHIP:TOO: [3]: { + [1689998005.121300][360287:360289] CHIP:TOO: Label: Light + [1689998005.121302][360287:360289] CHIP:TOO: Mode: 2 + [1689998005.121305][360287:360289] CHIP:TOO: ModeTags: 3 entries + [1689998005.121307][360287:360289] CHIP:TOO: [1]: { + [1689998005.121309][360287:360289] CHIP:TOO: Value: 16386 + [1689998005.121310][360287:360289] CHIP:TOO: } + [1689998005.121312][360287:360289] CHIP:TOO: [2]: { + [1689998005.121314][360287:360289] CHIP:TOO: Value: 8 + [1689998005.121315][360287:360289] CHIP:TOO: } + [1689998005.121317][360287:360289] CHIP:TOO: [3]: { + [1689998005.121319][360287:360289] CHIP:TOO: Value: 2 + [1689998005.121320][360287:360289] CHIP:TOO: } + [1689998005.121321][360287:360289] CHIP:TOO: } + disabled: true + + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - Save the value as old_current_mode_dut - - Select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" PICS: DISHM.S.C00.Rsp verification: | - ChangeToModeWithStatus Command is not impleented. + ./chip-tool dishwashermode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690185977.976163][15730:15732] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690185977.976178][15730:15732] CHIP:TOO: ChangeToModeResponse: { + [1690185977.976182][15730:15732] CHIP:TOO: status: 0 + [1690185977.976185][15730:15732] CHIP:TOO: } disabled: true - label: - "Step 4: Manually put the device in a state from which it will FAIL to + "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.DISHM.MODE_CHANGE_FAIL" + PICS: PIXIT.DISHM.CAN_TEST_MODE_FAILURE verification: | - ChangeToModeWithStatus Command is not implented. + Manual operation required disabled: true - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_FAIL" - PICS: DISHM.S.C00.Rsp + PICS: PIXIT.DISHM.CAN_TEST_MODE_FAILURE && DISHM.S.C00.Rsp verification: | - ChangeToModeWithStatus Command is not implented. + Note : Please skip this step as SDK is not enabled with this failure response + + ./chip-tool dishwashermode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and below is the sample log provided for the raspi platform: + + [1690264785.719168][29854:29856] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0059 Command=0x0000_0001 + [1690264785.719200][29854:29856] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690264785.719263][29854:29856] CHIP:TOO: ChangeToModeResponse: { + [1690264785.719283][29854:29856] CHIP:TOO: status: 0 + [1690264785.719297][29854:29856] CHIP:TOO: } disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | + ./chip-tool dishwashermode read current-mode 1 1 + + Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690186182.071331][15758:15760] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242726 + [1690186182.071346][15758:15760] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 8: Manually put the device in a state from which it will + "Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.DISHM.MODE_CHANGE_OK" verification: | - + Manual operation required disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | + ./chip-tool dishwashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690186182.071331][15758:15760] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242726 + [1690186182.071346][15758:15760] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_OK" PICS: DISHM.S.C00.Rsp verification: | + ./chip-tool dishwashermode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + [1690187929.904831][15897:15899] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690187929.904845][15897:15899] CHIP:TOO: ChangeToModeResponse: { + [1690187929.904852][15897:15899] CHIP:TOO: status: 0 + [1690187929.904855][15897:15899] CHIP:TOO: } disabled: true - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | + ./chip-tool dishwashermode read current-mode 1 1 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 + + [1690187960.116433][15901:15903] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242727 + [1690187960.116478][15901:15903] CHIP:TOO: CurrentMode: 2 disabled: true - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: DISHM.S.C00.Rsp verification: | + ./chip-tool dishwashermode change-to-mode 4 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: + [1690188004.105157][15906:15908] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690188004.105172][15906:15908] CHIP:TOO: ChangeToModeResponse: { + [1690188004.105178][15906:15908] CHIP:TOO: status: 1 + [1690188004.105181][15906:15908] CHIP:TOO: } disabled: true - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + - label: "Step 14: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | + ./chip-tool dishwashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 + [1690187960.116433][15901:15903] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242727 + [1690187960.116478][15901:15903] CHIP:TOO: CurrentMode: 2 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index 8836ca0ba9595f..78974199d806b8 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -24,6 +24,28 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool dishwashermode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + + [1690188722.057858][15975:15977] CHIP:DMG: StatusIB = + [1690188722.057862][15975:15977] CHIP:DMG: { + [1690188722.057865][15975:15977] CHIP:DMG: status = 0x00 (SUCCESS), + [1690188722.057867][15975:15977] CHIP:DMG: }, + disabled: true + + - label: "Precondition" + verification: | + 1 Dishwasher Mode and OnOff clusters are available on the same endpoint + + 2 The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,77 +56,75 @@ tests: - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: DISHM.S.A0003 && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 + ./chip-tool dishwashermode read on-mode 1 1 - On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 - [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 + [1690188734.934221][15978:15980] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 74242734 + [1690188734.934259][15978:15980] CHIP:TOO: OnMode: 0 disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute is an integer. + Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 + [1690188747.957507][15982:15984] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242734 + [1690188747.957564][15982:15984] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. - Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } + ./chip-tool dishwashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690188771.532158][15986:15988] CHIP:DMG: } + [1690188771.532258][15986:15988] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242734 + [1690188771.532287][15986:15988] CHIP:TOO: SupportedModes: 3 entries + [1690188771.532305][15986:15988] CHIP:TOO: [1]: { + [1690188771.532309][15986:15988] CHIP:TOO: Label: Normal + [1690188771.532316][15986:15988] CHIP:TOO: Mode: 0 + [1690188771.532321][15986:15988] CHIP:TOO: ModeTags: 1 entries + [1690188771.532327][15986:15988] CHIP:TOO: [1]: { + [1690188771.532331][15986:15988] CHIP:TOO: Value: 16384 + [1690188771.532334][15986:15988] CHIP:TOO: } + [1690188771.532338][15986:15988] CHIP:TOO: } + [1690188771.532345][15986:15988] CHIP:TOO: [2]: { + [1690188771.532348][15986:15988] CHIP:TOO: Label: Heavy + [1690188771.532352][15986:15988] CHIP:TOO: Mode: 1 + [1690188771.532358][15986:15988] CHIP:TOO: ModeTags: 2 entries + [1690188771.532363][15986:15988] CHIP:TOO: [1]: { + [1690188771.532366][15986:15988] CHIP:TOO: Value: 7 + [1690188771.532368][15986:15988] CHIP:TOO: } + [1690188771.532372][15986:15988] CHIP:TOO: [2]: { + [1690188771.532374][15986:15988] CHIP:TOO: Value: 16385 + [1690188771.532376][15986:15988] CHIP:TOO: } + [1690188771.532379][15986:15988] CHIP:TOO: } + [1690188771.532386][15986:15988] CHIP:TOO: [3]: { + [1690188771.532388][15986:15988] CHIP:TOO: Label: Light + [1690188771.532390][15986:15988] CHIP:TOO: Mode: 2 + [1690188771.532395][15986:15988] CHIP:TOO: ModeTags: 3 entries + [1690188771.532398][15986:15988] CHIP:TOO: [1]: { + [1690188771.532401][15986:15988] CHIP:TOO: Value: 16386 + [1690188771.532403][15986:15988] CHIP:TOO: } + [1690188771.532406][15986:15988] CHIP:TOO: [2]: { + [1690188771.532409][15986:15988] CHIP:TOO: Value: 8 + [1690188771.532411][15986:15988] CHIP:TOO: } + [1690188771.532414][15986:15988] CHIP:TOO: [3]: { + [1690188771.532417][15986:15988] CHIP:TOO: Value: 2 + [1690188771.532419][15986:15988] CHIP:TOO: } + [1690188771.532421][15986:15988] CHIP:TOO: } disabled: true - label: @@ -112,16 +132,14 @@ tests: to new_mode_th" PICS: DISHM.S.C00.Rsp && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect change-to-mode 2 1 1 + ./chip-tool dishwashermode change-to-mode 2 1 1 - On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: + [1690198333.074192][17405:17407] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690198333.074208][17405:17407] CHIP:TOO: ChangeToModeResponse: { + [1690198333.074213][17405:17407] CHIP:TOO: status: 0 + [1690198333.074216][17405:17407] CHIP:TOO: } disabled: true - label: "Step 6: TH sends a Off command to the DUT" @@ -131,7 +149,6 @@ tests: On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = [1684931101.118659][20709:20711] CHIP:DMG: { [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), [1684931101.118665][20709:20711] CHIP:DMG: }, @@ -144,7 +161,6 @@ tests: On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = [1684931217.055517][20729:20731] CHIP:DMG: { [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), [1684931217.055523][20729:20731] CHIP:DMG: }, @@ -153,10 +169,10 @@ tests: - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 2 + [1690188859.713934][16004:16006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242736 + [1690188859.713980][16004:16006] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index 960e14a4046d90..737dd31cc7c433 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -24,6 +24,19 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To Execute the TC-DISHM-3.2 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,108 +47,179 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: DISHM.S.A0002 verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 + ./chip-tool dishwashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer or null + - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null - On TH(chip-tool), Verify StartUpMode attribute value is an integer. save the value as startup_mode_dut and below is the sample log provided for the raspi platform: + NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 - [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 + [1690188941.380388][16015:16017] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 74242738 + [1690188941.380430][16015:16017] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: DISHM.S.A0000 + verification: | + ./chip-tool dishwashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690188996.754102][16022:16024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242738 + [1690188996.754208][16022:16024] CHIP:TOO: SupportedModes: 3 entries + [1690188996.754248][16022:16024] CHIP:TOO: [1]: { + [1690188996.754258][16022:16024] CHIP:TOO: Label: Normal + [1690188996.754270][16022:16024] CHIP:TOO: Mode: 0 + [1690188996.754285][16022:16024] CHIP:TOO: ModeTags: 1 entries + [1690188996.754302][16022:16024] CHIP:TOO: [1]: { + [1690188996.754314][16022:16024] CHIP:TOO: Value: 16384 + [1690188996.754325][16022:16024] CHIP:TOO: } + [1690188996.754336][16022:16024] CHIP:TOO: } + [1690188996.754360][16022:16024] CHIP:TOO: [2]: { + [1690188996.754369][16022:16024] CHIP:TOO: Label: Heavy + [1690188996.754378][16022:16024] CHIP:TOO: Mode: 1 + [1690188996.754393][16022:16024] CHIP:TOO: ModeTags: 2 entries + [1690188996.754407][16022:16024] CHIP:TOO: [1]: { + [1690188996.754416][16022:16024] CHIP:TOO: Value: 7 + [1690188996.754425][16022:16024] CHIP:TOO: } + [1690188996.754439][16022:16024] CHIP:TOO: [2]: { + [1690188996.754450][16022:16024] CHIP:TOO: Value: 16385 + [1690188996.754459][16022:16024] CHIP:TOO: } + [1690188996.754469][16022:16024] CHIP:TOO: } + [1690188996.754493][16022:16024] CHIP:TOO: [3]: { + [1690188996.754501][16022:16024] CHIP:TOO: Label: Light + [1690188996.754511][16022:16024] CHIP:TOO: Mode: 2 + [1690188996.754548][16022:16024] CHIP:TOO: ModeTags: 3 entries + [1690188996.754564][16022:16024] CHIP:TOO: [1]: { + [1690188996.754574][16022:16024] CHIP:TOO: Value: 16386 + [1690188996.754583][16022:16024] CHIP:TOO: } + [1690188996.754597][16022:16024] CHIP:TOO: [2]: { + [1690188996.754606][16022:16024] CHIP:TOO: Value: 8 + [1690188996.754615][16022:16024] CHIP:TOO: } + [1690188996.754629][16022:16024] CHIP:TOO: [3]: { + [1690188996.754638][16022:16024] CHIP:TOO: Value: 2 + [1690188996.754646][16022:16024] CHIP:TOO: } + [1690188996.754654][16022:16024] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: DISHM.S.A0002 + verification: | + ./chip-tool dishwashermode write start-up-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690188912.259778][16011:16013] CHIP:DMG: { + [1690188912.259790][16011:16013] CHIP:DMG: status = 0x00 (SUCCESS), + [1690188912.259800][16011:16013] CHIP:DMG: }, + [1690188912.259813][16011:16013] CHIP:DMG: + disabled: true + + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify CurrentMode attribute value is an integer, - save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + [1690189040.789208][16040:16042] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1012425326 + [1690189040.789223][16040:16042] CHIP:TOO: CurrentMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. - Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } + ./chip-tool dishwashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690188996.754102][16022:16024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242738 + [1690188996.754208][16022:16024] CHIP:TOO: SupportedModes: 3 entries + [1690188996.754248][16022:16024] CHIP:TOO: [1]: { + [1690188996.754258][16022:16024] CHIP:TOO: Label: Normal + [1690188996.754270][16022:16024] CHIP:TOO: Mode: 0 + [1690188996.754285][16022:16024] CHIP:TOO: ModeTags: 1 entries + [1690188996.754302][16022:16024] CHIP:TOO: [1]: { + [1690188996.754314][16022:16024] CHIP:TOO: Value: 16384 + [1690188996.754325][16022:16024] CHIP:TOO: } + [1690188996.754336][16022:16024] CHIP:TOO: } + [1690188996.754360][16022:16024] CHIP:TOO: [2]: { + [1690188996.754369][16022:16024] CHIP:TOO: Label: Heavy + [1690188996.754378][16022:16024] CHIP:TOO: Mode: 1 + [1690188996.754393][16022:16024] CHIP:TOO: ModeTags: 2 entries + [1690188996.754407][16022:16024] CHIP:TOO: [1]: { + [1690188996.754416][16022:16024] CHIP:TOO: Value: 7 + [1690188996.754425][16022:16024] CHIP:TOO: } + [1690188996.754439][16022:16024] CHIP:TOO: [2]: { + [1690188996.754450][16022:16024] CHIP:TOO: Value: 16385 + [1690188996.754459][16022:16024] CHIP:TOO: } + [1690188996.754469][16022:16024] CHIP:TOO: } + [1690188996.754493][16022:16024] CHIP:TOO: [3]: { + [1690188996.754501][16022:16024] CHIP:TOO: Label: Light + [1690188996.754511][16022:16024] CHIP:TOO: Mode: 2 + [1690188996.754548][16022:16024] CHIP:TOO: ModeTags: 3 entries + [1690188996.754564][16022:16024] CHIP:TOO: [1]: { + [1690188996.754574][16022:16024] CHIP:TOO: Value: 16386 + [1690188996.754583][16022:16024] CHIP:TOO: } + [1690188996.754597][16022:16024] CHIP:TOO: [2]: { + [1690188996.754606][16022:16024] CHIP:TOO: Value: 8 + [1690188996.754615][16022:16024] CHIP:TOO: } + [1690188996.754629][16022:16024] CHIP:TOO: [3]: { + [1690188996.754638][16022:16024] CHIP:TOO: Value: 2 + [1690188996.754646][16022:16024] CHIP:TOO: } + [1690188996.754654][16022:16024] CHIP:TOO: } disabled: true - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: DISHM.S.C00.Rsp verification: | - ./chip-tool dishwashermodeselect change-to-mode 2 1 1 - + ./chip-tool dishwashermode change-to-mode 2 1 1 - On TH(chip-tool) , Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931419.768138][20792:20794] CHIP:DMG: StatusIB = - [1684931419.768143][20792:20794] CHIP:DMG: { - [1684931419.768148][20792:20794] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931419.768152][20792:20794] CHIP:DMG: }, + [1690265961.529808][30174:30176] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690265961.529857][30174:30176] CHIP:TOO: ChangeToModeResponse: { + [1690265961.529880][30174:30176] CHIP:TOO: status: 0 + [1690265961.529891][30174:30176] CHIP:TOO: } disabled: true - - label: "Step 6: Physically power cycle the device" + - label: "Step 8: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 9: TH reads from the DUT the StartUpMode attribute." + PICS: DISHM.S.A0002 + verification: | + ./chip-tool dishwashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer. + - Save the value as new_start_up_mode_dut and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + + [1690188941.380388][16015:16017] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 74242738 + [1690188941.380430][16015:16017] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - on TH(chip-tool), Verify that CurrentMode attribute value is same as value recorded in step 1 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + [1690189040.789208][16040:16042] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1012425326 + [1690189040.789223][16040:16042] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index f2fec608881422..3efe1d547d7a2e 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -24,6 +24,19 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To Execute the TC-DISH-3.3 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,128 +47,181 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: DISHM.S.A0002 verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 + ./chip-tool dishwashermode read start-up-mode 1 1 - On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that StartUpMode attribute value is an integer or Null + - Save the value as startup_mode_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is null + NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 + [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: null + disabled: true + + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: DISHM.S.A0000 + verification: | + ./chip-tool dishwashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690189296.612007][16077:16079] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1012425327 + [1690189296.612104][16077:16079] CHIP:TOO: SupportedModes: 3 entries + [1690189296.612139][16077:16079] CHIP:TOO: [1]: { + [1690189296.612149][16077:16079] CHIP:TOO: Label: Normal + [1690189296.612168][16077:16079] CHIP:TOO: Mode: 0 + [1690189296.612189][16077:16079] CHIP:TOO: ModeTags: 1 entries + [1690189296.612214][16077:16079] CHIP:TOO: [1]: { + [1690189296.612224][16077:16079] CHIP:TOO: Value: 16384 + [1690189296.612234][16077:16079] CHIP:TOO: } + [1690189296.612243][16077:16079] CHIP:TOO: } + [1690189296.612264][16077:16079] CHIP:TOO: [2]: { + [1690189296.612273][16077:16079] CHIP:TOO: Label: Heavy + [1690189296.612282][16077:16079] CHIP:TOO: Mode: 1 + [1690189296.612296][16077:16079] CHIP:TOO: ModeTags: 2 entries + [1690189296.612309][16077:16079] CHIP:TOO: [1]: { + [1690189296.612318][16077:16079] CHIP:TOO: Value: 7 + [1690189296.612327][16077:16079] CHIP:TOO: } + [1690189296.612339][16077:16079] CHIP:TOO: [2]: { + [1690189296.612348][16077:16079] CHIP:TOO: Value: 16385 + [1690189296.612356][16077:16079] CHIP:TOO: } + [1690189296.612365][16077:16079] CHIP:TOO: } + [1690189296.612384][16077:16079] CHIP:TOO: [3]: { + [1690189296.612392][16077:16079] CHIP:TOO: Label: Light + [1690189296.612398][16077:16079] CHIP:TOO: Mode: 2 + [1690189296.612413][16077:16079] CHIP:TOO: ModeTags: 3 entries + [1690189296.612425][16077:16079] CHIP:TOO: [1]: { + [1690189296.612433][16077:16079] CHIP:TOO: Value: 16386 + [1690189296.612443][16077:16079] CHIP:TOO: } + [1690189296.612456][16077:16079] CHIP:TOO: [2]: { + [1690189296.612465][16077:16079] CHIP:TOO: Value: 8 + [1690189296.612473][16077:16079] CHIP:TOO: } + [1690189296.612485][16077:16079] CHIP:TOO: [3]: { + [1690189296.612494][16077:16079] CHIP:TOO: Value: 2 + [1690189296.612502][16077:16079] CHIP:TOO: } + [1690189296.612511][16077:16079] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: DISHM.S.A0002 + verification: | + ./chip-tool dishwashermode write start-up-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690188912.259766][16011:16013] CHIP:DMG: StatusIB = + [1690188912.259778][16011:16013] CHIP:DMG: { + [1690188912.259790][16011:16013] CHIP:DMG: status = 0x00 (SUCCESS), + [1690188912.259800][16011:16013] CHIP:DMG: }, + [1690188912.259813][16011:16013] CHIP:DMG: disabled: true - - label: "Step 3: TH reads from the DUT the OnMode attribute." + - label: "Step 5: TH reads from the DUT the OnMode attribute." PICS: DISHM.S.A0003 && DISHM.S.A0002 verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 + Set onmode to any integer value because as default it value has null. + + ./chip-tool dishwashermode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690189187.414225][16062:16064] CHIP:DMG: StatusIB = + [1690189187.414237][16062:16064] CHIP:DMG: { + [1690189187.414249][16062:16064] CHIP:DMG: status = 0x00 (SUCCESS), + [1690189187.414260][16062:16064] CHIP:DMG: }, + - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: + ./chip-tool dishwashermode read on-mode 1 1 + On TH(chip-tool), Verify that OnMode attribute value is an integer value + - Save the value as old_on_mode_dut, below is the sample log provided for the raspi platform, here OnMode attribute value is 0 - [1654780979.979743][61542:61547] CHIP:DMG: } - [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 + NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. Else proceed to step 8. + + [1690189501.554415][16104:16106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 1012425329 + [1690189501.554429][16104:16106] CHIP:TOO: OnMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 && DISHM.S.A0002 verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. - Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } + ./chip-tool dishwashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690189296.612007][16077:16079] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1012425327 + [1690189296.612104][16077:16079] CHIP:TOO: SupportedModes: 3 entries + [1690189296.612139][16077:16079] CHIP:TOO: [1]: { + [1690189296.612149][16077:16079] CHIP:TOO: Label: Normal + [1690189296.612168][16077:16079] CHIP:TOO: Mode: 0 + [1690189296.612189][16077:16079] CHIP:TOO: ModeTags: 1 entries + [1690189296.612214][16077:16079] CHIP:TOO: [1]: { + [1690189296.612224][16077:16079] CHIP:TOO: Value: 16384 + [1690189296.612234][16077:16079] CHIP:TOO: } + [1690189296.612243][16077:16079] CHIP:TOO: } + [1690189296.612264][16077:16079] CHIP:TOO: [2]: { + [1690189296.612273][16077:16079] CHIP:TOO: Label: Heavy + [1690189296.612282][16077:16079] CHIP:TOO: Mode: 1 + [1690189296.612296][16077:16079] CHIP:TOO: ModeTags: 2 entries + [1690189296.612309][16077:16079] CHIP:TOO: [1]: { + [1690189296.612318][16077:16079] CHIP:TOO: Value: 7 + [1690189296.612327][16077:16079] CHIP:TOO: } + [1690189296.612339][16077:16079] CHIP:TOO: [2]: { + [1690189296.612348][16077:16079] CHIP:TOO: Value: 16385 + [1690189296.612356][16077:16079] CHIP:TOO: } + [1690189296.612365][16077:16079] CHIP:TOO: } + [1690189296.612384][16077:16079] CHIP:TOO: [3]: { + [1690189296.612392][16077:16079] CHIP:TOO: Label: Light + [1690189296.612398][16077:16079] CHIP:TOO: Mode: 2 + [1690189296.612413][16077:16079] CHIP:TOO: ModeTags: 3 entries + [1690189296.612425][16077:16079] CHIP:TOO: [1]: { + [1690189296.612433][16077:16079] CHIP:TOO: Value: 16386 + [1690189296.612443][16077:16079] CHIP:TOO: } + [1690189296.612456][16077:16079] CHIP:TOO: [2]: { + [1690189296.612465][16077:16079] CHIP:TOO: Value: 8 + [1690189296.612473][16077:16079] CHIP:TOO: } + [1690189296.612485][16077:16079] CHIP:TOO: [3]: { + [1690189296.612494][16077:16079] CHIP:TOO: Value: 2 + [1690189296.612502][16077:16079] CHIP:TOO: } + [1690189296.612511][16077:16079] CHIP:TOO: } disabled: true - label: - "Step 5: TH writes to the DUT the OnMode attribute with the + "Step 7: TH writes to the DUT the OnMode attribute with the new_mode_th value" PICS: DISHM.S.A0003 verification: | - ./chip-tool dishwashermodeselect write on-mode 7 1 1 + ./chip-tool dishwashermode write on-mode 2 1 1 On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = - [1651099941884] [84269:7567211] CHIP: [DMG] [ - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, - [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, - [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, - [1651099941887] [84269:7567211] CHIP: [DMG] } - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] ], - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 - [1651099941887] [84269:7567211] CHIP: [DMG] } + [1690189470.746137][16086:16088] CHIP:DMG: { + [1690189470.746140][16086:16088] CHIP:DMG: status = 0x00 (SUCCESS), + [1690189470.746142][16086:16088] CHIP:DMG: }, disabled: true - - label: "Step 6: TH reads from the DUT the OnMode attribute." + - label: "Step 8: TH reads from the DUT the OnMode attribute." PICS: DISHM.S.A0003 && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 + ./chip-tool dishwashermode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as new_on_mode_dut and is equal to new_mode_th and below is the sample log provided for the raspi platform, here OnMode attribute value is 2 - [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 + [1690189501.554415][16104:16106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 1012425329 + [1690189501.554429][16104:16106] CHIP:TOO: OnMode: 2 disabled: true - label: - "Step 7: TH writes to the DUT the StartUpOnOff attribute with the + "Step 9: TH writes to the DUT the StartUpOnOff attribute with the value 1." PICS: OO.S.A4003 verification: | @@ -163,44 +229,34 @@ tests: On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651101661959] [90832:7598169] CHIP: [DMG] WriteResponseMessage = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIBs = - [1651101661959] [90832:7598169] CHIP: [DMG] [ - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIB = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] AttributePathIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] Endpoint = 0x1, - [1651101661960] [90832:7598169] CHIP: [DMG] Cluster = 0x6, - [1651101661960] [90832:7598169] CHIP: [DMG] Attribute = 0x0000_4003, - [1651101661960] [90832:7598169] CHIP: [DMG] } - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] StatusIB = [1651101661960] [90832:7598169] CHIP: [DMG] { [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] ], - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 - [1651101661960] [90832:7598169] CHIP: [DMG] } disabled: true - - label: "Step 8: Physically power cycle the device" + - label: "Step 10: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 11: TH reads from the DUT the StartUpMode attribute." + PICS: DISHM.S.A0002 + verification: | + ./chip-tool dishwashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is 0 + + [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 + [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 + disabled: true + + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_on_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 - [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 + [1690189536.790233][16118:16120] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 4080703118 + [1690189536.790280][16118:16120] CHIP:TOO: CurrentMode: 2 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml index 2e9008d4eca7b4..686061edda9c34 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml @@ -583,7 +583,7 @@ tests: constraints: type: int16u minValue: 0 - maxValue: 65534 + maxValue: 255 - label: "Step 17b: TH writes MinRFIDCodeLength attribute as 17" PICS: DRLK.S.F01 && DRLK.S.A001a diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml index 38290883e3b699..4481532c0ca1af 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml @@ -227,7 +227,7 @@ tests: response: error: FAILURE - - label: "TStep 10a: H reads the WrongCodeEntryLimit attribute from the DUT" + - label: "Step 10a: H reads the WrongCodeEntryLimit attribute from the DUT" PICS: DRLK.S.A0030 command: "readAttribute" attribute: "WrongCodeEntryLimit" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml index 9b04eb751ec30d..e1169d4acd1aeb 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml @@ -219,120 +219,60 @@ tests: - name: "Status" constraints: anyOf: [0x2, 0x3] - - name: "UserIndex" - value: null - label: "Step 6b: TH sends Set Credential Command to DUT and Verify that the - DUT sends Set Credential Response command with response as OCCUPIED if - the CredentialIndex is repeated" - verification: | - ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 1}' 123456 1 null null 1 1 --timedInteractionTimeoutMs 1000 - - Verify "DUT sends Set Credential Response command with response as DUPLICATE or OCCUPIED" on the TH(Chip-tool) Log: - - [1660216276.191641][71849:71854] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 - [1660216276.191673][71849:71854] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 - [1660216276.191725][71849:71854] CHIP:TOO: SetCredentialResponse: { - [1660216276.191752][71849:71854] CHIP:TOO: status: 2 - [1660216276.191764][71849:71854] CHIP:TOO: userIndex: null - [1660216276.191776][71849:71854] CHIP:TOO: nextCredentialIndex: 2 - [1660216276.191798][71849:71854] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + DUT sends Set Credential Response command with status as DUPLICATE or + OCCUPIED." + PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + command: "SetCredential" + timedInteractionTimeoutMs: 10000 arguments: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #- label: - # "Step 6b: TH sends Set Credential Command to DUT and Verify that the DUT sends - # Set Credential Response command with response as OCCUPIED if the - # CredentialIndex is repeated" - # PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx - # command: "SetCredential" - # timedInteractionTimeoutMs: 10000 - # arguments: - # values: - # - name: "OperationType" - # value: 0 - # - name: "Credential" - # value: { CredentialType: 1, CredentialIndex: 1 } - # - name: "CredentialData" - # value: "123456" - # - name: "UserIndex" - # value: 1 - # - name: "UserStatus" - # value: null - # - name: "UserType" - # value: null - # response: - # values: - # - name: "Status" - # constraints: - # anyOf: [0x2, 0x3] - # - name: "UserIndex" - # value: null + - name: "OperationType" + value: 0 + - name: "Credential" + value: { CredentialType: 1, CredentialIndex: 1 } + - name: "CredentialData" + value: "123457" + - name: "UserIndex" + value: 1 + - name: "UserStatus" + value: null + - name: "UserType" + value: null + response: + values: + - name: "Status" + constraints: + anyOf: [0x2, 0x3] - #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. - label: "Step 7: TH sends Set Credential Command to DUT and Verify that the - DUT sends Set Credential Response command with response as OCCUPIED if - the CredentialIndex is repeated" - PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx - verification: | - Mark as not applicable and proceed to next step - - ./chip-tool doorlock set-credential 2 '{ "credentialType" : 1, "credentialIndex" : 3 }' 1234567 1 null null 1 1 --timedInteractionTimeoutMs 1000 - Verify "DUT sends Set Credential Response command with response as OCCUPIED" on the TH(Chip-tool) Log: - - [1658473055.384297][2667:2672] CHIP:DMG: }, - [1658473055.384374][2667:2672] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 - [1658473055.384433][2667:2672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 - [1658473055.384516][2667:2672] CHIP:TOO: SetCredentialResponse: { - [1658473055.384571][2667:2672] CHIP:TOO: status: 2 - [1658473055.384602][2667:2672] CHIP:TOO: userIndex: null - [1658473055.384632][2667:2672] CHIP:TOO: nextCredentialIndex: 4 - [1658473055.384660][2667:2672] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" + DUT sends Set Credential Response command with status + INVALID_COMMAND(0x85) if the CredentialIndex is not associated with + the UserIndex." + PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + command: "SetCredential" + timedInteractionTimeoutMs: 10000 arguments: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #- label: - # "Step 7: TH sends Set Credential Command to DUT and Verify that the DUT sends - # Set Credential Response command with response as OCCUPIED if the - # CredentialIndex is repeated" - # PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx - # command: "SetCredential" - # timedInteractionTimeoutMs: 10000 - # arguments: - # values: - # - name: "OperationType" - # value: 2 - # - name: "Credential" - # value: { CredentialType: 1, CredentialIndex: 3 } - # - name: "CredentialData" - # value: "123456" - # - name: "UserIndex" - # value: 1 - # - name: "UserStatus" - # value: null - # - name: "UserType" - # value: null - # response: - # values: - # - name: "Status" - # value: 0x3 - # - name: "UserIndex" - # value: null + - name: "OperationType" + value: 2 + - name: "Credential" + value: { CredentialType: 1, CredentialIndex: 3 } + - name: "CredentialData" + value: "1234567" + - name: "UserIndex" + value: 1 + - name: "UserStatus" + value: null + - name: "UserType" + value: null + response: + values: + - name: "Status" + value: 0x85 - label: "Step 8: TH sends Clear Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C26.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_1_Simulated.yaml deleted file mode 100644 index 062b253bb8f103..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_1_Simulated.yaml +++ /dev/null @@ -1,212 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 121.3.1. [TC-DRLK-3.1] Attributes check [DUT - Client] - -PICS: - - DRLK.C - -config: - nodeId: 0x12344321 - cluster: "Door Lock" - endpoint: 0 - -tests: - - label: "Wait for the device to be commissioned" - cluster: "DelayCommands" - command: "WaitForCommissioning" - - - label: "DUT reads LockState attribute value from TH" - wait: "readAttribute" - attribute: "LockState" - PICS: DRLK.C.A0000 - - - label: "DUT reads LockType attribute value from TH" - wait: "readAttribute" - attribute: "LockType" - PICS: DRLK.C.A0001 - - - label: "DUT reads ActuatorEnabled attribute value from TH" - wait: "readAttribute" - attribute: "ActuatorEnabled" - PICS: DRLK.C.A0002 - - - label: "DUT reads DoorState attribute value from TH" - wait: "readAttribute" - attribute: "DoorState" - PICS: DRLK.C.F05 && DRLK.C.A0003 - - - label: "DUT reads DoorOpenEvents attribute value from TH" - wait: "readAttribute" - attribute: "DoorOpenEvents" - PICS: DRLK.C.F05 && DRLK.C.A0004 - - - label: "DUT reads DoorClosedEvents attribute value from TH" - wait: "readAttribute" - attribute: "DoorClosedEvents" - PICS: DRLK.C.F05 && DRLK.C.A0005 - - - label: "DUT reads OpenPeriod attribute value from TH" - wait: "readAttribute" - attribute: "OpenPeriod" - PICS: DRLK.C.F05 && DRLK.C.A0006 - - - label: "DUT reads NumberOfTotalUsersSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfTotalUsersSupported" - PICS: DRLK.C.F05 && DRLK.C.A0011 - - - label: "DUT reads NumberofPINUsersSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfPINUsersSupported" - PICS: DRLK.C.F00 && DRLK.C.A0012 - - - label: "DUT reads NumberofRFIDUsersSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfRFIDUsersSupported" - PICS: DRLK.C.F01 && DRLK.C.A0013 - - - label: - "DUT reads NumberofWeekDaysSchedulesSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfWeekDaySchedulesSupportedPerUser" - PICS: DRLK.C.F04 && DRLK.C.A0014 - - - label: - "DUT reads NumberofYearDaysSchedulesSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfYearDaySchedulesSupportedPerUser" - PICS: DRLK.C.F04 && DRLK.C.A0015 - - - label: - "DUT reads NumberofHolidaySchedulesSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfHolidaySchedulesSupported" - PICS: DRLK.C.F04 && DRLK.C.A0016 - - - label: "DUT reads MaxPINCodeLength attribute value from TH" - wait: "readAttribute" - attribute: "MaxPINCodeLength" - PICS: DRLK.C.F00 && DRLK.C.A0017 - - - label: "DUT reads MinPINCodeLength attribute value from TH" - wait: "readAttribute" - attribute: "MinPINCodeLength" - PICS: DRLK.C.F00 && DRLK.C.A0018 - - - label: "DUT reads MaxRFIDCodeLength attribute value from TH" - wait: "readAttribute" - attribute: "MaxRFIDCodeLength" - PICS: DRLK.C.F01 && DRLK.C.A0019 - - - label: "DUT reads MinRFIDCodeLength attribute value from TH" - wait: "readAttribute" - attribute: "MinRFIDCodeLength" - PICS: DRLK.C.F01 && DRLK.C.A001a - - - label: "DUT reads CredentialRulesSupport attribute value from TH" - wait: "readAttribute" - attribute: "CredentialRulesSupport" - PICS: DRLK.C.F08 && DRLK.C.A001b - - - label: "DUT reads Language attribute value from TH" - wait: "readAttribute" - attribute: "Language" - PICS: DRLK.C.A0021 - - - label: "DUT reads LEDSettings attribute value from TH" - wait: "readAttribute" - attribute: "LEDSettings" - PICS: DRLK.C.A0022 - - - label: "DUT reads AutoRelockTime attribute value from TH" - wait: "readAttribute" - attribute: "AutoRelockTime" - PICS: DRLK.C.A0023 - - - label: "DUT reads SoundVolume attribute value from TH" - wait: "readAttribute" - attribute: "SoundVolume" - PICS: DRLK.C.A0024 - - - label: "DUT reads OperatingMode attribute value from TH" - wait: "readAttribute" - attribute: "OperatingMode" - PICS: DRLK.C.A0025 - - - label: "DUT reads SupportedOperatingModes attribute value from TH" - wait: "readAttribute" - attribute: "SupportedOperatingModes" - PICS: DRLK.C.A0026 - - - label: "DUT reads DefaultConfigurationRegister attribute value from TH" - wait: "readAttribute" - attribute: "DefaultConfigurationRegister" - PICS: DRLK.C.A0027 - - - label: "DUT reads EnableLocalProgramming attribute value from TH" - wait: "readAttribute" - attribute: "EnableLocalProgramming" - PICS: DRLK.C.A0028 - - - label: "DUT reads EnableOneTouchLocking attribute value from TH" - wait: "readAttribute" - attribute: "EnableOneTouchLocking" - PICS: DRLK.C.A0029 - - - label: "DUT reads EnableInsideStatusLED attribute value from TH" - wait: "readAttribute" - attribute: "EnableInsideStatusLED" - PICS: DRLK.C.A002a - - - label: "DUT reads EnablePrivacyModeButton attribute value from TH" - wait: "readAttribute" - attribute: "EnablePrivacyModeButton" - PICS: DRLK.C.A002b - - - label: "DUT reads LocalProgrammingFeatures attribute value from TH" - wait: "readAttribute" - attribute: "LocalProgrammingFeatures" - PICS: DRLK.C.A002c - - - label: "DUT reads WrongCodeEntryLimit attribute value from TH" - wait: "readAttribute" - attribute: "WrongCodeEntryLimit" - PICS: DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0030 - - - label: "DUT reads UserCodeTemporaryDisableTime attribute value from TH" - wait: "readAttribute" - attribute: "UserCodeTemporaryDisableTime" - PICS: DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0031 - - - label: "DUT reads SendPINOverTheAir attribute value from TH" - wait: "readAttribute" - attribute: "SendPINOverTheAir" - PICS: DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0032 - - - label: "DUT reads RequirePINForRemoteOperation attribute value from TH" - wait: "readAttribute" - attribute: "RequirePINforRemoteOperation" - PICS: DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0033 - - - label: "DUT reads ExpiringUserTimeOut attribute value from TH" - wait: "readAttribute" - attribute: "ExpiringUserTimeout" - PICS: DRLK.C.F08 && DRLK.C.A0035 - - - label: - "DUT reads NumberOfCredentialsSupportedPerUser attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfCredentialsSupportedPerUser" - PICS: DRLK.C.F08 && DRLK.C.A001c diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml deleted file mode 100644 index 561ed8fa37149f..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml +++ /dev/null @@ -1,995 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 116.3.3. [TC-DRLK-3.3] Verification for the Door Lock Events [DUT - Client] - -PICS: - - DRLK.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Note" - verification: | - "NOTE: https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/linux#readme - Events to be executed as following - 1. Compile app using below command in connectedhomeip folder - a. ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build" - 2. Build respective app (lock-app) - 3. Commission DUT to TH - 4. Open 2nd terminal of DUT and provide the below command to obtain PID of DUT - ps -aef|grep lock-app - 5. Follow the Verification step below to generate the event in 2nd terminal of DUT " - - - "Pre-Conditions - - Before sending the Events proceed following step: - - 1. Send Set User Command and Get User for setting User. - - 2. Send Set Credential Command and Get Credential Status for setting PIN code. - - After sending Events with all condition proceed following step - - 1. Send Clear Credential and Clear User Command. - - " - disabled: true - - - label: - "Step 1: TH will initiate DoorLockAlarm Event (LockJammed scenario)" - PICS: DRLK.C.E00 - verification: | - To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in lock-app to generate the event, Vendor Dut should have capability to generate this event) - - - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner) and TH as lock-app. - - To generate the event give below command - echo '{"Cmd": "SendDoorLockAlarm", "Params": { "EndpointId": 1, "AlarmCode": 0 } }' > /tmp/chip_lock_app_fifo- (PID of lock app) - - ./chip-tool doorlock read-event door-lock-alarm 1 1 --trace_decode 1 - - Verify DoorLockAlarm event response on TH(Lock-app) log: - - [1685673738.170024][2702:2704] CHIP:DMG: ReportDataMessage = - [1685673738.170087][2702:2704] CHIP:DMG: { - [1685673738.170137][2702:2704] CHIP:DMG: EventReportIBs = - [1685673738.170234][2702:2704] CHIP:DMG: [ - [1685673738.170292][2702:2704] CHIP:DMG: EventReportIB = - [1685673738.170404][2702:2704] CHIP:DMG: { - [1685673738.170467][2702:2704] CHIP:DMG: EventDataIB = - [1685673738.170538][2702:2704] CHIP:DMG: { - [1685673738.170627][2702:2704] CHIP:DMG: EventPath = - [1685673738.170701][2702:2704] CHIP:DMG: { - [1685673738.170799][2702:2704] CHIP:DMG: Endpoint = 0x1, - [1685673738.170878][2702:2704] CHIP:DMG: Cluster = 0x101, - [1685673738.170978][2702:2704] CHIP:DMG: Event = 0x0, - [1685673738.171054][2702:2704] CHIP:DMG: }, - [1685673738.171152][2702:2704] CHIP:DMG: - [1685673738.171225][2702:2704] CHIP:DMG: EventNumber = 0x10, - [1685673738.171332][2702:2704] CHIP:DMG: PriorityLevel = 0x2, - [1685673738.171407][2702:2704] CHIP:DMG: EpochTimestamp = 0x18879fbdff3, - [1685673738.171505][2702:2704] CHIP:DMG: EventData = - [1685673738.171581][2702:2704] CHIP:DMG: { - [1685673738.171681][2702:2704] CHIP:DMG: 0x0 = 0, - [1685673738.171762][2702:2704] CHIP:DMG: }, - [1685673738.171853][2702:2704] CHIP:DMG: }, - [1685673738.171934][2702:2704] CHIP:DMG: - [1685673738.172017][2702:2704] CHIP:DMG: }, - [1685673738.172095][2702:2704] CHIP:DMG: - [1685673738.172170][2702:2704] CHIP:DMG: ], - [1685673738.172246][2702:2704] CHIP:DMG: - [1685673738.172303][2702:2704] CHIP:DMG: SuppressResponse = true, - [1685673738.172382][2702:2704] CHIP:DMG: InteractionModelRevision = 1 - [1685673738.172437][2702:2704] CHIP:DMG: } - disabled: true - - - label: - "Step 2: DUT sends the Unlock Door command to the TH with valid - PINCode" - PICS: DRLK.C.C01.Tx - verification: | - ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 - - Verify TH receives Set user command with SUCCESS response on TH(lock-app) log: - - [1685673762.886102][2706:2708] CHIP:DMG: InvokeResponseMessage = - [1685673762.886157][2706:2708] CHIP:DMG: { - [1685673762.886210][2706:2708] CHIP:DMG: suppressResponse = false, - [1685673762.886267][2706:2708] CHIP:DMG: InvokeResponseIBs = - [1685673762.886340][2706:2708] CHIP:DMG: [ - [1685673762.886397][2706:2708] CHIP:DMG: InvokeResponseIB = - [1685673762.886473][2706:2708] CHIP:DMG: { - [1685673762.886533][2706:2708] CHIP:DMG: CommandStatusIB = - [1685673762.886613][2706:2708] CHIP:DMG: { - [1685673762.886680][2706:2708] CHIP:DMG: CommandPathIB = - [1685673762.886755][2706:2708] CHIP:DMG: { - [1685673762.886830][2706:2708] CHIP:DMG: EndpointId = 0x1, - [1685673762.886911][2706:2708] CHIP:DMG: ClusterId = 0x101, - [1685673762.886985][2706:2708] CHIP:DMG: CommandId = 0x1a, - [1685673762.887060][2706:2708] CHIP:DMG: }, - [1685673762.887144][2706:2708] CHIP:DMG: - [1685673762.887212][2706:2708] CHIP:DMG: StatusIB = - [1685673762.887291][2706:2708] CHIP:DMG: { - [1685673762.887367][2706:2708] CHIP:DMG: status = 0x00 (SUCCESS), - [1685673762.887444][2706:2708] CHIP:DMG: }, - [1685673762.887516][2706:2708] CHIP:DMG: - [1685673762.887582][2706:2708] CHIP:DMG: }, - [1685673762.887659][2706:2708] CHIP:DMG: - [1685673762.887719][2706:2708] CHIP:DMG: }, - [1685673762.887790][2706:2708] CHIP:DMG: - [1685673762.887845][2706:2708] CHIP:DMG: ], - [1685673762.887915][2706:2708] CHIP:DMG: - [1685673762.887971][2706:2708] CHIP:DMG: InteractionModelRevision = 1 - [1685673762.888027][2706:2708] CHIP:DMG: }, - - - - ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 null null 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 - - Verify TH receives Set credential command response on TH(lock-app) log: - - [1685673784.984804][2711:2713] CHIP:DMG: InvokeResponseMessage = - [1685673784.984861][2711:2713] CHIP:DMG: { - [1685673784.984941][2711:2713] CHIP:DMG: suppressResponse = false, - [1685673784.984998][2711:2713] CHIP:DMG: InvokeResponseIBs = - [1685673784.985092][2711:2713] CHIP:DMG: [ - [1685673784.985151][2711:2713] CHIP:DMG: InvokeResponseIB = - [1685673784.985249][2711:2713] CHIP:DMG: { - [1685673784.985311][2711:2713] CHIP:DMG: CommandDataIB = - [1685673784.985384][2711:2713] CHIP:DMG: { - [1685673784.985472][2711:2713] CHIP:DMG: CommandPathIB = - [1685673784.985548][2711:2713] CHIP:DMG: { - [1685673784.985647][2711:2713] CHIP:DMG: EndpointId = 0x1, - [1685673784.985728][2711:2713] CHIP:DMG: ClusterId = 0x101, - [1685673784.985852][2711:2713] CHIP:DMG: CommandId = 0x23, - [1685673784.985953][2711:2713] CHIP:DMG: }, - [1685673784.986034][2711:2713] CHIP:DMG: - [1685673784.986123][2711:2713] CHIP:DMG: CommandFields = - [1685673784.986198][2711:2713] CHIP:DMG: { - [1685673784.986295][2711:2713] CHIP:DMG: 0x0 = 0, - [1685673784.986375][2711:2713] CHIP:DMG: 0x1 = NULL - [1685673784.986478][2711:2713] CHIP:DMG: 0x2 = 2, - [1685673784.986558][2711:2713] CHIP:DMG: }, - [1685673784.986649][2711:2713] CHIP:DMG: }, - [1685673784.986728][2711:2713] CHIP:DMG: - [1685673784.986788][2711:2713] CHIP:DMG: }, - [1685673784.986892][2711:2713] CHIP:DMG: - [1685673784.986948][2711:2713] CHIP:DMG: ], - [1685673784.987044][2711:2713] CHIP:DMG: - [1685673784.987102][2711:2713] CHIP:DMG: InteractionModelRevision = 1 - [1685673784.987157][2711:2713] CHIP:DMG: }, - - - - - - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 123456 --trace_decode 1 - - Verify TH receives Unlock Door command with SUCCESS response on TH(lock-app) log: - - [1685673812.339507][2715:2717] CHIP:DMG: InvokeResponseMessage = - [1685673812.339564][2715:2717] CHIP:DMG: { - [1685673812.339617][2715:2717] CHIP:DMG: suppressResponse = false, - [1685673812.339674][2715:2717] CHIP:DMG: InvokeResponseIBs = - [1685673812.339745][2715:2717] CHIP:DMG: [ - [1685673812.339801][2715:2717] CHIP:DMG: InvokeResponseIB = - [1685673812.339893][2715:2717] CHIP:DMG: { - [1685673812.339964][2715:2717] CHIP:DMG: CommandStatusIB = - [1685673812.340053][2715:2717] CHIP:DMG: { - [1685673812.340135][2715:2717] CHIP:DMG: CommandPathIB = - [1685673812.340226][2715:2717] CHIP:DMG: { - [1685673812.340320][2715:2717] CHIP:DMG: EndpointId = 0x1, - [1685673812.340415][2715:2717] CHIP:DMG: ClusterId = 0x101, - [1685673812.340510][2715:2717] CHIP:DMG: CommandId = 0x1, - [1685673812.340600][2715:2717] CHIP:DMG: }, - [1685673812.340699][2715:2717] CHIP:DMG: - [1685673812.340782][2715:2717] CHIP:DMG: StatusIB = - [1685673812.340864][2715:2717] CHIP:DMG: { - [1685673812.340947][2715:2717] CHIP:DMG: status = 0x00 (SUCCESS), - [1685673812.341028][2715:2717] CHIP:DMG: }, - [1685673812.341111][2715:2717] CHIP:DMG: - [1685673812.341185][2715:2717] CHIP:DMG: }, - [1685673812.341270][2715:2717] CHIP:DMG: - [1685673812.341341][2715:2717] CHIP:DMG: }, - [1685673812.341422][2715:2717] CHIP:DMG: - [1685673812.341479][2715:2717] CHIP:DMG: ], - [1685673812.341551][2715:2717] CHIP:DMG: - [1685673812.341606][2715:2717] CHIP:DMG: InteractionModelRevision = 1 - [1685673812.341661][2715:2717] CHIP:DMG: }, - disabled: true - - - label: - "Step 3: TH initiates DoorStateChange event with DoorState set to - DoorOpen" - PICS: DRLK.C.F05 && DRLK.C.E01 - verification: | - To trigger the event give below command in another terminal of DUT - echo '{"Cmd": "SetDoorState", "Params": { "EndpointId": 1, "DoorState": 1 } }' > /tmp/chip_lock_app_fifo- (PID of lock-app) - - ./chip-tool doorlock read-event door-state-change 1 1 --trace_decode 1 - - Verify DoorStateChange event response on TH(Lock-app) log: - - [1685673847.500892][2722:2724] CHIP:DMG: ReportDataMessage = - [1685673847.500955][2722:2724] CHIP:DMG: { - [1685673847.501030][2722:2724] CHIP:DMG: EventReportIBs = - [1685673847.501110][2722:2724] CHIP:DMG: [ - [1685673847.501166][2722:2724] CHIP:DMG: EventReportIB = - [1685673847.501272][2722:2724] CHIP:DMG: { - [1685673847.501334][2722:2724] CHIP:DMG: EventDataIB = - [1685673847.501428][2722:2724] CHIP:DMG: { - [1685673847.501497][2722:2724] CHIP:DMG: EventPath = - [1685673847.501592][2722:2724] CHIP:DMG: { - [1685673847.501672][2722:2724] CHIP:DMG: Endpoint = 0x1, - [1685673847.501823][2722:2724] CHIP:DMG: Cluster = 0x101, - [1685673847.501905][2722:2724] CHIP:DMG: Event = 0x1, - [1685673847.501999][2722:2724] CHIP:DMG: }, - [1685673847.502081][2722:2724] CHIP:DMG: - [1685673847.502175][2722:2724] CHIP:DMG: EventNumber = 0x1, - [1685673847.502250][2722:2724] CHIP:DMG: PriorityLevel = 0x2, - [1685673847.502345][2722:2724] CHIP:DMG: EpochTimestamp = 0x18879f130f2, - [1685673847.502419][2722:2724] CHIP:DMG: EventData = - [1685673847.502514][2722:2724] CHIP:DMG: { - [1685673847.502594][2722:2724] CHIP:DMG: 0x0 = 1, - [1685673847.502695][2722:2724] CHIP:DMG: }, - [1685673847.502767][2722:2724] CHIP:DMG: }, - [1685673847.502867][2722:2724] CHIP:DMG: - [1685673847.502930][2722:2724] CHIP:DMG: }, - [1685673847.503007][2722:2724] CHIP:DMG: - [1685673847.503085][2722:2724] CHIP:DMG: ], - [1685673847.503160][2722:2724] CHIP:DMG: - [1685673847.503249][2722:2724] CHIP:DMG: SuppressResponse = true, - [1685673847.503313][2722:2724] CHIP:DMG: InteractionModelRevision = 1 - [1685673847.503368][2722:2724] CHIP:DMG: } - disabled: true - - - label: - "Step 4: DUT sends the Lock Door command to the TH with valid PINCode" - PICS: DRLK.C.C00.Tx - verification: | - ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 123456 --trace_decode 1 - - Verify TH receives Lock Door command with SUCCESS response on TH(lock-app) log: - - [1685673873.420811][2727:2729] CHIP:DMG: InvokeResponseMessage = - [1685673873.420869][2727:2729] CHIP:DMG: { - [1685673873.420923][2727:2729] CHIP:DMG: suppressResponse = false, - [1685673873.420980][2727:2729] CHIP:DMG: InvokeResponseIBs = - [1685673873.421052][2727:2729] CHIP:DMG: [ - [1685673873.421110][2727:2729] CHIP:DMG: InvokeResponseIB = - [1685673873.421192][2727:2729] CHIP:DMG: { - [1685673873.421255][2727:2729] CHIP:DMG: CommandStatusIB = - [1685673873.421325][2727:2729] CHIP:DMG: { - [1685673873.421392][2727:2729] CHIP:DMG: CommandPathIB = - [1685673873.421468][2727:2729] CHIP:DMG: { - [1685673873.421545][2727:2729] CHIP:DMG: EndpointId = 0x1, - [1685673873.421623][2727:2729] CHIP:DMG: ClusterId = 0x101, - [1685673873.421697][2727:2729] CHIP:DMG: CommandId = 0x0, - [1685673873.421805][2727:2729] CHIP:DMG: }, - [1685673873.421896][2727:2729] CHIP:DMG: - [1685673873.421963][2727:2729] CHIP:DMG: StatusIB = - [1685673873.422039][2727:2729] CHIP:DMG: { - [1685673873.422116][2727:2729] CHIP:DMG: status = 0x00 (SUCCESS), - [1685673873.422194][2727:2729] CHIP:DMG: }, - [1685673873.422271][2727:2729] CHIP:DMG: - [1685673873.422339][2727:2729] CHIP:DMG: }, - [1685673873.422416][2727:2729] CHIP:DMG: - [1685673873.422475][2727:2729] CHIP:DMG: }, - [1685673873.422546][2727:2729] CHIP:DMG: - [1685673873.422601][2727:2729] CHIP:DMG: ], - [1685673873.422671][2727:2729] CHIP:DMG: - [1685673873.422726][2727:2729] CHIP:DMG: InteractionModelRevision = 1 - [1685673873.422780][2727:2729] CHIP:DMG: }, - disabled: true - - - label: - "Step 5: TH will initiate LockOperation event with LockOperationType - to Lock" - PICS: DRLK.C.E02 - verification: | - ./chip-tool doorlock read-event lock-operation 1 1 --trace_decode 1 - - Verify LockOperation event response on TH(Lock-app) log: - - [1685673894.510509][2730:2732] CHIP:DMG: ReportDataMessage = - [1685673894.510571][2730:2732] CHIP:DMG: { - [1685673894.510620][2730:2732] CHIP:DMG: EventReportIBs = - [1685673894.510700][2730:2732] CHIP:DMG: [ - [1685673894.510756][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.510839][2730:2732] CHIP:DMG: { - [1685673894.510899][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.510974][2730:2732] CHIP:DMG: { - [1685673894.511041][2730:2732] CHIP:DMG: EventPath = - [1685673894.511119][2730:2732] CHIP:DMG: { - [1685673894.511194][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.511274][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.511352][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.511428][2730:2732] CHIP:DMG: }, - [1685673894.511507][2730:2732] CHIP:DMG: - [1685673894.511578][2730:2732] CHIP:DMG: EventNumber = 0x4, - [1685673894.511654][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.511728][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879f18196, - [1685673894.511802][2730:2732] CHIP:DMG: EventData = - [1685673894.511875][2730:2732] CHIP:DMG: { - [1685673894.511959][2730:2732] CHIP:DMG: 0x0 = 0, - [1685673894.512040][2730:2732] CHIP:DMG: 0x1 = 7, - [1685673894.512120][2730:2732] CHIP:DMG: 0x2 = NULL - [1685673894.512199][2730:2732] CHIP:DMG: 0x3 = 1, - [1685673894.512281][2730:2732] CHIP:DMG: 0x4 = 112233, - [1685673894.512360][2730:2732] CHIP:DMG: 0x5 = NULL - [1685673894.512439][2730:2732] CHIP:DMG: }, - [1685673894.512509][2730:2732] CHIP:DMG: }, - [1685673894.512594][2730:2732] CHIP:DMG: - [1685673894.512653][2730:2732] CHIP:DMG: }, - [1685673894.512754][2730:2732] CHIP:DMG: - [1685673894.512810][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.512894][2730:2732] CHIP:DMG: { - [1685673894.512955][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.513022][2730:2732] CHIP:DMG: { - [1685673894.513089][2730:2732] CHIP:DMG: EventPath = - [1685673894.513161][2730:2732] CHIP:DMG: { - [1685673894.513236][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.513315][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.513393][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.513467][2730:2732] CHIP:DMG: }, - [1685673894.513545][2730:2732] CHIP:DMG: - [1685673894.513615][2730:2732] CHIP:DMG: EventNumber = 0x5, - [1685673894.513689][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.513804][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879f20277, - [1685673894.513884][2730:2732] CHIP:DMG: EventData = - [1685673894.513969][2730:2732] CHIP:DMG: { - [1685673894.514047][2730:2732] CHIP:DMG: 0x0 = 1, - [1685673894.514127][2730:2732] CHIP:DMG: 0x1 = 7, - [1685673894.514206][2730:2732] CHIP:DMG: 0x2 = NULL - [1685673894.514287][2730:2732] CHIP:DMG: 0x3 = 1, - [1685673894.514368][2730:2732] CHIP:DMG: 0x4 = 112233, - [1685673894.514447][2730:2732] CHIP:DMG: 0x5 = NULL - [1685673894.514525][2730:2732] CHIP:DMG: }, - [1685673894.514594][2730:2732] CHIP:DMG: }, - [1685673894.514676][2730:2732] CHIP:DMG: - [1685673894.514736][2730:2732] CHIP:DMG: }, - [1685673894.514837][2730:2732] CHIP:DMG: - [1685673894.514894][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.514978][2730:2732] CHIP:DMG: { - [1685673894.515038][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.515106][2730:2732] CHIP:DMG: { - [1685673894.515171][2730:2732] CHIP:DMG: EventPath = - [1685673894.515243][2730:2732] CHIP:DMG: { - [1685673894.515317][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.515395][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.515468][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.515534][2730:2732] CHIP:DMG: }, - [1685673894.515609][2730:2732] CHIP:DMG: - [1685673894.515680][2730:2732] CHIP:DMG: EventNumber = 0x6, - [1685673894.515754][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.515827][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879f24737, - [1685673894.515898][2730:2732] CHIP:DMG: EventData = - [1685673894.515970][2730:2732] CHIP:DMG: { - [1685673894.516046][2730:2732] CHIP:DMG: 0x0 = 1, - [1685673894.516124][2730:2732] CHIP:DMG: 0x1 = 7, - [1685673894.516202][2730:2732] CHIP:DMG: 0x2 = NULL - [1685673894.516282][2730:2732] CHIP:DMG: 0x3 = 1, - [1685673894.516362][2730:2732] CHIP:DMG: 0x4 = 112233, - [1685673894.516441][2730:2732] CHIP:DMG: 0x5 = NULL - [1685673894.516519][2730:2732] CHIP:DMG: }, - [1685673894.516589][2730:2732] CHIP:DMG: }, - [1685673894.516672][2730:2732] CHIP:DMG: - [1685673894.516731][2730:2732] CHIP:DMG: }, - [1685673894.516830][2730:2732] CHIP:DMG: - [1685673894.516886][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.516970][2730:2732] CHIP:DMG: { - [1685673894.517030][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.517097][2730:2732] CHIP:DMG: { - [1685673894.517162][2730:2732] CHIP:DMG: EventPath = - [1685673894.517234][2730:2732] CHIP:DMG: { - [1685673894.517308][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.517386][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.517456][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.517528][2730:2732] CHIP:DMG: }, - [1685673894.517604][2730:2732] CHIP:DMG: - [1685673894.517674][2730:2732] CHIP:DMG: EventNumber = 0x9, - [1685673894.517747][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.517981][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879f331a0, - [1685673894.518056][2730:2732] CHIP:DMG: EventData = - [1685673894.518127][2730:2732] CHIP:DMG: { - [1685673894.518204][2730:2732] CHIP:DMG: 0x0 = 0, - [1685673894.518284][2730:2732] CHIP:DMG: 0x1 = 4, - [1685673894.518363][2730:2732] CHIP:DMG: 0x2 = NULL - [1685673894.518443][2730:2732] CHIP:DMG: 0x3 = NULL - [1685673894.518535][2730:2732] CHIP:DMG: 0x4 = NULL - [1685673894.518625][2730:2732] CHIP:DMG: 0x5 = NULL - [1685673894.518704][2730:2732] CHIP:DMG: }, - [1685673894.518774][2730:2732] CHIP:DMG: }, - [1685673894.518859][2730:2732] CHIP:DMG: - [1685673894.518918][2730:2732] CHIP:DMG: }, - [1685673894.519023][2730:2732] CHIP:DMG: - [1685673894.519080][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.519167][2730:2732] CHIP:DMG: { - [1685673894.519228][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.519295][2730:2732] CHIP:DMG: { - [1685673894.519361][2730:2732] CHIP:DMG: EventPath = - [1685673894.519434][2730:2732] CHIP:DMG: { - [1685673894.519509][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.519588][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.519666][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.519740][2730:2732] CHIP:DMG: }, - [1685673894.519816][2730:2732] CHIP:DMG: - [1685673894.519888][2730:2732] CHIP:DMG: EventNumber = 0x13, - [1685673894.519962][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.520036][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879fd2160, - [1685673894.520108][2730:2732] CHIP:DMG: EventData = - [1685673894.520181][2730:2732] CHIP:DMG: { - [1685673894.520256][2730:2732] CHIP:DMG: 0x0 = 1, - [1685673894.520338][2730:2732] CHIP:DMG: 0x1 = 7, - [1685673894.520420][2730:2732] CHIP:DMG: 0x2 = 1, - [1685673894.520503][2730:2732] CHIP:DMG: 0x3 = 1, - [1685673894.520584][2730:2732] CHIP:DMG: 0x4 = 112233, - [1685673894.520661][2730:2732] CHIP:DMG: 0x5 = [ - [1685673894.520740][2730:2732] CHIP:DMG: - [1685673894.520827][2730:2732] CHIP:DMG: { - [1685673894.520916][2730:2732] CHIP:DMG: 0x0 = 1, - [1685673894.521014][2730:2732] CHIP:DMG: 0x1 = 1, - [1685673894.521114][2730:2732] CHIP:DMG: }, - [1685673894.521199][2730:2732] CHIP:DMG: ], - [1685673894.521280][2730:2732] CHIP:DMG: }, - [1685673894.521350][2730:2732] CHIP:DMG: }, - [1685673894.521437][2730:2732] CHIP:DMG: - [1685673894.521498][2730:2732] CHIP:DMG: }, - [1685673894.521600][2730:2732] CHIP:DMG: - [1685673894.521656][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.521740][2730:2732] CHIP:DMG: { - [1685673894.521832][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.521904][2730:2732] CHIP:DMG: { - [1685673894.521971][2730:2732] CHIP:DMG: EventPath = - [1685673894.522044][2730:2732] CHIP:DMG: { - [1685673894.522119][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.522198][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.522275][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.522350][2730:2732] CHIP:DMG: }, - [1685673894.522426][2730:2732] CHIP:DMG: - [1685673894.522496][2730:2732] CHIP:DMG: EventNumber = 0x14, - [1685673894.522570][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.522646][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879fe0bcf, - [1685673894.522718][2730:2732] CHIP:DMG: EventData = - [1685673894.522790][2730:2732] CHIP:DMG: { - [1685673894.522868][2730:2732] CHIP:DMG: 0x0 = 0, - [1685673894.522948][2730:2732] CHIP:DMG: 0x1 = 4, - [1685673894.523026][2730:2732] CHIP:DMG: 0x2 = NULL - [1685673894.523105][2730:2732] CHIP:DMG: 0x3 = NULL - [1685673894.523184][2730:2732] CHIP:DMG: 0x4 = NULL - [1685673894.523262][2730:2732] CHIP:DMG: 0x5 = NULL - [1685673894.523341][2730:2732] CHIP:DMG: }, - [1685673894.523409][2730:2732] CHIP:DMG: }, - [1685673894.523491][2730:2732] CHIP:DMG: - [1685673894.523551][2730:2732] CHIP:DMG: }, - [1685673894.523654][2730:2732] CHIP:DMG: - [1685673894.523710][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.523798][2730:2732] CHIP:DMG: { - [1685673894.523858][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.523925][2730:2732] CHIP:DMG: { - [1685673894.523995][2730:2732] CHIP:DMG: EventPath = - [1685673894.524067][2730:2732] CHIP:DMG: { - [1685673894.524142][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.524221][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.524298][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.524372][2730:2732] CHIP:DMG: }, - [1685673894.524449][2730:2732] CHIP:DMG: - [1685673894.524518][2730:2732] CHIP:DMG: EventNumber = 0x15, - [1685673894.524593][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.524666][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879fe0fff, - [1685673894.524739][2730:2732] CHIP:DMG: EventData = - [1685673894.524810][2730:2732] CHIP:DMG: { - [1685673894.524887][2730:2732] CHIP:DMG: 0x0 = 0, - [1685673894.524966][2730:2732] CHIP:DMG: 0x1 = 7, - [1685673894.525048][2730:2732] CHIP:DMG: 0x2 = 1, - [1685673894.525128][2730:2732] CHIP:DMG: 0x3 = 1, - [1685673894.525210][2730:2732] CHIP:DMG: 0x4 = 112233, - [1685673894.525287][2730:2732] CHIP:DMG: 0x5 = [ - [1685673894.525360][2730:2732] CHIP:DMG: - [1685673894.525446][2730:2732] CHIP:DMG: { - [1685673894.525534][2730:2732] CHIP:DMG: 0x0 = 1, - [1685673894.525618][2730:2732] CHIP:DMG: 0x1 = 1, - [1685673894.525707][2730:2732] CHIP:DMG: }, - [1685673894.525808][2730:2732] CHIP:DMG: ], - [1685673894.525888][2730:2732] CHIP:DMG: }, - [1685673894.525958][2730:2732] CHIP:DMG: }, - [1685673894.526045][2730:2732] CHIP:DMG: - [1685673894.526106][2730:2732] CHIP:DMG: }, - [1685673894.526187][2730:2732] CHIP:DMG: - [1685673894.526243][2730:2732] CHIP:DMG: ], - [1685673894.526435][2730:2732] CHIP:DMG: - [1685673894.526494][2730:2732] CHIP:DMG: SuppressResponse = true, - [1685673894.526552][2730:2732] CHIP:DMG: InteractionModelRevision = 1 - [1685673894.526606][2730:2732] CHIP:DMG: } - disabled: true - - - label: - "Step 6: DUT sends the Unlock Door command to the TH with Invalid - PINCode" - PICS: DRLK.C.C01.Tx - verification: | - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 12345678 --trace_decode 1 - - Verify TH receives Unlock Door command with FAILURE response on TH(lock-app) log: - - [1685673944.179783][2739:2741] CHIP:DMG: InvokeResponseMessage = - [1685673944.179842][2739:2741] CHIP:DMG: { - [1685673944.179896][2739:2741] CHIP:DMG: suppressResponse = false, - [1685673944.179954][2739:2741] CHIP:DMG: InvokeResponseIBs = - [1685673944.180049][2739:2741] CHIP:DMG: [ - [1685673944.180108][2739:2741] CHIP:DMG: InvokeResponseIB = - [1685673944.180185][2739:2741] CHIP:DMG: { - [1685673944.180267][2739:2741] CHIP:DMG: CommandStatusIB = - [1685673944.180332][2739:2741] CHIP:DMG: { - [1685673944.180420][2739:2741] CHIP:DMG: CommandPathIB = - [1685673944.180497][2739:2741] CHIP:DMG: { - [1685673944.180594][2739:2741] CHIP:DMG: EndpointId = 0x1, - [1685673944.180676][2739:2741] CHIP:DMG: ClusterId = 0x101, - [1685673944.180776][2739:2741] CHIP:DMG: CommandId = 0x1, - [1685673944.180853][2739:2741] CHIP:DMG: }, - [1685673944.180960][2739:2741] CHIP:DMG: - [1685673944.181030][2739:2741] CHIP:DMG: StatusIB = - [1685673944.181105][2739:2741] CHIP:DMG: { - [1685673944.181180][2739:2741] CHIP:DMG: status = 0x01 (FAILURE), - [1685673944.181280][2739:2741] CHIP:DMG: }, - [1685673944.181355][2739:2741] CHIP:DMG: - [1685673944.181446][2739:2741] CHIP:DMG: }, - [1685673944.181524][2739:2741] CHIP:DMG: - [1685673944.181584][2739:2741] CHIP:DMG: }, - [1685673944.181686][2739:2741] CHIP:DMG: - [1685673944.181743][2739:2741] CHIP:DMG: ], - [1685673944.181884][2739:2741] CHIP:DMG: - [1685673944.181943][2739:2741] CHIP:DMG: InteractionModelRevision = 1 - [1685673944.181998][2739:2741] CHIP:DMG: }, - disabled: true - - - label: - "Step 7: TH will initiate LockOperationError event by causing Lock - error using invalid PIN" - PICS: DRLK.C.E03 - verification: | - ./chip-tool doorlock read-event lock-operation-error 1 1 --trace_decode 1 - - Verify LockOperationError event response on TH(Lock-app) log: - - [1685673961.918640][2743:2745] CHIP:DMG: ReportDataMessage = - [1685673961.918701][2743:2745] CHIP:DMG: { - [1685673961.918750][2743:2745] CHIP:DMG: EventReportIBs = - [1685673961.918831][2743:2745] CHIP:DMG: [ - [1685673961.918888][2743:2745] CHIP:DMG: EventReportIB = - [1685673961.918974][2743:2745] CHIP:DMG: { - [1685673961.919034][2743:2745] CHIP:DMG: EventDataIB = - [1685673961.919105][2743:2745] CHIP:DMG: { - [1685673961.919172][2743:2745] CHIP:DMG: EventPath = - [1685673961.919246][2743:2745] CHIP:DMG: { - [1685673961.919321][2743:2745] CHIP:DMG: Endpoint = 0x1, - [1685673961.919401][2743:2745] CHIP:DMG: Cluster = 0x101, - [1685673961.919479][2743:2745] CHIP:DMG: Event = 0x3, - [1685673961.919555][2743:2745] CHIP:DMG: }, - [1685673961.919634][2743:2745] CHIP:DMG: - [1685673961.919705][2743:2745] CHIP:DMG: EventNumber = 0x16, - [1685673961.919780][2743:2745] CHIP:DMG: PriorityLevel = 0x2, - [1685673961.919856][2743:2745] CHIP:DMG: EpochTimestamp = 0x18879ff2466, - [1685673961.919931][2743:2745] CHIP:DMG: EventData = - [1685673961.920006][2743:2745] CHIP:DMG: { - [1685673961.920084][2743:2745] CHIP:DMG: 0x0 = 1, - [1685673961.920166][2743:2745] CHIP:DMG: 0x1 = 7, - [1685673961.920241][2743:2745] CHIP:DMG: 0x2 = 1, - [1685673961.920335][2743:2745] CHIP:DMG: 0x3 = NULL - [1685673961.920416][2743:2745] CHIP:DMG: 0x4 = 1, - [1685673961.920499][2743:2745] CHIP:DMG: 0x5 = 112233, - [1685673961.920580][2743:2745] CHIP:DMG: 0x6 = NULL - [1685673961.920659][2743:2745] CHIP:DMG: }, - [1685673961.920730][2743:2745] CHIP:DMG: }, - [1685673961.920815][2743:2745] CHIP:DMG: - [1685673961.920878][2743:2745] CHIP:DMG: }, - [1685673961.920958][2743:2745] CHIP:DMG: - [1685673961.921013][2743:2745] CHIP:DMG: ], - [1685673961.921092][2743:2745] CHIP:DMG: - [1685673961.921150][2743:2745] CHIP:DMG: SuppressResponse = true, - [1685673961.921209][2743:2745] CHIP:DMG: InteractionModelRevision = 1 - [1685673961.921263][2743:2745] CHIP:DMG: } - disabled: true - - - label: "Step 8: DUT sends Set User command to TH" - PICS: DRLK.C.F08 && DRLK.C.C1a.Tx - verification: | - ./chip-tool doorlock set-user 0 3 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 - - Verify TH receives Set User command with SUCCESS response on TH(lock-app) log: - - [1685673982.319643][2748:2750] CHIP:DMG: InvokeResponseMessage = - [1685673982.319698][2748:2750] CHIP:DMG: { - [1685673982.319752][2748:2750] CHIP:DMG: suppressResponse = false, - [1685673982.319808][2748:2750] CHIP:DMG: InvokeResponseIBs = - [1685673982.319881][2748:2750] CHIP:DMG: [ - [1685673982.319938][2748:2750] CHIP:DMG: InvokeResponseIB = - [1685673982.320016][2748:2750] CHIP:DMG: { - [1685673982.320072][2748:2750] CHIP:DMG: CommandStatusIB = - [1685673982.320148][2748:2750] CHIP:DMG: { - [1685673982.320211][2748:2750] CHIP:DMG: CommandPathIB = - [1685673982.320285][2748:2750] CHIP:DMG: { - [1685673982.320361][2748:2750] CHIP:DMG: EndpointId = 0x1, - [1685673982.320441][2748:2750] CHIP:DMG: ClusterId = 0x101, - [1685673982.320519][2748:2750] CHIP:DMG: CommandId = 0x1a, - [1685673982.320613][2748:2750] CHIP:DMG: }, - [1685673982.320719][2748:2750] CHIP:DMG: - [1685673982.320789][2748:2750] CHIP:DMG: StatusIB = - [1685673982.320863][2748:2750] CHIP:DMG: { - [1685673982.320937][2748:2750] CHIP:DMG: status = 0x00 (SUCCESS), - [1685673982.321009][2748:2750] CHIP:DMG: }, - [1685673982.321084][2748:2750] CHIP:DMG: - [1685673982.321153][2748:2750] CHIP:DMG: }, - [1685673982.321228][2748:2750] CHIP:DMG: - [1685673982.321291][2748:2750] CHIP:DMG: }, - [1685673982.321361][2748:2750] CHIP:DMG: - [1685673982.321417][2748:2750] CHIP:DMG: ], - [1685673982.321486][2748:2750] CHIP:DMG: - [1685673982.321542][2748:2750] CHIP:DMG: InteractionModelRevision = 1 - [1685673982.321598][2748:2750] CHIP:DMG: }, - disabled: true - - - label: - "Step 9: TH initiates LockUserChange event by adding the UserIndex - using Set User command" - PICS: DRLK.C.E04 - verification: | - ./chip-tool doorlock read-event lock-user-change 1 1 --trace_decode 1 - - Verify LockUserChange event response on TH(Lock-app) log: - - [1685674004.671171][2752:2754] CHIP:DMG: ReportDataMessage = - [1685674004.671235][2752:2754] CHIP:DMG: { - [1685674004.671283][2752:2754] CHIP:DMG: EventReportIBs = - [1685674004.671364][2752:2754] CHIP:DMG: [ - [1685674004.671421][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.671517][2752:2754] CHIP:DMG: { - [1685674004.671578][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.671654][2752:2754] CHIP:DMG: { - [1685674004.671722][2752:2754] CHIP:DMG: EventPath = - [1685674004.671799][2752:2754] CHIP:DMG: { - [1685674004.671876][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.671956][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.672035][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.672111][2752:2754] CHIP:DMG: }, - [1685674004.672191][2752:2754] CHIP:DMG: - [1685674004.672262][2752:2754] CHIP:DMG: EventNumber = 0x8, - [1685674004.672336][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.672412][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f2ec55, - [1685674004.672486][2752:2754] CHIP:DMG: EventData = - [1685674004.672559][2752:2754] CHIP:DMG: { - [1685674004.672637][2752:2754] CHIP:DMG: 0x0 = 3, - [1685674004.672718][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.672800][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.672880][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.672961][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.673043][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.673125][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.673204][2752:2754] CHIP:DMG: }, - [1685674004.673274][2752:2754] CHIP:DMG: }, - [1685674004.673361][2752:2754] CHIP:DMG: - [1685674004.673420][2752:2754] CHIP:DMG: }, - [1685674004.673523][2752:2754] CHIP:DMG: - [1685674004.673580][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.673667][2752:2754] CHIP:DMG: { - [1685674004.673729][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.673851][2752:2754] CHIP:DMG: { - [1685674004.673925][2752:2754] CHIP:DMG: EventPath = - [1685674004.673995][2752:2754] CHIP:DMG: { - [1685674004.674069][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.674149][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.674229][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.674304][2752:2754] CHIP:DMG: }, - [1685674004.674377][2752:2754] CHIP:DMG: - [1685674004.674448][2752:2754] CHIP:DMG: EventNumber = 0xa, - [1685674004.674523][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.674593][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f3ba0b, - [1685674004.674665][2752:2754] CHIP:DMG: EventData = - [1685674004.674738][2752:2754] CHIP:DMG: { - [1685674004.674813][2752:2754] CHIP:DMG: 0x0 = 3, - [1685674004.674894][2752:2754] CHIP:DMG: 0x1 = 1, - [1685674004.674974][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.675054][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.675134][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.675215][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.675293][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.675371][2752:2754] CHIP:DMG: }, - [1685674004.675439][2752:2754] CHIP:DMG: }, - [1685674004.675521][2752:2754] CHIP:DMG: - [1685674004.675580][2752:2754] CHIP:DMG: }, - [1685674004.675683][2752:2754] CHIP:DMG: - [1685674004.675739][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.675826][2752:2754] CHIP:DMG: { - [1685674004.675887][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.675955][2752:2754] CHIP:DMG: { - [1685674004.676021][2752:2754] CHIP:DMG: EventPath = - [1685674004.676094][2752:2754] CHIP:DMG: { - [1685674004.676168][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.676247][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.676324][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.676398][2752:2754] CHIP:DMG: }, - [1685674004.676474][2752:2754] CHIP:DMG: - [1685674004.676545][2752:2754] CHIP:DMG: EventNumber = 0xb, - [1685674004.676620][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.676686][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f3faa3, - [1685674004.676750][2752:2754] CHIP:DMG: EventData = - [1685674004.676824][2752:2754] CHIP:DMG: { - [1685674004.676898][2752:2754] CHIP:DMG: 0x0 = 4, - [1685674004.676979][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.677059][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.677140][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.677220][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.677299][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.677379][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.677457][2752:2754] CHIP:DMG: }, - [1685674004.677526][2752:2754] CHIP:DMG: }, - [1685674004.677611][2752:2754] CHIP:DMG: - [1685674004.677671][2752:2754] CHIP:DMG: }, - [1685674004.677808][2752:2754] CHIP:DMG: - [1685674004.677872][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.677957][2752:2754] CHIP:DMG: { - [1685674004.678017][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.678085][2752:2754] CHIP:DMG: { - [1685674004.678151][2752:2754] CHIP:DMG: EventPath = - [1685674004.678225][2752:2754] CHIP:DMG: { - [1685674004.678299][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.678379][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.678458][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.678532][2752:2754] CHIP:DMG: }, - [1685674004.678610][2752:2754] CHIP:DMG: - [1685674004.678681][2752:2754] CHIP:DMG: EventNumber = 0xc, - [1685674004.678755][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.678829][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f48d3b, - [1685674004.678900][2752:2754] CHIP:DMG: EventData = - [1685674004.678972][2752:2754] CHIP:DMG: { - [1685674004.679047][2752:2754] CHIP:DMG: 0x0 = 4, - [1685674004.679129][2752:2754] CHIP:DMG: 0x1 = 1, - [1685674004.679210][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.679290][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.679371][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.679452][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.679532][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.679610][2752:2754] CHIP:DMG: }, - [1685674004.679681][2752:2754] CHIP:DMG: }, - [1685674004.679763][2752:2754] CHIP:DMG: - [1685674004.679823][2752:2754] CHIP:DMG: }, - [1685674004.679926][2752:2754] CHIP:DMG: - [1685674004.679982][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.680067][2752:2754] CHIP:DMG: { - [1685674004.680127][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.680197][2752:2754] CHIP:DMG: { - [1685674004.680264][2752:2754] CHIP:DMG: EventPath = - [1685674004.680336][2752:2754] CHIP:DMG: { - [1685674004.680411][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.680489][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.680568][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.680642][2752:2754] CHIP:DMG: }, - [1685674004.680720][2752:2754] CHIP:DMG: - [1685674004.680788][2752:2754] CHIP:DMG: EventNumber = 0xd, - [1685674004.680862][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.680936][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f5cf3e, - [1685674004.681008][2752:2754] CHIP:DMG: EventData = - [1685674004.681081][2752:2754] CHIP:DMG: { - [1685674004.681158][2752:2754] CHIP:DMG: 0x0 = 2, - [1685674004.681257][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.681344][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.681424][2752:2754] CHIP:DMG: 0x3 = 2, - [1685674004.681505][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.681585][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.681664][2752:2754] CHIP:DMG: 0x6 = 2, - [1685674004.681742][2752:2754] CHIP:DMG: }, - [1685674004.681887][2752:2754] CHIP:DMG: }, - [1685674004.681980][2752:2754] CHIP:DMG: - [1685674004.682039][2752:2754] CHIP:DMG: }, - [1685674004.682140][2752:2754] CHIP:DMG: - [1685674004.682196][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.682281][2752:2754] CHIP:DMG: { - [1685674004.682341][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.682407][2752:2754] CHIP:DMG: { - [1685674004.682470][2752:2754] CHIP:DMG: EventPath = - [1685674004.682543][2752:2754] CHIP:DMG: { - [1685674004.682617][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.682697][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.682773][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.682847][2752:2754] CHIP:DMG: }, - [1685674004.682923][2752:2754] CHIP:DMG: - [1685674004.682994][2752:2754] CHIP:DMG: EventNumber = 0xe, - [1685674004.683068][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.683142][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f67e3f, - [1685674004.683213][2752:2754] CHIP:DMG: EventData = - [1685674004.683287][2752:2754] CHIP:DMG: { - [1685674004.683359][2752:2754] CHIP:DMG: 0x0 = 2, - [1685674004.683438][2752:2754] CHIP:DMG: 0x1 = 1, - [1685674004.683518][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.683599][2752:2754] CHIP:DMG: 0x3 = 2, - [1685674004.683680][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.683761][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.683842][2752:2754] CHIP:DMG: 0x6 = 2, - [1685674004.683920][2752:2754] CHIP:DMG: }, - [1685674004.683990][2752:2754] CHIP:DMG: }, - [1685674004.684075][2752:2754] CHIP:DMG: - [1685674004.684134][2752:2754] CHIP:DMG: }, - [1685674004.684235][2752:2754] CHIP:DMG: - [1685674004.684291][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.684376][2752:2754] CHIP:DMG: { - [1685674004.684436][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.684504][2752:2754] CHIP:DMG: { - [1685674004.684570][2752:2754] CHIP:DMG: EventPath = - [1685674004.684641][2752:2754] CHIP:DMG: { - [1685674004.684716][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.684791][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.684868][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.684942][2752:2754] CHIP:DMG: }, - [1685674004.685026][2752:2754] CHIP:DMG: - [1685674004.685096][2752:2754] CHIP:DMG: EventNumber = 0xf, - [1685674004.685171][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.685246][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f7dd82, - [1685674004.685317][2752:2754] CHIP:DMG: EventData = - [1685674004.685391][2752:2754] CHIP:DMG: { - [1685674004.685467][2752:2754] CHIP:DMG: 0x0 = 2, - [1685674004.685548][2752:2754] CHIP:DMG: 0x1 = 1, - [1685674004.685630][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.685710][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.685831][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.685913][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.685991][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.686069][2752:2754] CHIP:DMG: }, - [1685674004.686140][2752:2754] CHIP:DMG: }, - [1685674004.686222][2752:2754] CHIP:DMG: - [1685674004.686281][2752:2754] CHIP:DMG: }, - [1685674004.686383][2752:2754] CHIP:DMG: - [1685674004.686439][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.686524][2752:2754] CHIP:DMG: { - [1685674004.686585][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.686652][2752:2754] CHIP:DMG: { - [1685674004.686718][2752:2754] CHIP:DMG: EventPath = - [1685674004.686791][2752:2754] CHIP:DMG: { - [1685674004.686865][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.686945][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.687023][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.687097][2752:2754] CHIP:DMG: }, - [1685674004.687174][2752:2754] CHIP:DMG: - [1685674004.687241][2752:2754] CHIP:DMG: EventNumber = 0x11, - [1685674004.687315][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.687388][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879fc602b, - [1685674004.687459][2752:2754] CHIP:DMG: EventData = - [1685674004.687531][2752:2754] CHIP:DMG: { - [1685674004.687607][2752:2754] CHIP:DMG: 0x0 = 2, - [1685674004.687687][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.687767][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.687848][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.687928][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.688008][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.688089][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.688162][2752:2754] CHIP:DMG: }, - [1685674004.688232][2752:2754] CHIP:DMG: }, - [1685674004.688316][2752:2754] CHIP:DMG: - [1685674004.688375][2752:2754] CHIP:DMG: }, - [1685674004.688477][2752:2754] CHIP:DMG: - [1685674004.688533][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.688617][2752:2754] CHIP:DMG: { - [1685674004.688677][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.688745][2752:2754] CHIP:DMG: { - [1685674004.688811][2752:2754] CHIP:DMG: EventPath = - [1685674004.688880][2752:2754] CHIP:DMG: { - [1685674004.688954][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.689033][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.689111][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.689185][2752:2754] CHIP:DMG: }, - [1685674004.689262][2752:2754] CHIP:DMG: - [1685674004.689332][2752:2754] CHIP:DMG: EventNumber = 0x12, - [1685674004.689403][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.689473][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879fcb681, - [1685674004.689545][2752:2754] CHIP:DMG: EventData = - [1685674004.689617][2752:2754] CHIP:DMG: { - [1685674004.689693][2752:2754] CHIP:DMG: 0x0 = 6, - [1685674004.689882][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.689965][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.690046][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.690126][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.690205][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.690285][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.690362][2752:2754] CHIP:DMG: }, - [1685674004.690433][2752:2754] CHIP:DMG: }, - [1685674004.690515][2752:2754] CHIP:DMG: - [1685674004.690574][2752:2754] CHIP:DMG: }, - [1685674004.690677][2752:2754] CHIP:DMG: - [1685674004.690733][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.690819][2752:2754] CHIP:DMG: { - [1685674004.690879][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.690948][2752:2754] CHIP:DMG: { - [1685674004.691015][2752:2754] CHIP:DMG: EventPath = - [1685674004.691095][2752:2754] CHIP:DMG: { - [1685674004.691171][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.691249][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.691328][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.691403][2752:2754] CHIP:DMG: }, - [1685674004.691481][2752:2754] CHIP:DMG: - [1685674004.691551][2752:2754] CHIP:DMG: EventNumber = 0x17, - [1685674004.691626][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.691701][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879ffb961, - [1685674004.691772][2752:2754] CHIP:DMG: EventData = - [1685674004.691845][2752:2754] CHIP:DMG: { - [1685674004.691921][2752:2754] CHIP:DMG: 0x0 = 2, - [1685674004.692002][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.692082][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.692163][2752:2754] CHIP:DMG: 0x3 = 3, - [1685674004.692245][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.692326][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.692407][2752:2754] CHIP:DMG: 0x6 = 3, - [1685674004.692486][2752:2754] CHIP:DMG: }, - [1685674004.692555][2752:2754] CHIP:DMG: }, - [1685674004.692641][2752:2754] CHIP:DMG: - [1685674004.692700][2752:2754] CHIP:DMG: }, - [1685674004.692779][2752:2754] CHIP:DMG: - [1685674004.692835][2752:2754] CHIP:DMG: ], - [1685674004.693080][2752:2754] CHIP:DMG: - [1685674004.693138][2752:2754] CHIP:DMG: SuppressResponse = true, - [1685674004.693195][2752:2754] CHIP:DMG: InteractionModelRevision = 1 - [1685674004.693249][2752:2754] CHIP:DMG: } - disabled: true - - - label: - "Step 10: DUT sends the Unbolt Door command to the TH with valid - PINCode" - PICS: DRLK.C.C27.Tx - verification: | - ./chip-tool doorlock unbolt-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 123456 --trace_decode 1 - - Verify TH receives Unbolt Door command with SUCCESS response on TH(lock-app) log: - - [1689767521.623730][2330:2332] CHIP:DMG: ICR moving to [ResponseRe] - [1689767521.623822][2330:2332] CHIP:DMG: InvokeResponseMessage = - [1689767521.623877][2330:2332] CHIP:DMG: { - [1689767521.623929][2330:2332] CHIP:DMG: suppressResponse = false, - [1689767521.623983][2330:2332] CHIP:DMG: InvokeResponseIBs = - [1689767521.624054][2330:2332] CHIP:DMG: [ - [1689767521.624109][2330:2332] CHIP:DMG: InvokeResponseIB = - [1689767521.624184][2330:2332] CHIP:DMG: { - [1689767521.624243][2330:2332] CHIP:DMG: CommandStatusIB = - [1689767521.624312][2330:2332] CHIP:DMG: { - [1689767521.624375][2330:2332] CHIP:DMG: CommandPathIB = - [1689767521.624459][2330:2332] CHIP:DMG: { - [1689767521.624537][2330:2332] CHIP:DMG: EndpointId = 0x1, - [1689767521.624616][2330:2332] CHIP:DMG: ClusterId = 0x101, - [1689767521.624761][2330:2332] CHIP:DMG: CommandId = 0x27, - [1689767521.624838][2330:2332] CHIP:DMG: }, - [1689767521.624921][2330:2332] CHIP:DMG: - [1689767521.624986][2330:2332] CHIP:DMG: StatusIB = - [1689767521.625059][2330:2332] CHIP:DMG: { - [1689767521.625135][2330:2332] CHIP:DMG: status = 0x00 (SUCCESS), - [1689767521.625209][2330:2332] CHIP:DMG: }, - [1689767521.625283][2330:2332] CHIP:DMG: - [1689767521.625346][2330:2332] CHIP:DMG: }, - [1689767521.625418][2330:2332] CHIP:DMG: - [1689767521.625476][2330:2332] CHIP:DMG: }, - [1689767521.625547][2330:2332] CHIP:DMG: - [1689767521.625601][2330:2332] CHIP:DMG: ], - [1689767521.625671][2330:2332] CHIP:DMG: - [1689767521.625725][2330:2332] CHIP:DMG: InteractionModelRevision = 1 - [1689767521.625779][2330:2332] CHIP:DMG: }, - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_FAN_3_2.yaml b/src/app/tests/suites/certification/Test_TC_FAN_3_2.yaml index 00c34297c69e15..4375b03cec064b 100644 --- a/src/app/tests/suites/certification/Test_TC_FAN_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_FAN_3_2.yaml @@ -40,8 +40,8 @@ tests: saveAs: rSpeedMax - label: - "Step 3: TH writes TH writes to the DUT the a value less than or equal - to the value read in step 2" + "Step 3: TH writes to the DUT the a value less than or equal to the + value read in step 2" PICS: FAN.S.A0005 command: "writeAttribute" attribute: "SpeedSetting" @@ -57,14 +57,14 @@ tests: - name: "ms" value: 1000 - - label: "Step 4: TH reads from the DUT the the SpeedSetting attribute" + - label: "Step 4: TH reads from the DUT the SpeedSetting attribute" PICS: FAN.S.A0005 command: "readAttribute" attribute: "SpeedSetting" response: value: rSpeedMax - - label: "Step 5: TH reads from the DUT the the SpeedCurrent attribute" + - label: "Step 5: TH reads from the DUT the SpeedCurrent attribute" PICS: FAN.S.A0006 command: "readAttribute" attribute: "SpeedCurrent" diff --git a/src/app/tests/suites/certification/Test_TC_FAN_3_3.yaml b/src/app/tests/suites/certification/Test_TC_FAN_3_3.yaml deleted file mode 100644 index 091d097bfa0c7f..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_FAN_3_3.yaml +++ /dev/null @@ -1,175 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 263.2.8. [TC-FAN-3.3] Optional rock functionality with DUT as Server - -PICS: - - FAN.S - - FAN.S.F03 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Step 1: Commission DUT to TH" - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the RockSupport attribute and store" - PICS: FAN.S.A0007 - verification: | - ./chip-tool fancontrol read rock-support 1 1 - - On TH(chip-tool), Verify the RockSupport attribute value is in the range of 1 to 7. - - [1689757789.384816][23225:23227] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0007 DataVersion: 1958137194 - [1689757789.384890][23225:23227] CHIP:TOO: RockSupport: 3 - disabled: true - - - label: - "Step 3: If the RockSupport attribute read above has bit 0 set, then - TH writes to the DUT the RockSetting attribute with 0x01" - PICS: FAN.S.A0008( - verification: | - ./chip-tool fancontrol write rock-setting 1 1 1 - - On TH(chip-tool), Verify the SUCCESS response for RockSetting attribute write function - - [1685104690.737557][30753:30755] CHIP:DMG: Endpoint = 0x1, - [1685104690.737632][30753:30755] CHIP:DMG: Cluster = 0x202, - [1685104690.737707][30753:30755] CHIP:DMG: Attribute = 0x0000_0008, - [1685104690.737825][30753:30755] CHIP:DMG: } - [1685104690.737911][30753:30755] CHIP:DMG: - [1685104690.737980][30753:30755] CHIP:DMG: StatusIB = - [1685104690.738051][30753:30755] CHIP:DMG: { - [1685104690.738122][30753:30755] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104690.738199][30753:30755] CHIP:DMG: }, - [1685104690.738270][30753:30755] CHIP:DMG: - [1685104690.738330][30753:30755] CHIP:DMG: }, - [1685104690.738400][30753:30755] CHIP:DMG: - [1685104690.738455][30753:30755] CHIP:DMG: ], - [1685104690.738524][30753:30755] CHIP:DMG: - [1685104690.738579][30753:30755] CHIP:DMG: InteractionModelRevision = 1 - [1685104690.738632][30753:30755] CHIP:DMG: } - [1685104690.738790][30753:30755] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 4: If the previous step is written, after a few seconds, TH - reads from the DUT the RockSetting attribute" - PICS: FAN.S.A0008 - verification: | - ./chip-tool fancontrol read rock-setting 1 1 - - On TH(chip-tool), Verify the RockSetting attribute value as 1. - - [1689757942.179085][23325:23327] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0008 DataVersion: 1958137195 - [1689757942.179162][23325:23327] CHIP:TOO: RockSetting: 1 - disabled: true - - - label: - "Step 5: If the RockSupport attribute read above has bit 1 set, then - TH writes to the DUT the RockSetting attribute with 0x02" - PICS: FAN.S.A0008 - verification: | - ./chip-tool fancontrol write rock-setting 2 1 1 - - On TH(chip-tool), Verify the SUCCESS response for RockSetting attribute write function - - [1685104690.737408][30753:30755] CHIP:DMG: AttributePathIB = - [1685104690.737488][30753:30755] CHIP:DMG: { - [1685104690.737557][30753:30755] CHIP:DMG: Endpoint = 0x1, - [1685104690.737632][30753:30755] CHIP:DMG: Cluster = 0x202, - [1685104690.737707][30753:30755] CHIP:DMG: Attribute = 0x0000_0008, - [1685104690.737825][30753:30755] CHIP:DMG: } - [1685104690.737911][30753:30755] CHIP:DMG: - [1685104690.737980][30753:30755] CHIP:DMG: StatusIB = - [1685104690.738051][30753:30755] CHIP:DMG: { - [1685104690.738122][30753:30755] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104690.738199][30753:30755] CHIP:DMG: }, - [1685104690.738270][30753:30755] CHIP:DMG: - [1685104690.738330][30753:30755] CHIP:DMG: }, - [1685104690.738400][30753:30755] CHIP:DMG: - [1685104690.738455][30753:30755] CHIP:DMG: ], - [1685104690.738524][30753:30755] CHIP:DMG: - [1685104690.738579][30753:30755] CHIP:DMG: InteractionModelRevision = 1 - [1685104690.738632][30753:30755] CHIP:DMG: } - [1685104690.738790][30753:30755] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 6: If the previous step is written, after a few seconds, TH - reads from the DUT the RockSetting attribute" - PICS: FAN.S.A0008 - verification: | - ./chip-tool fancontrol read rock-setting 1 1 - - On TH(chip-tool), Verify the RockSetting attribute value as 2. - - [1689757942.179085][23325:23327] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0008 DataVersion: 1958137195 - [1689757942.179162][23325:23327] CHIP:TOO: RockSetting: 2 - disabled: true - - - label: - "Step 7: If the RockSupport attribute read above has bit 2 set, then - TH writes to the DUT the RockSetting attribute with 0x04" - PICS: FAN.S.A0008 - verification: | - ./chip-tool fancontrol write rock-setting 4 1 1 - - On TH(chip-tool), Verify the SUCCESS response for RockSetting attribute write function - - Current sample apps do not have RockSupport attribute bit 2 . However, if the vendor has implemented it, the below response will be displayed. - - [1685104690.737408][30753:30755] CHIP:DMG: AttributePathIB = - [1685104690.737488][30753:30755] CHIP:DMG: { - [1685104690.737557][30753:30755] CHIP:DMG: Endpoint = 0x1, - [1685104690.737632][30753:30755] CHIP:DMG: Cluster = 0x202, - [1685104690.737707][30753:30755] CHIP:DMG: Attribute = 0x0000_0008, - [1685104690.737825][30753:30755] CHIP:DMG: } - [1685104690.737911][30753:30755] CHIP:DMG: - [1685104690.737980][30753:30755] CHIP:DMG: StatusIB = - [1685104690.738051][30753:30755] CHIP:DMG: { - [1685104690.738122][30753:30755] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104690.738199][30753:30755] CHIP:DMG: }, - [1685104690.738270][30753:30755] CHIP:DMG: - [1685104690.738330][30753:30755] CHIP:DMG: }, - [1685104690.738400][30753:30755] CHIP:DMG: - [1685104690.738455][30753:30755] CHIP:DMG: ], - [1685104690.738524][30753:30755] CHIP:DMG: - [1685104690.738579][30753:30755] CHIP:DMG: InteractionModelRevision = 1 - [1685104690.738632][30753:30755] CHIP:DMG: } - [1685104690.738790][30753:30755] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 8: If the previous step is written, after a few seconds, TH - reads from the DUT the RockSetting attribute" - PICS: FAN.S.A0008 - verification: | - Note : Execute only if STEP 7 resulted with SUCCESS - - ./chip-tool fancontrol read rock-setting 1 1 - - On TH(chip-tool), Verify the RockSetting attribute value as 4. - - Current sample apps do not have RockSupport attribute bit 2 . However, if the vendor has implemented it, the below response will be displayed. - - [1689757942.179085][23325:23327] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0008 DataVersion: 1958137195 - [1689757942.179162][23325:23327] CHIP:TOO: RockSetting: 4 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_FAN_3_5.yaml b/src/app/tests/suites/certification/Test_TC_FAN_3_5.yaml deleted file mode 100644 index ec221dec3c2fd3..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_FAN_3_5.yaml +++ /dev/null @@ -1,592 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 263.2.10. [TC-FAN-3.5] Optional step functionality with DUT as Server - -PICS: - - FAN.S - - FAN.S.F04 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Step 1: Commission DUT to TH" - verification: | - - disabled: true - - - label: - "Step 2a: TH writes to the DUT the PercentSetting attribute with 50" - PICS: FAN.S.A0002 - verification: | - ./chip-tool fancontrol write percent-setting 50 1 1 - - On TH(chip-tool), Verify the SUCCESS response for FanMode attribute successful write. - - [1689758735.697705][23402:23404] CHIP:DMG: AttributePathIB = - [1689758735.697729][23402:23404] CHIP:DMG: { - [1689758735.697755][23402:23404] CHIP:DMG: Endpoint = 0x1, - [1689758735.697780][23402:23404] CHIP:DMG: Cluster = 0x202, - [1689758735.697805][23402:23404] CHIP:DMG: Attribute = 0x0000_0002, - [1689758735.697829][23402:23404] CHIP:DMG: } - [1689758735.697856][23402:23404] CHIP:DMG: - [1689758735.697879][23402:23404] CHIP:DMG: StatusIB = - [1689758735.697903][23402:23404] CHIP:DMG: { - [1689758735.697928][23402:23404] CHIP:DMG: status = 0x00 (SUCCESS), - [1689758735.697953][23402:23404] CHIP:DMG: }, - [1689758735.697976][23402:23404] CHIP:DMG: - [1689758735.697997][23402:23404] CHIP:DMG: }, - disabled: true - - - label: - "Step 2b: after a few seconds, TH reads from the DUT the - PercentCurrent attribute" - PICS: FAN.S.A0003 - verification: | - ./chip-tool fancontrol read percent-current 1 1 - - On TH(chip-tool), Verify the PercentCurrent attribute value is in the range of 0 to 100. - - [1685105264.946295][30821:30823] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0003 DataVersion: 3398333304 - [1685105264.946447][30821:30823] CHIP:TOO: PercentCurrent: 50 - disabled: true - - - label: - "Step 2c: TH sends Step command to DUT with Direction set to Increase" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 0 1 1 - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 2d: after a few seconds, TH reads from the DUT the - PercentCurrent attribute" - PICS: FAN.S.A0003 - verification: | - ./chip-tool fancontrol read percent-current 1 1 - - On TH(chip-tool), Verify the PercentCurrent attribute value is higher than step 2b. - - [1685105264.946295][30821:30823] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0003 DataVersion: 3398333304 - [1685105264.946447][30821:30823] CHIP:TOO: PercentCurrent: 50 - disabled: true - - - label: - "Step 3a: TH writes to the DUT the PercentSetting attribute with 50" - PICS: FAN.S.A0002 - verification: | - ./chip-tool fancontrol write percent-setting 50 1 1 - - On TH(chip-tool), Verify the SUCCESS response for FanMode attribute successful write. - - [1689758735.697705][23402:23404] CHIP:DMG: AttributePathIB = - [1689758735.697729][23402:23404] CHIP:DMG: { - [1689758735.697755][23402:23404] CHIP:DMG: Endpoint = 0x1, - [1689758735.697780][23402:23404] CHIP:DMG: Cluster = 0x202, - [1689758735.697805][23402:23404] CHIP:DMG: Attribute = 0x0000_0002, - [1689758735.697829][23402:23404] CHIP:DMG: } - [1689758735.697856][23402:23404] CHIP:DMG: - [1689758735.697879][23402:23404] CHIP:DMG: StatusIB = - [1689758735.697903][23402:23404] CHIP:DMG: { - [1689758735.697928][23402:23404] CHIP:DMG: status = 0x00 (SUCCESS), - [1689758735.697953][23402:23404] CHIP:DMG: }, - [1689758735.697976][23402:23404] CHIP:DMG: - [1689758735.697997][23402:23404] CHIP:DMG: }, - disabled: true - - - label: - "Step 3b: after a few seconds, TH reads from the DUT the - PercentCurrent attribute" - PICS: FAN.S.A0003 - verification: | - ./chip-tool fancontrol read percent-current 1 1 - - On TH(chip-tool), Verify the PercentCurrent attribute value is in the range of 0 to 100. - - [1685105264.946295][30821:30823] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0003 DataVersion: 3398333304 - [1685105264.946447][30821:30823] CHIP:TOO: PercentCurrent: 50 - disabled: true - - - label: - "Step 3c: TH sends Step command to DUT with Direction set to Decrease" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 1 1 1 - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 3d: after a few seconds, TH reads from the DUT the - PercentCurrent attribute" - PICS: FAN.S.A0003 - verification: | - ./chip-tool fancontrol read percent-current 1 1 - - On TH(chip-tool), Verify the PercentCurrent attribute value is lower than step 3b. - - [1685105264.946295][30821:30823] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0003 DataVersion: 3398333304 - [1685105264.946447][30821:30823] CHIP:TOO: PercentCurrent: 50 - disabled: true - - - label: "Step 4a: TH reads from the DUT the SpeedMax attribute" - PICS: FAN.S.A0004 - verification: | - ./chip-tool fancontrol read speed-max 1 1 - - On TH(chip-tool), Verify the SpeedMax attribute value is in the range of 1 to 100. - - [1688647242.182652][7491:7493] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0004 DataVersion: 2333446701 - [1688647242.182906][7491:7493] CHIP:TOO: SpeedMax: 100 - [1688647242.183197][7491:7493] CHIP:EM: <<< [E:6958i S:20670 M:246576408 (Ack:49619178)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 4b: TH writes to the DUT the SpeedSetting attribute with value - read from step 4a" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 100 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 4c: after a few seconds, TH sends Step command to DUT with - Direction set to Increase and Wrap set to false" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 0 1 1 --Wrap false - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 4d: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is lower than step 4a. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 100 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 5a: TH writes to the DUT the SpeedSetting attribute with value - read from step 4a" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 100 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 5b: after a few seconds, TH sends Step command to DUT with - Direction set to Increase, Wrap set to true, and LowestOff set to - false" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 0 1 1 --Wrap true --LowestOff false - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 5c: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is 1. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 100 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 6a: TH writes to the DUT the SpeedSetting attribute with value - read from step 4a" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 100 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 6b: after a few seconds, TH sends Step command to DUT with - Direction set to Increase, Wrap set to true, and LowestOff set to true" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 0 1 1 --Wrap true --LowestOff true - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 6c: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is 0. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 100 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 7a: TH writes to the DUT the SpeedSetting attribute with a value - of 1" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 1 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 7b: after a few seconds, TH sends Step command to DUT with - Direction set to Decrease and Wrap set to false and LowestOff set to - false" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 1 1 1 --Wrap false --LowestOff false - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 7c: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is 1. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 1 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: "Step 8a: TH reads from the DUT the SpeedMax attribute" - PICS: FAN.S.A0004 - verification: | - ./chip-tool fancontrol read speed-max 1 1 - - On TH(chip-tool), Verify the SpeedMax attribute value is in the range of 1 to 100. - - [1688647242.182652][7491:7493] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0004 DataVersion: 2333446701 - [1688647242.182906][7491:7493] CHIP:TOO: SpeedMax: 100 - [1688647242.183197][7491:7493] CHIP:EM: <<< [E:6958i S:20670 M:246576408 (Ack:49619178)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 8b: TH writes to the DUT the SpeedSetting attribute with a value - of 1" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 1 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 8c: after a few seconds, TH sends Step command to DUT with - Direction set to Decrease, Wrap set to true, and LowestOff set to - false" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 1 1 1 --Wrap true --LowestOff false - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 8d: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is same as step 8a. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 1 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: "Step 9a: TH reads from the DUT the SpeedMax attribute" - PICS: FAN.S.A0004 - verification: | - ./chip-tool fancontrol read speed-max 1 1 - - On TH(chip-tool), Verify the SpeedMax attribute value is in the range of 1 to 100. - - [1688647242.182652][7491:7493] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0004 DataVersion: 2333446701 - [1688647242.182906][7491:7493] CHIP:TOO: SpeedMax: 100 - [1688647242.183197][7491:7493] CHIP:EM: <<< [E:6958i S:20670 M:246576408 (Ack:49619178)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 9b: TH writes to the DUT the SpeedSetting attribute with value - of zero" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 0 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 9c: after a few seconds, TH sends Step command to DUT with - Direction set to Decrease, Wrap set to true, and LowestOff set to true" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 1 1 1 --Wrap true --LowestOff true - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 9d: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is same as step 9a. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 0 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_FLABEL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_FLABEL_3_1_Simulated.yaml deleted file mode 100644 index e109c22a0669cd..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_FLABEL_3_1_Simulated.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 98.3.1. [TC-FLABEL-1.1] Global Attributes with DUT as Server - -PICS: - - FLABEL.C - -config: - nodeId: 0x12344321 - cluster: "Fixed Label" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads LabelList from the TH" - PICS: FLABEL.C.A0000 - wait: "readAttribute" - attribute: "LabelList" diff --git a/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml index f1e8e72ae0ada9..c55f58614d0f2a 100644 --- a/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: FLDCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !FLDCONC.S.F00 && !FLDCONC.S.F01 && !FLDCONC.S.F02 && !FLDCONC.S.F03 + && !FLDCONC.S.F04 && !FLDCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F00 + PICS: FLDCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F00 + PICS: " !FLDCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F01 + PICS: FLDCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F01 + PICS: " !FLDCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F02 + PICS: FLDCONC.S.F02 && FLDCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F02 + PICS: " !FLDCONC.S.F02 && !FLDCONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F03 + PICS: FLDCONC.S.F03 && FLDCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F03 + PICS: " !FLDCONC.S.F03 && !FLDCONC.S.F01 " response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F04 + PICS: FLDCONC.S.F04 && FLDCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F04 + PICS: " !FLDCONC.S.F04 && !FLDCONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F05 + PICS: FLDCONC.S.F05 && FLDCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F05 + PICS: " !FLDCONC.S.F05 && !FLDCONC.S.F00" response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && FLDCONC.S.A0007 && FLDCONC.S.F00 + PICS: FLDCONC.S.A0007 && FLDCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when FLDCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && !FLDCONC.S.A0007 + PICS: " !FLDCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && FLDCONC.S.F00 + PICS: FLDCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when FLDCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && !FLDCONC.S.F00 + PICS: " !FLDCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && FLDCONC.S.F04 + PICS: FLDCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when FLDCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && !FLDCONC.S.F04 + PICS: " !FLDCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && FLDCONC.S.F05 + PICS: FLDCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: FLDCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && !FLDCONC.S.F05 + PICS: " !FLDCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && FLDCONC.S.F01 + PICS: FLDCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: FLDCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && !FLDCONC.S.F01 + PICS: " !FLDCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: FLDCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: FLDCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_FLW_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_FLW_3_1_Simulated.yaml deleted file mode 100644 index 24db2438da578c..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_FLW_3_1_Simulated.yaml +++ /dev/null @@ -1,415 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 31.3.1. [TC-FLW-3.1] Attributes with Client as DUT - -PICS: - - FLW.C - - FLW.C.AM-READ - - FLW.C.AO-READ - - FLW.C.AM-WRITE - - FLW.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Flow Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: MeasuredValue" - PICS: FLW.C.AM-READ - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute: MinMeasuredValue" - PICS: FLW.C.AM-READ - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute: MaxMeasuredValue" - PICS: FLW.C.AM-READ - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute: Tolerance" - PICS: FLW.C.AO-READ - wait: "readAttribute" - attribute: "Tolerance" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again." - verification: | - Verify TH(all-clusters-minimal-app) that it implements mandatory and none of the optional attributes of the server-side of the cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. - - ./chip-tool flowmeasurement read attribute-list 1 1 - - Verify AttributeList response on the TH(all-clusters-minimal-app) Log: - - ReportDataMessage = - [1666851487.507946][18927:18927] CHIP:DMG: { - [1666851487.507950][18927:18927] CHIP:DMG: AttributeReportIBs = - [1666851487.507957][18927:18927] CHIP:DMG: [ - [1666851487.507961][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.507969][18927:18927] CHIP:DMG: { - [1666851487.507974][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.507979][18927:18927] CHIP:DMG: { - [1666851487.507984][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.507990][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.507995][18927:18927] CHIP:DMG: { - [1666851487.508001][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508007][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508012][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508018][18927:18927] CHIP:DMG: } - [1666851487.508024][18927:18927] CHIP:DMG: - [1666851487.508030][18927:18927] CHIP:DMG: Data = [ - [1666851487.508035][18927:18927] CHIP:DMG: - [1666851487.508041][18927:18927] CHIP:DMG: ], - [1666851487.508045][18927:18927] CHIP:DMG: }, - [1666851487.508053][18927:18927] CHIP:DMG: - [1666851487.508057][18927:18927] CHIP:DMG: }, - [1666851487.508068][18927:18927] CHIP:DMG: - [1666851487.508072][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508080][18927:18927] CHIP:DMG: { - [1666851487.508085][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508089][18927:18927] CHIP:DMG: { - [1666851487.508094][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508098][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508104][18927:18927] CHIP:DMG: { - [1666851487.508108][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508113][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508119][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508124][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508128][18927:18927] CHIP:DMG: } - [1666851487.508134][18927:18927] CHIP:DMG: - [1666851487.508139][18927:18927] CHIP:DMG: Data = 0, - [1666851487.508143][18927:18927] CHIP:DMG: }, - [1666851487.508149][18927:18927] CHIP:DMG: - [1666851487.508152][18927:18927] CHIP:DMG: }, - [1666851487.508161][18927:18927] CHIP:DMG: - [1666851487.508165][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508173][18927:18927] CHIP:DMG: { - [1666851487.508178][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508183][18927:18927] CHIP:DMG: { - [1666851487.508189][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508194][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508199][18927:18927] CHIP:DMG: { - [1666851487.508204][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508210][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508216][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508221][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508225][18927:18927] CHIP:DMG: } - [1666851487.508232][18927:18927] CHIP:DMG: - [1666851487.508237][18927:18927] CHIP:DMG: Data = 1, - [1666851487.508242][18927:18927] CHIP:DMG: }, - [1666851487.508249][18927:18927] CHIP:DMG: - [1666851487.508254][18927:18927] CHIP:DMG: }, - [1666851487.508264][18927:18927] CHIP:DMG: - [1666851487.508268][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508275][18927:18927] CHIP:DMG: { - [1666851487.508280][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508285][18927:18927] CHIP:DMG: { - [1666851487.508289][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508293][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508298][18927:18927] CHIP:DMG: { - [1666851487.508303][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508307][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508314][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508318][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508324][18927:18927] CHIP:DMG: } - [1666851487.508331][18927:18927] CHIP:DMG: - [1666851487.508337][18927:18927] CHIP:DMG: Data = 2, - [1666851487.508341][18927:18927] CHIP:DMG: }, - [1666851487.508348][18927:18927] CHIP:DMG: - [1666851487.508353][18927:18927] CHIP:DMG: }, - [1666851487.508363][18927:18927] CHIP:DMG: - [1666851487.508367][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508374][18927:18927] CHIP:DMG: { - [1666851487.508377][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508382][18927:18927] CHIP:DMG: { - [1666851487.508386][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508390][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508395][18927:18927] CHIP:DMG: { - [1666851487.508399][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508406][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508411][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508416][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508420][18927:18927] CHIP:DMG: } - [1666851487.508426][18927:18927] CHIP:DMG: - [1666851487.508431][18927:18927] CHIP:DMG: Data = 65528, - [1666851487.508436][18927:18927] CHIP:DMG: }, - [1666851487.508443][18927:18927] CHIP:DMG: - [1666851487.508447][18927:18927] CHIP:DMG: }, - [1666851487.508456][18927:18927] CHIP:DMG: - [1666851487.508461][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508468][18927:18927] CHIP:DMG: { - [1666851487.508471][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508475][18927:18927] CHIP:DMG: { - [1666851487.508480][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508486][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508491][18927:18927] CHIP:DMG: { - [1666851487.508495][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508500][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508506][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508511][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508515][18927:18927] CHIP:DMG: } - [1666851487.508521][18927:18927] CHIP:DMG: - [1666851487.508526][18927:18927] CHIP:DMG: Data = 65529, - [1666851487.508531][18927:18927] CHIP:DMG: }, - [1666851487.508538][18927:18927] CHIP:DMG: - [1666851487.508543][18927:18927] CHIP:DMG: }, - [1666851487.508554][18927:18927] CHIP:DMG: - [1666851487.508557][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508564][18927:18927] CHIP:DMG: { - [1666851487.508569][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508574][18927:18927] CHIP:DMG: { - [1666851487.508579][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508584][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508590][18927:18927] CHIP:DMG: { - [1666851487.508595][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508601][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508607][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508611][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508616][18927:18927] CHIP:DMG: } - [1666851487.508622][18927:18927] CHIP:DMG: - [1666851487.508627][18927:18927] CHIP:DMG: Data = 65531, - [1666851487.508632][18927:18927] CHIP:DMG: }, - [1666851487.508638][18927:18927] CHIP:DMG: - [1666851487.508642][18927:18927] CHIP:DMG: }, - [1666851487.508652][18927:18927] CHIP:DMG: - [1666851487.508656][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508663][18927:18927] CHIP:DMG: { - [1666851487.508668][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508673][18927:18927] CHIP:DMG: { - [1666851487.508678][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508683][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508688][18927:18927] CHIP:DMG: { - [1666851487.508692][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508699][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508705][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508710][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508714][18927:18927] CHIP:DMG: } - [1666851487.508721][18927:18927] CHIP:DMG: - [1666851487.508726][18927:18927] CHIP:DMG: Data = 65532, - [1666851487.508730][18927:18927] CHIP:DMG: }, - [1666851487.508737][18927:18927] CHIP:DMG: - [1666851487.508741][18927:18927] CHIP:DMG: }, - [1666851487.508750][18927:18927] CHIP:DMG: - [1666851487.508754][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508761][18927:18927] CHIP:DMG: { - [1666851487.508766][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508771][18927:18927] CHIP:DMG: { - [1666851487.508775][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508780][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508785][18927:18927] CHIP:DMG: { - [1666851487.508790][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508796][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508803][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508808][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508814][18927:18927] CHIP:DMG: } - [1666851487.508820][18927:18927] CHIP:DMG: - [1666851487.508825][18927:18927] CHIP:DMG: Data = 65533, - [1666851487.508829][18927:18927] CHIP:DMG: }, - [1666851487.508836][18927:18927] CHIP:DMG: - [1666851487.508840][18927:18927] CHIP:DMG: }, - [1666851487.508847][18927:18927] CHIP:DMG: - [1666851487.508851][18927:18927] CHIP:DMG: ], - [1666851487.508879][18927:18927] CHIP:DMG: - [1666851487.508884][18927:18927] CHIP:DMG: SuppressResponse = true, - [1666851487.508888][18927:18927] CHIP:DMG: InteractionModelRevision = 1 - [1666851487.508892][18927:18927] CHIP:DMG: } - [1666851487.508896][18927:18927] CHIP:DMG: - - - - ./chip-tool flowmeasurement read feature-map 1 1 - - Verify FeatureMap attribute response on the TH(all-clusters-minimal-app) Log: - - ReportDataMessage = - [1666851643.847203][18927:18927] CHIP:DMG: { - [1666851643.847206][18927:18927] CHIP:DMG: AttributeReportIBs = - [1666851643.847211][18927:18927] CHIP:DMG: [ - [1666851643.847214][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851643.847219][18927:18927] CHIP:DMG: { - [1666851643.847222][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851643.847226][18927:18927] CHIP:DMG: { - [1666851643.847229][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851643.847232][18927:18927] CHIP:DMG: AttributePathIB = - [1666851643.847236][18927:18927] CHIP:DMG: { - [1666851643.847240][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851643.847244][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851643.847249][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666851643.847252][18927:18927] CHIP:DMG: } - [1666851643.847256][18927:18927] CHIP:DMG: - [1666851643.847261][18927:18927] CHIP:DMG: Data = 0, - [1666851643.847264][18927:18927] CHIP:DMG: }, - [1666851643.847269][18927:18927] CHIP:DMG: - [1666851643.847272][18927:18927] CHIP:DMG: }, - [1666851643.847276][18927:18927] CHIP:DMG: - [1666851643.847279][18927:18927] CHIP:DMG: ], - [1666851643.847285][18927:18927] CHIP:DMG: - [1666851643.847288][18927:18927] CHIP:DMG: SuppressResponse = true, - [1666851643.847291][18927:18927] CHIP:DMG: InteractionModelRevision = 1 - [1666851643.847294][18927:18927] CHIP:DMG: } - - - ./chip-tool flowmeasurement read measured-value 1 1 - - Verify MeasuredValue response on the TH(all-clusters-minimal-app) Log: - - ReportDataMessage = - [1666851671.893452][18927:18927] CHIP:DMG: { - [1666851671.893455][18927:18927] CHIP:DMG: AttributeReportIBs = - [1666851671.893460][18927:18927] CHIP:DMG: [ - [1666851671.893462][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851671.893467][18927:18927] CHIP:DMG: { - [1666851671.893471][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851671.893476][18927:18927] CHIP:DMG: { - [1666851671.893479][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851671.893484][18927:18927] CHIP:DMG: AttributePathIB = - [1666851671.893487][18927:18927] CHIP:DMG: { - [1666851671.893493][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851671.893496][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851671.893501][18927:18927] CHIP:DMG: Attribute = 0x0000_0000, - [1666851671.893506][18927:18927] CHIP:DMG: } - [1666851671.893511][18927:18927] CHIP:DMG: - [1666851671.893517][18927:18927] CHIP:DMG: Data = 0, - [1666851671.893520][18927:18927] CHIP:DMG: }, - [1666851671.893526][18927:18927] CHIP:DMG: - [1666851671.893529][18927:18927] CHIP:DMG: }, - [1666851671.893534][18927:18927] CHIP:DMG: - [1666851671.893538][18927:18927] CHIP:DMG: ], - [1666851671.893545][18927:18927] CHIP:DMG: - [1666851671.893549][18927:18927] CHIP:DMG: SuppressResponse = true, - [1666851671.893552][18927:18927] CHIP:DMG: InteractionModelRevision = 1 - [1666851671.893555][18927:18927] CHIP:DMG: } - - - - ./chip-tool flowmeasurement read min-measured-value 1 1 - - Verify MinMeasuredValue response on the TH(all-clusters-minimal-app) Log: - - ReportDataMessage = - [1666851700.451575][18927:18927] CHIP:DMG: { - [1666851700.451579][18927:18927] CHIP:DMG: AttributeReportIBs = - [1666851700.451585][18927:18927] CHIP:DMG: [ - [1666851700.451589][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851700.451596][18927:18927] CHIP:DMG: { - [1666851700.451599][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851700.451603][18927:18927] CHIP:DMG: { - [1666851700.451606][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851700.451611][18927:18927] CHIP:DMG: AttributePathIB = - [1666851700.451615][18927:18927] CHIP:DMG: { - [1666851700.451620][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851700.451625][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851700.451630][18927:18927] CHIP:DMG: Attribute = 0x0000_0001, - [1666851700.451633][18927:18927] CHIP:DMG: } - [1666851700.451638][18927:18927] CHIP:DMG: - [1666851700.451644][18927:18927] CHIP:DMG: Data = 0, - [1666851700.451647][18927:18927] CHIP:DMG: }, - [1666851700.451652][18927:18927] CHIP:DMG: - [1666851700.451655][18927:18927] CHIP:DMG: }, - [1666851700.451661][18927:18927] CHIP:DMG: - [1666851700.451665][18927:18927] CHIP:DMG: ], - [1666851700.451671][18927:18927] CHIP:DMG: - [1666851700.451674][18927:18927] CHIP:DMG: SuppressResponse = true, - [1666851700.451677][18927:18927] CHIP:DMG: InteractionModelRevision = 1 - [1666851700.451681][18927:18927] CHIP:DMG: } - - - ./chip-tool flowmeasurement read max-measured-value 1 1 - - Verify MaxMeasured Value response on the TH(all-clusters-minimal-app) Log: - - ReportDataMessage = - [1666851727.140175][18927:18927] CHIP:DMG: { - [1666851727.140178][18927:18927] CHIP:DMG: AttributeReportIBs = - [1666851727.140185][18927:18927] CHIP:DMG: [ - [1666851727.140190][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851727.140197][18927:18927] CHIP:DMG: { - [1666851727.140201][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851727.140206][18927:18927] CHIP:DMG: { - [1666851727.140210][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851727.140214][18927:18927] CHIP:DMG: AttributePathIB = - [1666851727.140220][18927:18927] CHIP:DMG: { - [1666851727.140225][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851727.140230][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851727.140235][18927:18927] CHIP:DMG: Attribute = 0x0000_0002, - [1666851727.140240][18927:18927] CHIP:DMG: } - [1666851727.140247][18927:18927] CHIP:DMG: - [1666851727.140253][18927:18927] CHIP:DMG: Data = 0, - [1666851727.140258][18927:18927] CHIP:DMG: }, - [1666851727.140264][18927:18927] CHIP:DMG: - [1666851727.140267][18927:18927] CHIP:DMG: }, - [1666851727.140275][18927:18927] CHIP:DMG: - [1666851727.140278][18927:18927] CHIP:DMG: ], - [1666851727.140285][18927:18927] CHIP:DMG: - [1666851727.140290][18927:18927] CHIP:DMG: SuppressResponse = true, - [1666851727.140295][18927:18927] CHIP:DMG: InteractionModelRevision = 1 - [1666851727.140298][18927:18927] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - Verify TH(all-clusters-minimal-app) receives the read command, and responds that this attribute is not available and also DUT is aware that the optional attributes are not available, and does not issue read requests for the attributes which it did read in step 2 - - - ./chip-tool flowmeasurement read tolerance 1 1 - - Verify Tolerance response on the TH(all-clusters-minimal-app) Log: - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && FLW.C.AO-READ - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml b/src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml new file mode 100644 index 00000000000000..4f9f2db080c1c3 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml @@ -0,0 +1,232 @@ +# 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. + +name: 26.1.1. [TC-GRPKEY-1.1] Global Attributes with DUT as Server + +PICS: + - GRPKEY.S + +config: + nodeId: 0x12344321 + cluster: "Group Key Management" + endpoint: 0 + +tests: + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + #Please refer Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3280 + - label: "Step 2: TH reads the ClusterRevision from DUT" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 2 + constraints: + type: int16u + + - label: "Step 3a: TH reads the FeatureMap from DUT" + PICS: " !GRPKEY.S.F00 " + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + + - label: + "Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit + set" + PICS: GRPKEY.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] + + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] + + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: " !PICS_EVENT_LIST_ENABLED " + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + + - label: + "Step 4b: The list SHALL NOT contain any additional values in the + standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 + - 0x0000_FFFE). 2.The list MAY contain values in the Manufacturer + Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where + XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be + ignored. 3.TThe list SHALL NOT contain any values in the Test Vendor + or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), + (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where + XXXX is the allowed MEI range (0x0001 - 0xFFF1)" + verification: | + ./chip-tool groupkeymanagement read attribute-list 1 0 + + Verify the "AttributeList" contains the mandatory attribute (values 0, 1, 2, 3) , global attributes ( 65528, 65529, 65530, 65531, 65532, 65533) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + + [1689923270.946521][6116:6118] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFB DataVersion: 4114127542 + [1689923270.946632][6116:6118] CHIP:TOO: AttributeList: 10 entries + [1689923270.946672][6116:6118] CHIP:TOO: [1]: 0 + [1689923270.946705][6116:6118] CHIP:TOO: [2]: 1 + [1689923270.946737][6116:6118] CHIP:TOO: [3]: 2 + [1689923270.946768][6116:6118] CHIP:TOO: [4]: 3 + [1689923270.946800][6116:6118] CHIP:TOO: [5]: 65528 + [1689923270.946831][6116:6118] CHIP:TOO: [6]: 65529 + [1689923270.946862][6116:6118] CHIP:TOO: [7]: 65530 + [1689923270.946893][6116:6118] CHIP:TOO: [8]: 65531 + [1689923270.946924][6116:6118] CHIP:TOO: [9]: 65532 + [1689923270.946956][6116:6118] CHIP:TOO: [10]: 65533 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Step 5a: TH1 reads EventList from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list + + - label: + "Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT + contain any additional values in the standard or scoped range: + (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the + Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - + 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), + these values SHALL be ignored. 3.The list SHALL NOT contain any values + in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), + (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where + XXXX is the allowed MEI range (0x0001 - 0xFFF1)" + verification: | + ./chip-tool groupkeymanagement read event-list 1 0 + + Verify "EventList" contains the list of supported events, for this cluster list is empty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689923450.468055][6130:6132] CHIP:DMG: } + [1689923450.468251][6130:6132] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFA DataVersion: 4114127542 + [1689923450.468339][6130:6132] CHIP:TOO: EventList: 0 entries + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Step 6a: TH reads AcceptedCommandList from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0, 1, 3, 4] + + - label: + "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list + MAY contain values in the Manufacturer Extensible Identifier (MEI) + range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI + range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list + SHALL NOT contain any values in the Test Vendor or invalid range: + (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and + (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range + (0x0001 - 0xFFF1)" + verification: | + ./chip-tool groupkeymanagement read accepted-command-list 1 0 + + Verify the "AcceptedCommandList" contains a list of mandatory commands (values 0, 1, 3, 4) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + + [1689923406.548840][6123:6125] CHIP:DMG: } + [1689923406.549076][6123:6125] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFF9 DataVersion: 4114127542 + [1689923406.549164][6123:6125] CHIP:TOO: AcceptedCommandList: 4 entries + [1689923406.549197][6123:6125] CHIP:TOO: [1]: 0 + [1689923406.549225][6123:6125] CHIP:TOO: [2]: 1 + [1689923406.549252][6123:6125] CHIP:TOO: [3]: 3 + [1689923406.549279][6123:6125] CHIP:TOO: [4]: 4 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Step 7a: TH reads GeneratedCommandList from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + type: list + contains: [2, 5] + + - label: + "Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list + MAY contain values in the Manufacturer Extensible Identifier (MEI) + range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI + range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list + SHALL NOT contain any values in the Test Vendor or invalid range: + (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and + (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range + (0x0001 - 0xFFF1)" + verification: | + ./chip-tool groupkeymanagement read generated-command-list 1 0 + + Verify the "GeneratedCommandList" contains al ist of mandatory commands(values 2, 5) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + + [1689923490.959431][6135:6137] CHIP:DMG: } + [1689923490.959610][6135:6137] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFF8 DataVersion: 4114127542 + [1689923490.959684][6135:6137] CHIP:TOO: GeneratedCommandList: 2 entries + [1689923490.959711][6135:6137] CHIP:TOO: [1]: 2 + [1689923490.959734][6135:6137] CHIP:TOO: [2]: 5 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_G_2_4.yaml b/src/app/tests/suites/certification/Test_TC_G_2_4.yaml new file mode 100644 index 00000000000000..22227d62333728 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_G_2_4.yaml @@ -0,0 +1,435 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 131.2.4. [TC-G-2.4] Commands - AddGroup Command with same GroupID on + Multiple Endpoint [DUT-Server] + +PICS: + - G.S + - MCORE.G.MULTIENDPOINT + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Pre-Conditions" + verification: | + 1 Note: This test case is applicable only when DUT supports Group Cluster at least on two end points: PIXIT.G.ENDPOINT,PIXIT.G.ENDPOINT2 + + 2 TH is commissioned with DUT + disabled: true + + - label: + "Step 1: Verify that PIXIT.G.ENDPOINT and PIXIT.G.ENDPOINT2 are + different." + verification: | + Verify that PIXIT.G.ENDPOINT and PIXIT.G.ENDPOINT2 are different. + disabled: true + + - label: + "Step 2: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT on EP0 using a key that is pre-installed on the TH. + GroupKeySet fields are as follows: GroupKeySetID: 1 + GroupKeySecurityPolicy: TrustFirst (0) EpochKey0: + d0d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime0: 2220000 EpochKey1: + d0d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime1: 2220001 EpochKey2: + d0d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime2: 2220002" + verification: | + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": + "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689928280.676270][5573:5576] CHIP:DMG: InvokeResponseMessage = + [1689928280.676273][5573:5576] CHIP:DMG: { + [1689928280.676275][5573:5576] CHIP:DMG: suppressResponse = false, + [1689928280.676277][5573:5576] CHIP:DMG: InvokeResponseIBs = + [1689928280.676280][5573:5576] CHIP:DMG: [ + [1689928280.676281][5573:5576] CHIP:DMG: InvokeResponseIB = + [1689928280.676285][5573:5576] CHIP:DMG: { + [1689928280.676287][5573:5576] CHIP:DMG: CommandStatusIB = + [1689928280.676289][5573:5576] CHIP:DMG: { + [1689928280.676291][5573:5576] CHIP:DMG: CommandPathIB = + [1689928280.676293][5573:5576] CHIP:DMG: { + [1689928280.676295][5573:5576] CHIP:DMG: EndpointId = 0x0, + [1689928280.676297][5573:5576] CHIP:DMG: ClusterId = 0x3f, + [1689928280.676300][5573:5576] CHIP:DMG: CommandId = 0x0, + [1689928280.676302][5573:5576] CHIP:DMG: }, + [1689928280.676304][5573:5576] CHIP:DMG: + [1689928280.676306][5573:5576] CHIP:DMG: StatusIB = + [1689928280.676309][5573:5576] CHIP:DMG: { + [1689928280.676311][5573:5576] CHIP:DMG: status = 0x00 (SUCCESS), + [1689928280.676313][5573:5576] CHIP:DMG: }, + [1689928280.676315][5573:5576] CHIP:DMG: + [1689928280.676317][5573:5576] CHIP:DMG: }, + [1689928280.676320][5573:5576] CHIP:DMG: + [1689928280.676321][5573:5576] CHIP:DMG: }, + [1689928280.676324][5573:5576] CHIP:DMG: + [1689928280.676326][5573:5576] CHIP:DMG: ], + [1689928280.676328][5573:5576] CHIP:DMG: + disabled: true + + - label: + "Step 3: TH writes the GroupKeyMap attribute in the GroupKeyManagement + cluster on EP0 with one entry binding GroupId(0x0001) with + GroupKeySetID 1" + verification: | + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 1, "fabricIndex": 1} ]' 1 0 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + 1689928416.859884][5757:5760] CHIP:DMG: WriteResponseMessage = + [1689928416.859894][5757:5760] CHIP:DMG: { + [1689928416.859903][5757:5760] CHIP:DMG: AttributeStatusIBs = + [1689928416.859921][5757:5760] CHIP:DMG: [ + [1689928416.859931][5757:5760] CHIP:DMG: AttributeStatusIB = + [1689928416.859943][5757:5760] CHIP:DMG: { + [1689928416.859953][5757:5760] CHIP:DMG: AttributePathIB = + [1689928416.859964][5757:5760] CHIP:DMG: { + [1689928416.859975][5757:5760] CHIP:DMG: Endpoint = 0x0, + [1689928416.859988][5757:5760] CHIP:DMG: Cluster = 0x3f, + [1689928416.859999][5757:5760] CHIP:DMG: Attribute = 0x0000_0000, + [1689928416.860009][5757:5760] CHIP:DMG: } + [1689928416.860025][5757:5760] CHIP:DMG: + [1689928416.860036][5757:5760] CHIP:DMG: StatusIB = + [1689928416.860050][5757:5760] CHIP:DMG: { + [1689928416.860062][5757:5760] CHIP:DMG: status = 0x00 (SUCCESS), + [1689928416.860071][5757:5760] CHIP:DMG: }, + [1689928416.860081][5757:5760] CHIP:DMG: + [1689928416.860088][5757:5760] CHIP:DMG: }, + [1689928416.860104][5757:5760] CHIP:DMG: + [1689928416.860113][5757:5760] CHIP:DMG: AttributeStatusIB = + [1689928416.860126][5757:5760] CHIP:DMG: { + [1689928416.860135][5757:5760] CHIP:DMG: AttributePathIB = + [1689928416.860145][5757:5760] CHIP:DMG: { + [1689928416.860156][5757:5760] CHIP:DMG: Endpoint = 0x0, + [1689928416.860167][5757:5760] CHIP:DMG: Cluster = 0x3f, + [1689928416.860177][5757:5760] CHIP:DMG: Attribute = 0x0000_0000, + [1689928416.860185][5757:5760] CHIP:DMG: ListIndex = Null, + [1689928416.860197][5757:5760] CHIP:DMG: } + [1689928416.860209][5757:5760] CHIP:DMG: + [1689928416.860216][5757:5760] CHIP:DMG: StatusIB = + [1689928416.860224][5757:5760] CHIP:DMG: { + [1689928416.860231][5757:5760] CHIP:DMG: status = 0x00 (SUCCESS), + [1689928416.860239][5757:5760] CHIP:DMG: }, + [1689928416.860251][5757:5760] CHIP:DMG: + [1689928416.860261][5757:5760] CHIP:DMG: }, + [1689928416.860277][5757:5760] CHIP:DMG: + [1689928416.860286][5757:5760] CHIP:DMG: ], + [1689928416.860307][5757:5760] CHIP:DMG: + [1689928416.860319][5757:5760] CHIP:DMG: InteractionModelRevision = 1 + [1689928416.860328][5757:5760] CHIP:DMG: } + disabled: true + + - label: + "Step 4: TH cleans up the groups by sending the RemoveAllGroups + command to the DUT on PIXIT.G.ENDPOINT,PIXIT.G.ENDPOINT2" + verification: | + ./chip-tool groups remove-all-groups 1 1 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689928700.354515][5800:5803] CHIP:DMG: { + [1689928700.354516][5800:5803] CHIP:DMG: suppressResponse = false, + [1689928700.354518][5800:5803] CHIP:DMG: InvokeResponseIBs = + [1689928700.354522][5800:5803] CHIP:DMG: [ + [1689928700.354524][5800:5803] CHIP:DMG: InvokeResponseIB = + [1689928700.354527][5800:5803] CHIP:DMG: { + [1689928700.354528][5800:5803] CHIP:DMG: CommandStatusIB = + [1689928700.354531][5800:5803] CHIP:DMG: { + [1689928700.354533][5800:5803] CHIP:DMG: CommandPathIB = + [1689928700.354537][5800:5803] CHIP:DMG: { + [1689928700.354539][5800:5803] CHIP:DMG: EndpointId = 0x1, + [1689928700.354541][5800:5803] CHIP:DMG: ClusterId = 0x4, + [1689928700.354544][5800:5803] CHIP:DMG: CommandId = 0x4, + [1689928700.354546][5800:5803] CHIP:DMG: }, + [1689928700.354549][5800:5803] CHIP:DMG: + [1689928700.354551][5800:5803] CHIP:DMG: StatusIB = + [1689928700.354554][5800:5803] CHIP:DMG: { + [1689928700.354556][5800:5803] CHIP:DMG: status = 0x00 (SUCCESS), + [1689928700.354558][5800:5803] CHIP:DMG: }, + [1689928700.354560][5800:5803] CHIP:DMG: + [1689928700.354562][5800:5803] CHIP:DMG: }, + [1689928700.354565][5800:5803] CHIP:DMG: + [1689928700.354567][5800:5803] CHIP:DMG: }, + [1689928700.354569][5800:5803] CHIP:DMG: + [1689928700.354571][5800:5803] CHIP:DMG: ], + [1689928700.354574][5800:5803] CHIP:DMG: + + + ./chip-tool groups remove-all-groups 1 2 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689928742.133296][5810:5813] CHIP:DMG: InvokeResponseMessage = + [1689928742.133303][5810:5813] CHIP:DMG: { + [1689928742.133311][5810:5813] CHIP:DMG: suppressResponse = false, + [1689928742.133317][5810:5813] CHIP:DMG: InvokeResponseIBs = + [1689928742.133329][5810:5813] CHIP:DMG: [ + [1689928742.133336][5810:5813] CHIP:DMG: InvokeResponseIB = + [1689928742.133348][5810:5813] CHIP:DMG: { + [1689928742.133355][5810:5813] CHIP:DMG: CommandStatusIB = + [1689928742.133364][5810:5813] CHIP:DMG: { + [1689928742.133371][5810:5813] CHIP:DMG: CommandPathIB = + [1689928742.133380][5810:5813] CHIP:DMG: { + [1689928742.133388][5810:5813] CHIP:DMG: EndpointId = 0x2, + [1689928742.133397][5810:5813] CHIP:DMG: ClusterId = 0x4, + [1689928742.133405][5810:5813] CHIP:DMG: CommandId = 0x4, + [1689928742.133413][5810:5813] CHIP:DMG: }, + [1689928742.133424][5810:5813] CHIP:DMG: + [1689928742.133435][5810:5813] CHIP:DMG: StatusIB = + [1689928742.133447][5810:5813] CHIP:DMG: { + [1689928742.133455][5810:5813] CHIP:DMG: status = 0x00 (SUCCESS), + [1689928742.133463][5810:5813] CHIP:DMG: }, + [1689928742.133472][5810:5813] CHIP:DMG: + [1689928742.133478][5810:5813] CHIP:DMG: }, + [1689928742.133490][5810:5813] CHIP:DMG: + [1689928742.133500][5810:5813] CHIP:DMG: }, + [1689928742.133508][5810:5813] CHIP:DMG: + [1689928742.133514][5810:5813] CHIP:DMG: ], + [1689928742.133526][5810:5813] CHIP:DMG: + disabled: true + + - label: + "Step 5a: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT with + the following fields: GroupID as 0x0001 GroupName as 'Gp1'" + PICS: G.S.C00.Rsp && G.S.C00.Tx + verification: | + ./chip-tool groups add-group 0x0001 Gp1 1 1 + + Verify the AddGroupResponse with following field: + Status is SUCCESS + GroupID is 0x0001 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689928877.256544][5836:5839] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 + [1689928877.256740][5836:5839] CHIP:TOO: AddGroupResponse: { + [1689928877.256774][5836:5839] CHIP:TOO: status: 0 + [1689928877.256777][5836:5839] CHIP:TOO: groupID: 1 + [1689928877.256780][5836:5839] CHIP:TOO: } + disabled: true + + - label: + "Step 5b: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT2 with + the following fields: GroupID as 0x0001 GroupName as 'Gp2'" + PICS: G.S.C00.Rsp && G.S.C00.Tx + verification: | + ./chip-tool groups add-group 0x0001 Gp2 1 2 + + Verify the AddGroupResponse with following field: + Status is SUCCESS + GroupID is 0x0001 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689928983.569742][5852:5855] CHIP:DMG: Received Command Response Data, Endpoint=2 Cluster=0x0000_0004 Command=0x0000_0000 + [1689928983.569765][5852:5855] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0004 Command 0x0000_0000 + [1689928983.569795][5852:5855] CHIP:TOO: AddGroupResponse: { + [1689928983.569805][5852:5855] CHIP:TOO: status: 0 + [1689928983.569813][5852:5855] CHIP:TOO: groupID: 1 + [1689928983.569821][5852:5855] CHIP:TOO: } + disabled: true + + - label: + "Step 6: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" + PICS: GRPKEY.S.A0001 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify the GroupTable with the following entries + GroupID is 0x0001 + If G.S.F00(GN) is true then GroupName is Gp2 , Otherwise empty + Endpoints list contains a endpoints 1, 2 + on TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689929132.327353][5868:5871] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 229830719 + [1689929132.327657][5868:5871] CHIP:TOO: GroupTable: 1 entries + [1689929132.327692][5868:5871] CHIP:TOO: [1]: { + [1689929132.327708][5868:5871] CHIP:TOO: GroupId: 1 + [1689929132.327724][5868:5871] CHIP:TOO: Endpoints: 2 entries + [1689929132.327736][5868:5871] CHIP:TOO: [1]: 1 + [1689929132.327744][5868:5871] CHIP:TOO: [2]: 2 + [1689929132.327754][5868:5871] CHIP:TOO: GroupName: Gp2 + [1689929132.327762][5868:5871] CHIP:TOO: FabricIndex: 1 + [1689929132.327769][5868:5871] CHIP:TOO: } + disabled: true + + - label: + "Step 7: Verify that the GroupTable contains an entry with the + GroupName as 'Gp2'" + PICS: G.S.F00 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify the GroupTable with the following entries + GroupID is 0x0001 + If G.S.F00(GN) is true then GroupName is Gp2 , Otherwise empty + Endpoints list contains a endpoints 1, 2 + on TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689929132.327353][5868:5871] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 229830719 + [1689929132.327657][5868:5871] CHIP:TOO: GroupTable: 1 entries + [1689929132.327692][5868:5871] CHIP:TOO: [1]: { + [1689929132.327708][5868:5871] CHIP:TOO: GroupId: 1 + [1689929132.327724][5868:5871] CHIP:TOO: Endpoints: 2 entries + [1689929132.327736][5868:5871] CHIP:TOO: [1]: 1 + [1689929132.327744][5868:5871] CHIP:TOO: [2]: 2 + [1689929132.327754][5868:5871] CHIP:TOO: GroupName: Gp2 + [1689929132.327762][5868:5871] CHIP:TOO: FabricIndex: 1 + [1689929132.327769][5868:5871] CHIP:TOO: } + disabled: true + + - label: + "Step 8: TH sends ViewGroup command to DUT on PIXIT.G.ENDPOINT with + the following fields: GroupID as 0x0001" + PICS: G.S.C01.Rsp && G.S.C01.Tx + verification: | + ./chip-tool groups view-group 0x0001 1 1 + + Verify the ViewGroupResponse with following fields : + Status is SUCCESS + GroupID is 0x0001 + If G.S.F00(GN) is true then GroupName is Gp1, Otherwise empty + on TH(Chip-tool) Log , below is the sample log provided for the raspi platform: + + Note: GroupName for GroupID 0x0001 is same on ENDPOINT 1 and ENDPOINT 2 + + [1689929265.503341][5898:5901] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0001 + [1689929265.503352][5898:5901] CHIP:TOO: ViewGroupResponse: { + [1689929265.503357][5898:5901] CHIP:TOO: status: 0 + [1689929265.503359][5898:5901] CHIP:TOO: groupID: 1 + [1689929265.503361][5898:5901] CHIP:TOO: groupName: Gp2 + [1689929265.503363][5898:5901] CHIP:TOO: } + disabled: true + + - label: + "Step 9: Verify that the ViewGroupResponse contains GroupName as + 'GP2'. Note: GroupName for GroupID 0x0001 is same on PIXIT.G.ENDPOINT + and PIXIT.G.ENDPOINT2" + PICS: G.S.F00 + verification: | + ./chip-tool groups view-group 0x0001 1 1 + + Verify the ViewGroupResponse with following fields : + Status is SUCCESS + GroupID is 0x0001 + If G.S.F00(GN) is true then GroupName is Gp1, Otherwise empty + on TH(Chip-tool) Log , below is the sample log provided for the raspi platform: + + Note: GroupName for GroupID 0x0001 is same on ENDPOINT 1 and ENDPOINT 2 + + [1689929265.503341][5898:5901] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0001 + [1689929265.503352][5898:5901] CHIP:TOO: ViewGroupResponse: { + [1689929265.503357][5898:5901] CHIP:TOO: status: 0 + [1689929265.503359][5898:5901] CHIP:TOO: groupID: 1 + [1689929265.503361][5898:5901] CHIP:TOO: groupName: Gp2 + [1689929265.503363][5898:5901] CHIP:TOO: } + disabled: true + + - label: + "Step 10: TH sends RemoveGroup command to DUT on PIXIT.G.ENDPOINT as + unicast with the following field: GroupID as 0x0001" + PICS: G.S.C03.Rsp && G.S.C03.Tx + verification: | + ./chip-tool groups remove-group 0x0001 1 1 + + Verify the RemoveGroupResponse with Status as SUCCESS and GroupID is 0x0001 on the TH(Chip-tool) Log, below is the sample log provided for the raspi platform: + + [1689929333.591022][5912:5915] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0003 + [1689929333.591032][5912:5915] CHIP:TOO: RemoveGroupResponse: { + [1689929333.591035][5912:5915] CHIP:TOO: status: 0 + [1689929333.591037][5912:5915] CHIP:TOO: groupID: 1 + [1689929333.591039][5912:5915] CHIP:TOO: } + disabled: true + + - label: + "Step 11: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" + PICS: GRPKEY.S.A0001 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify that Grouptable entry with GroupID 0x0001 is associated with the Endpoint 2 and no entry with GroupID 0x0001 associated with the Endpoint 1 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689929376.037105][5924:5927] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 229830719 + [1689929376.037147][5924:5927] CHIP:TOO: GroupTable: 1 entries + [1689929376.037191][5924:5927] CHIP:TOO: [1]: { + [1689929376.037204][5924:5927] CHIP:TOO: GroupId: 1 + [1689929376.037213][5924:5927] CHIP:TOO: Endpoints: 1 entries + [1689929376.037224][5924:5927] CHIP:TOO: [1]: 2 + [1689929376.037233][5924:5927] CHIP:TOO: GroupName: Gp2 + [1689929376.037241][5924:5927] CHIP:TOO: FabricIndex: 1 + [1689929376.037246][5924:5927] CHIP:TOO: } + disabled: true + + - label: + "Step 12: TH sends RemoveGroup command to DUT on PIXIT.G.ENDPOINT2 as + unicast with the following field: GroupID as 0x0001" + PICS: G.S.C03.Rsp && G.S.C03.Tx + verification: | + ./chip-tool groups remove-group 0x0001 1 2 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689929465.586716][5960:5963] CHIP:DMG: }, + [1689929465.586745][5960:5963] CHIP:DMG: Received Command Response Data, Endpoint=2 Cluster=0x0000_0004 Command=0x0000_0003 + [1689929465.586771][5960:5963] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0004 Command 0x0000_0003 + [1689929465.586795][5960:5963] CHIP:TOO: RemoveGroupResponse: { + [1689929465.586813][5960:5963] CHIP:TOO: status: 0 + [1689929465.586818][5960:5963] CHIP:TOO: groupID: 1 + [1689929465.586826][5960:5963] CHIP:TOO: } + disabled: true + + - label: + "Step 13: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" + PICS: GRPKEY.S.A0001 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify that there is no entry that has GroupID 0x0001 associated with the Endpoint 2 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689934348.530688][6829:6831] CHIP:DMG: ReportDataMessage = + [1689934348.530718][6829:6831] CHIP:DMG: { + [1689934348.530740][6829:6831] CHIP:DMG: AttributeReportIBs = + [1689934348.530775][6829:6831] CHIP:DMG: [ + [1689934348.530801][6829:6831] CHIP:DMG: AttributeReportIB = + [1689934348.530837][6829:6831] CHIP:DMG: { + [1689934348.530864][6829:6831] CHIP:DMG: AttributeDataIB = + [1689934348.530900][6829:6831] CHIP:DMG: { + [1689934348.530935][6829:6831] CHIP:DMG: DataVersion = 0xdc445868, + [1689934348.530968][6829:6831] CHIP:DMG: AttributePathIB = + [1689934348.531003][6829:6831] CHIP:DMG: { + [1689934348.531056][6829:6831] CHIP:DMG: Endpoint = 0x0, + [1689934348.531095][6829:6831] CHIP:DMG: Cluster = 0x3f, + [1689934348.531143][6829:6831] CHIP:DMG: Attribute = 0x0000_0001, + [1689934348.531178][6829:6831] CHIP:DMG: } + [1689934348.531225][6829:6831] CHIP:DMG: + [1689934348.531259][6829:6831] CHIP:DMG: Data = [ + [1689934348.531303][6829:6831] CHIP:DMG: + [1689934348.531340][6829:6831] CHIP:DMG: ], + [1689934348.531384][6829:6831] CHIP:DMG: }, + [1689934348.531421][6829:6831] CHIP:DMG: + [1689934348.531450][6829:6831] CHIP:DMG: }, + [1689934348.531496][6829:6831] CHIP:DMG: + [1689934348.531521][6829:6831] CHIP:DMG: ], + [1689934348.531566][6829:6831] CHIP:DMG: + [1689934348.531592][6829:6831] CHIP:DMG: SuppressResponse = true, + [1689934348.531619][6829:6831] CHIP:DMG: InteractionModelRevision = 1 + [1689934348.531655][6829:6831] CHIP:DMG: } + [1689934348.531858][6829:6831] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 3695466600 + [1689934348.531940][6829:6831] CHIP:TOO: GroupTable: 0 entries + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_G_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_G_3_1_Simulated.yaml deleted file mode 100644 index 291ad030cf8cf2..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_G_3_1_Simulated.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 120.3.1. [TC-G-3.1] Attributes [DUT-Client] - -PICS: - - G.C - -config: - nodeId: 0x12344321 - cluster: "Groups" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads NameSupport attribute value from TH" - PICS: G.C.A0000 - wait: "readAttribute" - attribute: "NameSupport" diff --git a/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml b/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml index 24f4d7054afeaa..04db88ae83189b 100644 --- a/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml @@ -100,7 +100,7 @@ tests: contains: [2, 65528, 65529, 65531, 65532, 65533] - label: - "Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in + "Step 4b: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList" PICS: HEPAFREMON.S.F00 command: "readAttribute" @@ -111,9 +111,9 @@ tests: contains: [0, 1, 2] - label: - "Step 4b: Read the optional attribute InPlaceIndicator - (HEPAFREMON.S.A0002) in AttributeList" - PICS: HEPAFREMON.S.A0002 + "Step 4c: Read the optional attribute InPlaceIndicator + (HEPAFREMON.S.A0003) in AttributeList" + PICS: HEPAFREMON.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -121,6 +121,28 @@ tests: type: list contains: [3] + - label: + "Step 4d: Read the optional attribute LastChangedTime + (HEPAFREMON.S.A0004) in AttributeList" + PICS: HEPAFREMON.S.A0004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: + "Step 4e: Read the optional attribute ReplacementProductList + (HEPAFREMON.S.F02) in AttributeList" + PICS: HEPAFREMON.S.F02 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + - label: "Step 5: TH reads EventList attribute from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_IDM_10_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_10_1.yaml new file mode 100644 index 00000000000000..12d5a1140aa187 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_IDM_10_1.yaml @@ -0,0 +1,290 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 32.6.8. [TC-IDM-10.1] Cluster requirements - Global attributes [DUT as + Server] + +PICS: + - MCORE.IDM.S + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: + "Step 1: TH performs a wildcard read of all attributes and endpoints" + verification: | + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + + Please store the log for use in the next step validation. + disabled: true + + - label: + "Step 2: For every cluster on every endpoint verify that the cluster + includes all the mandatory global attributes: ClusterRevision, + FeatureMap, AttributeList, AcceptedCommandList, GeneratedCommandList, + EventList" + verification: | + The following log is an example of the output obtained for Identify Cluster on Endpoint 0. Descriptor cluster on Endpoint 1 and Occupancy cluster on Endpoint 2. + Pls repeat this for every cluster on every endpoint. The log represents the attributes of clusters found on different endpoints. + + Verify the presence of all mandatory global attributes for every cluster on every endpoint: + 1. ClusterRevision + 2. FeatureMap + 3. EventList + 4. AttributeList + 5. AcceptedCommandList + 6. GeneratedCommandList + + Verification Instructions: + Please use the provided example log as a guide to verify the attributes for other clusters and endpoints in a similar manner. + + Example verification log for 'Identify Cluster' (0x0000_0003) on Endpoint 0 : + [1690267325.176118][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 3031281428 + [1690267325.176127][9552:9554] CHIP:TOO: IdentifyType: 2 + [1690267325.176149][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 3031281428 + [1690267325.176152][9552:9554] CHIP:TOO: FeatureMap: 0 + [1690267325.176160][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 3031281428 + [1690267325.176163][9552:9554] CHIP:TOO: ClusterRevision: 4 + [1690267325.176182][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 3031281428 + [1690267325.176186][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.176202][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 3031281428 + [1690267325.176206][9552:9554] CHIP:TOO: AcceptedCommandList: 2 entries + [1690267325.176208][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.176216][9552:9554] CHIP:TOO: [2]: 64 + [1690267325.176228][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFA DataVersion: 3031281428 + [1690267325.176231][9552:9554] CHIP:TOO: EventList: 0 entries + [1690267325.176250][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 3031281428 + [1690267325.176254][9552:9554] CHIP:TOO: AttributeList: 8 entries + [1690267325.176256][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.176258][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.176261][9552:9554] CHIP:TOO: [3]: 65528 + [1690267325.176262][9552:9554] CHIP:TOO: [4]: 65529 + [1690267325.176264][9552:9554] CHIP:TOO: [5]: 65530 + [1690267325.176267][9552:9554] CHIP:TOO: [6]: 65531 + [1690267325.176269][9552:9554] CHIP:TOO: [7]: 65532 + [1690267325.176272][9552:9554] CHIP:TOO: [8]: 65533 + [1690267325.176274][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_0000 DataVersion: 800446264 + [1690267325.176277][9552:9554] CHIP:TOO: NameSupport: 128 + + Example verification log for ' Descriptor cluster ' (0x0000_001D) on Endpoint 1 : + [1690267325.249870][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 762289150 + [1690267325.249874][9552:9554] CHIP:TOO: PartsList: 0 entries + [1690267325.249878][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFC DataVersion: 762289150 + [1690267325.249881][9552:9554] CHIP:TOO: FeatureMap: 0 + [1690267325.249891][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 762289150 + [1690267325.249893][9552:9554] CHIP:TOO: ClusterRevision: 1 + [1690267325.249910][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFF8 DataVersion: 762289150 + [1690267325.249914][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.249926][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFF9 DataVersion: 762289150 + [1690267325.249929][9552:9554] CHIP:TOO: AcceptedCommandList: 0 entries + [1690267325.249942][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFA DataVersion: 762289150 + [1690267325.249946][9552:9554] CHIP:TOO: EventList: 0 entries + [1690267325.249965][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFB DataVersion: 762289150 + [1690267325.249972][9552:9554] CHIP:TOO: AttributeList: 10 entries + [1690267325.249975][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.249978][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.249980][9552:9554] CHIP:TOO: [3]: 2 + [1690267325.249982][9552:9554] CHIP:TOO: [4]: 3 + [1690267325.249986][9552:9554] CHIP:TOO: [5]: 65528 + [1690267325.249989][9552:9554] CHIP:TOO: [6]: 65529 + [1690267325.249992][9552:9554] CHIP:TOO: [7]: 65530 + [1690267325.249995][9552:9554] CHIP:TOO: [8]: 65531 + [1690267325.249999][9552:9554] CHIP:TOO: [9]: 65532 + [1690267325.250002][9552:9554] CHIP:TOO: [10]: 65533 + [1690267325.250017][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001E Attribute 0x0000_0000 DataVersion: 3536645262 + + Example verification log for ' Occupancy cluster ' (0x0000_0406) on Endpoint 2 : + + [1690267325.401773][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0000 DataVersion: 3381359521 + [1690267325.401776][9552:9554] CHIP:TOO: Occupancy: 0 + [1690267325.401785][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0001 DataVersion: 3381359521 + [1690267325.401787][9552:9554] CHIP:TOO: OccupancySensorType: 0 + [1690267325.401795][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0002 DataVersion: 3381359521 + [1690267325.401798][9552:9554] CHIP:TOO: OccupancySensorTypeBitmap: 1 + [1690267325.401806][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFC DataVersion: 3381359521 + [1690267325.401808][9552:9554] CHIP:TOO: FeatureMap: 0 + [1690267325.401816][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFD DataVersion: 3381359521 + [1690267325.401819][9552:9554] CHIP:TOO: ClusterRevision: 3 + [1690267325.401834][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFF8 DataVersion: 3381359521 + [1690267325.401837][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.401848][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFF9 DataVersion: 3381359521 + [1690267325.401850][9552:9554] CHIP:TOO: AcceptedCommandList: 0 entries + [1690267325.401861][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFA DataVersion: 3381359521 + [1690267325.401864][9552:9554] CHIP:TOO: EventList: 0 entries + [1690267325.401876][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFB DataVersion: 3381359521 + [1690267325.401880][9552:9554] CHIP:TOO: AttributeList: 9 entries + [1690267325.401882][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.401884][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.401886][9552:9554] CHIP:TOO: [3]: 2 + [1690267325.401888][9552:9554] CHIP:TOO: [4]: 65528 + [1690267325.401890][9552:9554] CHIP:TOO: [5]: 65529 + [1690267325.401892][9552:9554] CHIP:TOO: [6]: 65530 + [1690267325.401894][9552:9554] CHIP:TOO: [7]: 65531 + [1690267325.401896][9552:9554] CHIP:TOO: [8]: 65532 + [1690267325.401898][9552:9554] CHIP:TOO: [9]: 65533 + [1690267325.401975][9552:9554] CHIP:EM: <<< [E:6807i S:13119 M:239700033 (Ack:147952547)] (S) Msg TX to 1:0000000000000001 [83EA] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690267325.401983][9552:9554] CHIP:IN: (S) Sending msg 239700033 on secure session with LSID: 13119 + [1690267325.402014][9552:9554] CHIP:EM: Flushed pending ack for MessageCounter:147952547 on exchange 6807i + disabled: true + + - label: + "Step 3: For every cluster on every endpoint, verify that each + attribute reported in the AttributeList exactly matches the set of + received attributes from the wildcard read. In other words, if an + attribute ID is present in the AttributeList, a report for that path + must have been seen in the read of step 1, and if an attribute path + exists in the read of step 1, its ID must be present in the + AttributeList of the associated cluster within the hierarchy." + verification: | + The following log is an example of the output obtained For every cluster on every endpoint. The log represents the attributes of clusters found on different endpoints. + + Verify AttributeList for Each Cluster on Every Endpoint, follow the verification process: + 1. Examine the AttributeList reported for the specific cluster. + 2. Cross-reference the attributes listed in the AttributeList with the set of received attributes from the wildcard read (Step 1). + 3. Ensure that each attribute ID present in the AttributeList is also seen in the received attributes from the wildcard read, and vice versa. + + Verification Instructions: + Please use the provided example log as a guide to verify the attributes for other clusters and endpoints in a similar manner. + + + Example verification log for 'Identify Cluster' (0x0000_0003) on Endpoint 0 : + - AttributeList: [0, 1, 65528, 65529, 65530, 65531, 65532, 65532] + - Wildcard Read Received Attributes: [0, 1, 65528, 65529, 65530, 65531, 65532, 65532] + - All attribute IDs in the AttributeList are present in the received attributes from the wildcard read. + - All received attributes from the wildcard read have their corresponding attribute IDs listed in the AttributeList. + [1690267325.175008][9552:9554] CHIP:DMG: InteractionModelRevision = 1 + [1690267325.175013][9552:9554] CHIP:DMG: } + [1690267325.175842][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3031281428 + [1690267325.175868][9552:9554] CHIP:TOO: IdentifyTime: 0 + [1690267325.176118][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 3031281428 + [1690267325.176127][9552:9554] CHIP:TOO: IdentifyType: 2 + [1690267325.176149][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 3031281428 + [1690267325.176152][9552:9554] CHIP:TOO: FeatureMap: 0 + [1690267325.176160][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 3031281428 + [1690267325.176163][9552:9554] CHIP:TOO: ClusterRevision: 4 + [1690267325.176182][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 3031281428 + [1690267325.176186][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.176202][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 3031281428 + [1690267325.176206][9552:9554] CHIP:TOO: AcceptedCommandList: 2 entries + [1690267325.176208][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.176216][9552:9554] CHIP:TOO: [2]: 64 + [1690267325.176228][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFA DataVersion: 3031281428 + [1690267325.176231][9552:9554] CHIP:TOO: EventList: 0 entries + [1690267325.176250][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 3031281428 + [1690267325.176254][9552:9554] CHIP:TOO: AttributeList: 8 entries + [1690267325.176256][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.176258][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.176261][9552:9554] CHIP:TOO: [3]: 65528 + [1690267325.176262][9552:9554] CHIP:TOO: [4]: 65529 + [1690267325.176264][9552:9554] CHIP:TOO: [5]: 65530 + [1690267325.176267][9552:9554] CHIP:TOO: [6]: 65531 + [1690267325.176269][9552:9554] CHIP:TOO: [7]: 65532 + [1690267325.176272][9552:9554] CHIP:TOO: [8]: 65533 + [1690267325.176274][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_0000 DataVersion: 800446264 + [1690267325.176277][9552:9554] CHIP:TOO: NameSupport: 128 + [1690267325.176285][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFC DataVersion: 800446264 + [1690267325.176290][9552:9554] CHIP:TOO: FeatureMap: 1 + [1690267325.176298][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 800446264 + [1690267325.176301][9552:9554] CHIP:TOO: ClusterRevision: 4 + [1690267325.176324][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFF8 DataVersion: 800446264 + [1690267325.176328][9552:9554] CHIP:TOO: GeneratedCommandList: 4 entries + + + Example verification log for ' SWITCH cluster ' (0x0000_003B) on Endpoint 1 : + - AttributeList: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65532] + - Wildcard Read Received Attributes: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65532] + - All attribute IDs in the AttributeList are present in the received attributes from the wildcard read. + - All received attributes from the wildcard read have their corresponding attribute IDs listed in the AttributeList. + + [1690267325.252505][9552:9554] CHIP:TOO: [12]: 65532 + [1690267325.252507][9552:9554] CHIP:TOO: [13]: 65533 + [1690267325.252510][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0000 DataVersion: 279843917 + [1690267325.252512][9552:9554] CHIP:TOO: NumberOfPositions: 2 + [1690267325.252520][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001 DataVersion: 279843917 + [1690267325.252522][9552:9554] CHIP:TOO: CurrentPosition: 0 + [1690267325.252531][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0002 DataVersion: 279843917 + [1690267325.252533][9552:9554] CHIP:TOO: MultiPressMax: 2 + [1690267325.252541][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFC DataVersion: 279843917 + [1690267325.252543][9552:9554] CHIP:TOO: FeatureMap: 1 + [1690267325.252551][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFD DataVersion: 279843917 + [1690267325.252553][9552:9554] CHIP:TOO: ClusterRevision: 1 + [1690267325.252569][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFF8 DataVersion: 279843917 + [1690267325.252571][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.252580][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFF9 DataVersion: 279843917 + [1690267325.252583][9552:9554] CHIP:TOO: AcceptedCommandList: 0 entries + [1690267325.252596][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFA DataVersion: 279843917 + [1690267325.252598][9552:9554] CHIP:TOO: EventList: 1 entries + [1690267325.252601][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.252620][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFB DataVersion: 279843917 + [1690267325.252625][9552:9554] CHIP:TOO: AttributeList: 9 entries + [1690267325.252627][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.252629][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.252630][9552:9554] CHIP:TOO: [3]: 2 + [1690267325.252632][9552:9554] CHIP:TOO: [4]: 65528 + [1690267325.252634][9552:9554] CHIP:TOO: [5]: 65529 + [1690267325.252636][9552:9554] CHIP:TOO: [6]: 65530 + [1690267325.252638][9552:9554] CHIP:TOO: [7]: 65531 + [1690267325.252640][9552:9554] CHIP:TOO: [8]: 65532 + [1690267325.252642][9552:9554] CHIP:TOO: [9]: 65533 + [1690267325.252687][9552:9554] CHIP:EM: <<< [E:6807i S:13119 M:239699999 (Ack:147952513)] (S) Msg TX to 1:0000000000000001 [83EA] --- Type 0001:01 (IM:StatusResponse) + [1690267325.252691][9552:9554] CHIP:IN: (S) Sending msg 239699999 on secure session with LSID: 13119 + + Example verification log for ' Occupancy cluster ' (0x0000_0406) on Endpoint 2 : + - AttributeList: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65532] + - Wildcard Read Received Attributes: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65532] + - All attribute IDs in the AttributeList are present in the received attributes from the wildcard read. + - All received attributes from the wildcard read have their corresponding attribute IDs listed in the AttributeList. + [1690267325.401762][9552:9554] CHIP:TOO: [8]: 65528 + [1690267325.401764][9552:9554] CHIP:TOO: [9]: 65529 + [1690267325.401765][9552:9554] CHIP:TOO: [10]: 65530 + [1690267325.401767][9552:9554] CHIP:TOO: [11]: 65531 + [1690267325.401769][9552:9554] CHIP:TOO: [12]: 65532 + [1690267325.401771][9552:9554] CHIP:TOO: [13]: 65533 + [1690267325.401773][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0000 DataVersion: 3381359521 + [1690267325.401776][9552:9554] CHIP:TOO: Occupancy: 0 + [1690267325.401785][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0001 DataVersion: 3381359521 + [1690267325.401787][9552:9554] CHIP:TOO: OccupancySensorType: 0 + [1690267325.401795][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0002 DataVersion: 3381359521 + [1690267325.401798][9552:9554] CHIP:TOO: OccupancySensorTypeBitmap: 1 + [1690267325.401806][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFC DataVersion: 3381359521 + [1690267325.401808][9552:9554] CHIP:TOO: FeatureMap: 0 + [1690267325.401816][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFD DataVersion: 3381359521 + [1690267325.401819][9552:9554] CHIP:TOO: ClusterRevision: 3 + [1690267325.401834][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFF8 DataVersion: 3381359521 + [1690267325.401837][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.401848][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFF9 DataVersion: 3381359521 + [1690267325.401850][9552:9554] CHIP:TOO: AcceptedCommandList: 0 entries + [1690267325.401861][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFA DataVersion: 3381359521 + [1690267325.401864][9552:9554] CHIP:TOO: EventList: 0 entries + [1690267325.401876][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFB DataVersion: 3381359521 + [1690267325.401880][9552:9554] CHIP:TOO: AttributeList: 9 entries + [1690267325.401882][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.401884][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.401886][9552:9554] CHIP:TOO: [3]: 2 + [1690267325.401888][9552:9554] CHIP:TOO: [4]: 65528 + [1690267325.401890][9552:9554] CHIP:TOO: [5]: 65529 + [1690267325.401892][9552:9554] CHIP:TOO: [6]: 65530 + [1690267325.401894][9552:9554] CHIP:TOO: [7]: 65531 + [1690267325.401896][9552:9554] CHIP:TOO: [8]: 65532 + [1690267325.401898][9552:9554] CHIP:TOO: [9]: 65533 + [1690267325.401975][9552:9554] CHIP:EM: <<< [E:6807i S:13119 M:239700033 (Ack:147952547)] (S) Msg TX to 1:0000000000000001 [83EA] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690267325.401983][9552:9554] CHIP:IN: (S) Sending msg 239700033 on secure session with LSID: 13119 + [1690267325.402014][9552:9554] CHIP:EM: Flushed pending ack for MessageCounter:147952547 on exchange 6807i + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_11_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_11_1.yaml new file mode 100644 index 00000000000000..1598e76f4d0d2d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_IDM_11_1.yaml @@ -0,0 +1,81 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 32.6.9. [TC-IDM-11.1] Data types - attribute strings [DUT as Server] - data + model + +PICS: + - MCORE.IDM.S + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: + "Step 1: TH performs a wildcard read of all attributes and endpoints" + verification: | + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + + Please store the log for use in the next step validation. + disabled: true + + - label: + "Step 2: For every returned attribute, if the attribute type is string + and the returned value is not Null or empty, ensure the returned value + is a valid UTF-8-encoded string. It is not permitted to have partially + encoded codepoints between the last legally-encoded codepoint and the + end of the string." + verification: | + From the privious step log, Verify UTF-8 Encoding for Each Returned String Attribute. + For each returned attribute with the attribute type "string," follow the verification process: + 1. Check if the returned value is not Null or empty. + 2. If the returned value is not Null or empty, validate that it is a valid UTF-8-encoded string. + 3. Ensure that there are no partially encoded codepoints between the last legally-encoded codepoint and the end of the string. + + The following log is an example of the output obtained for Basic Inforamtion Cluster. Pls repeat this for every cluster on every endpoint. The log represents the attributes of clusters found on different endpoints. + + Verification Instructions: + Please use the provided example log as a guide to verify the attributes for other clusters and endpoints in a similar manner. + + Example verification log for 'Basic information Cluster' (0x0000_0028) on Endpoint 0 : + [1690271126.212327][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0000 DataVersion: 338522070 + [1690271126.212330][10587:10589] CHIP:TOO: DataModelRevision: 1 + [1690271126.212344][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0001 DataVersion: 338522070 + [1690271126.212348][10587:10589] CHIP:TOO: VendorName: TEST_VENDOR + [1690271126.212358][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0002 DataVersion: 338522070 + [1690271126.212361][10587:10589] CHIP:TOO: VendorID: 65521 + [1690271126.212369][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0003 DataVersion: 338522070 + [1690271126.212371][10587:10589] CHIP:TOO: ProductName: TEST_PRODUCT + [1690271126.212379][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0004 DataVersion: 338522070 + [1690271126.212382][10587:10589] CHIP:TOO: ProductID: 32769 + [1690271126.212390][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 338522070 + [1690271126.212392][10587:10589] CHIP:TOO: NodeLabel: + [1690271126.212401][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 338522070 + [1690271126.212403][10587:10589] CHIP:TOO: Location: XX + [1690271126.212411][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0007 DataVersion: 338522070 + [1690271126.212413][10587:10589] CHIP:TOO: HardwareVersion: 0 + [1690271126.212422][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0008 DataVersion: 338522070 + [1690271126.212424][10587:10589] CHIP:TOO: HardwareVersionString: TEST_VERSION + [1690271126.212432][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0009 DataVersion: 338522070 + [1690271126.212434][10587:10589] CHIP:TOO: SoftwareVersion: 1 + [1690271126.212443][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_000A DataVersion: 338522070 + [1690271126.212445][10587:10589] CHIP:TOO: SoftwareVersionString: 1.0 + [1690271126.212453][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_000B DataVersion: 338522070 + [1690271126.212455][10587:10589] CHIP:TOO: ManufacturingDate: 20200101 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml index ff7e3d0a241322..1abcdfb85b5f30 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml @@ -153,8 +153,8 @@ tests: ##### Test Implementation - label: - "TH sends the Invoke Request Message to the DUT with the path that - indicates a specific endpoint that is unsupported." + "Step 1: TH sends the Invoke Request Message to the DUT with the path + that indicates a specific endpoint that is unsupported." cluster: "AnyCommands" command: "CommandById" endpoint: PIXIT.IDM.UnsupportedEndPoint @@ -170,8 +170,8 @@ tests: error: UNSUPPORTED_ENDPOINT - label: - "TH sends the Invoke Request Message to the DUT with the path that - indicates a specific cluster that is unsupported." + "Step 2: TH sends the Invoke Request Message to the DUT with the path + that indicates a specific cluster that is unsupported." cluster: "AnyCommands" command: "CommandById" endpoint: InvokeRequestMessage.EndPoint @@ -187,8 +187,8 @@ tests: error: UNSUPPORTED_CLUSTER - label: - "TH sends the Invoke Request Message to the DUT with the path that - indicates a specific command that is unsupported." + "Step 3: TH sends the Invoke Request Message to the DUT with the path + that indicates a specific command that is unsupported." cluster: "AnyCommands" command: "CommandById" endpoint: InvokeRequestMessage.EndPoint @@ -204,8 +204,8 @@ tests: error: UNSUPPORTED_COMMAND - label: - "Setup the TH such that it should not have the privilege for the - cluster in the path." + "Step 4: Setup the TH such that it should not have the privilege for + the cluster in the path." cluster: "AccessControl" command: "writeAttribute" attribute: "ACL" @@ -230,7 +230,7 @@ tests: ] - label: - "TH sends the Invoke Request Message to the DUT with a valid + "Step 4: TH sends the Invoke Request Message to the DUT with a valid CommandDataIB" cluster: "AnyCommands" command: "CommandById" @@ -247,8 +247,8 @@ tests: error: UNSUPPORTED_ACCESS - label: - "TH sends the Invoke Request Message to the DUT with a valid and - fabric-scoped CommandDataIB" + "Step 5: TH sends the Invoke Request Message to the DUT with a valid + and fabric-scoped CommandDataIB" cluster: "General Commissioning" command: "CommissioningComplete" endpoint: PIXIT.Cluster.GeneralCommissioning.EndPoint @@ -275,8 +275,8 @@ tests: ] - label: - "(OPTIONAL) TH sends the Invoke Request Message to the DUT with the - command which requires a data response to be sent back." + "Step 6: (OPTIONAL) TH sends the Invoke Request Message to the DUT + with the command which requires a data response to be sent back." cluster: "General Commissioning" command: "ArmFailSafe" endpoint: PIXIT.Cluster.GeneralCommissioning.EndPoint @@ -292,7 +292,7 @@ tests: value: 0 - label: - "TH sends the Invoke Request Message to the DUT with a valid + "Step 7: TH sends the Invoke Request Message to the DUT with a valid CommandDataIB and SuppressResponse set to True" disabled: true verification: | @@ -333,8 +333,9 @@ tests: ] - label: - "TH sends a Invoke Request Message to the DUT with the TimedRequest - set as TRUE.(There should be no previous Timed Invoke action.)" + "Step 8: TH sends a Invoke Request Message to the DUT with the + TimedRequest set as TRUE.(There should be no previous Timed Invoke + action.)" cluster: "AnyCommands" command: "CommandById" endpoint: InvokeRequestMessage.EndPoint @@ -370,9 +371,9 @@ tests: ] - label: - "TH sends Invoke Request Message to the DUT with the command in the - path that requires a Timed Invoke transaction to invoke and this - action is not part of a Timed Invoke transaction" + "Step 9: TH sends Invoke Request Message to the DUT with the command + in the path that requires a Timed Invoke transaction to invoke and + this action is not part of a Timed Invoke transaction" cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" endpoint: PIXIT.Cluster.AdministratorCommissioning.EndPoint diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml index de62254f8cef45..000c90336c0a8a 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 3.4.1. [TC-IDM-4.1] SubscriptionRequestMessage from DUT test cases. - [DUT_Client] + 32.4.1. [TC-IDM-4.1] SubscriptionRequestMessage from DUT test cases. [DUT as + Client] PICS: - MCORE.IDM.C.SubscribeRequest @@ -26,10 +26,16 @@ config: endpoint: 0 tests: - - label: "Note" + - label: "Notes/Testing Considerations" verification: | - 1. Please use Interactive mode to Verify subscription test cases Here the command to enter interactive mode:-- ./chip-tool interactive start - 2. Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. + disabled: true + + - label: "Precondition" + verification: | + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - label: @@ -111,7 +117,6 @@ tests: verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - onoff subscribe on-off 10 80 1 1 --keepSubscriptions true Verify on the TH(reference-app) that the status response received from the DUT is "Success" @@ -170,9 +175,9 @@ tests: disabled: true - label: - "Step 3: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type boolean. Modify that attribute on the - TH. TH should send the modified data to the DUT. Modify the attribute + "Step 3: Activate the subscription between the DUT and the TH for an + attribute of data type boolean. Modify that attribute on the TH. TH + should send the modified data to the DUT. Modify the attribute multiple times (3 times)." PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Bool verification: | @@ -283,9 +288,9 @@ tests: disabled: true - label: - "Step 4: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type string. Modify that attribute on the - TH. TH should send the modified data to the DUT. Modify the attribute + "Step 4: Activate the subscription between the DUT and the TH for an + attribute of data type string. Modify that attribute on the TH. TH + should send the modified data to the DUT. Modify the attribute multiple times (3 times)." PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_String verification: | @@ -392,10 +397,10 @@ tests: disabled: true - label: - "Step 5: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type unsigned integer. Modify that - attribute on the TH. TH should send the modified data to the DUT. - Modify the attribute multiple times (3 times)." + "Step 5: Activate the subscription between the DUT and the TH for an + attribute of data type unsigned integer. Modify that attribute on the + TH. TH should send the modified data to the DUT. Modify the attribute + multiple times (3 times)." PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_UnsignedInteger verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) @@ -500,10 +505,10 @@ tests: disabled: true - label: - "Step 6: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type signed integer. Modify that attribute - on the TH. TH should send the modified data to the DUT. Modify the - attribute multiple times (3 times)" + "Step 6: Activate the subscription between the DUT and the TH for an + attribute of data type signed integer. Modify that attribute on the + TH. TH should send the modified data to the DUT. Modify the attribute + multiple times (3 times)" PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Integer verification: | DUT implementation required to verify subscribe an attribute of data type signed integer @@ -513,10 +518,10 @@ tests: disabled: true - label: - "Step 7: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type Floating Point. Modify that attribute - on the TH. TH should send the modified data to the DUT. Modify the - attribute multiple times (3 times)" + "Step 7: Activate the subscription between the DUT and the TH for an + attribute of data type Floating Point. Modify that attribute on the + TH. TH should send the modified data to the DUT. Modify the attribute + multiple times (3 times)" PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_FloatingPoint verification: | DUT implementation required to verify subscribe an attribute of data type floating point @@ -527,9 +532,9 @@ tests: disabled: true - label: - "Step 8: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type list. Modify that attribute on the - TH. TH should send the modified data to the DUT. Modify the attribute + "Step 8: Activate the subscription between the DUT and the TH for an + attribute of data type list. Modify that attribute on the TH. TH + should send the modified data to the DUT. Modify the attribute multiple times (3 times)" PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_List verification: | @@ -548,12 +553,12 @@ tests: activation." PICS: MCORE.IDM.C.SubscribeRequest verification: | - Out of scope + Not verifiable/Out of scope disabled: true - label: "Step 10: DUT sends a subscription request message to the target - node/reference device for multiple attributes(3 attributes)." + node/reference device for multiple attributes (>1 attributes)." PICS: MCORE.IDM.C.SubscribeRequest.MultipleAttributes verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml index 5a5f36b73da8e8..67ceafbb3547b2 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 3.4.2. [TC-IDM-4.2] Subscription Response Messages from DUT Test Cases. - [{DUT_Server}] + 32.4.2. [TC-IDM-4.2] Subscription Response Messages from DUT Test Cases. + [DUT as Server] PICS: - MCORE.IDM.S @@ -26,108 +26,238 @@ config: endpoint: 0 tests: - - label: "Note" + - label: "Notes/Testing Considerations" + verification: | + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. + disabled: true + + - label: "Pre condition" verification: | Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start + Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - - label: - If the device is has the ICD Management cluster, TH reads from the DUT - the IdleModeInterval attribute and sets the - SubscriptionMaxIntervalPublisherLimit to the value read. If the device - does not have the ICD Management cluster, set the - SubscriptionMaxIntervalPublisherLimit to 60 minutes. + - label: "Step 0a: TH reads from the DUT the IdleModeInterval attribute." + PICS: " !ICDM.S " verification: | - The cluster used in the below command is an example, - icdmanagement read idle-mode-interval 12344321 0 + When the ICDM feature is not supported or enabled, the SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT is set to 60 minutes. + disabled: true + + - label: "Step 0b: TH reads from the DUT the IdleModeInterval attribute." + PICS: ICDM.S + verification: | + TH reads from the DUT the IdleModeInterval attribute by sending below mentioned command + + icdmanagement read idle-mode-interval 1 + Please note down the value of IdleModeInterval as SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT for use in the next step validations. + + + [1690475024.398278][5675:5677] CHIP:DMG: SuppressResponse = true, + [1690475024.398282][5675:5677] CHIP:DMG: InteractionModelRevision = 1 + [1690475024.398285][5675:5677] CHIP:DMG: } + [1690475024.398735][5675:5677] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0000 DataVersion: 4216223957 + [1690475024.398921][5675:5677] CHIP:TOO: IdleModeInterval: 500 + [1690475024.399202][5675:5677] CHIP:EM: <<< [E:28320i S:44238 M:28503816 (Ack:266918637)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690475024.399208][5675:5677] CHIP:IN: (S) Sending msg 28503816 on secure session with LSID: 44238 + [1690475024.399217][5675:5677] CHIP:EM: Flushed pending ack for MessageCounter:266918637 on exchange 28320i disabled: true - label: "Step 1: TH sends a subscription message to the DUT with - MaxIntervalCeiling set to a value greater than the - SubscriptionMaxIntervalPublisherLimit. DUT sends a report data action - to the TH. TH sends a success status response to the DUT. DUT sends a - Subscribe Response Message to the TH to activate the subscription." + MaxIntervalCeiling set to a value greater than + SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. DUT sends a report data + action to the TH. TH sends a success status response to the DUT. DUT + sends a Subscribe Response Message to the TH to activate the + subscription." verification: | - onoff subscribe on-off 100 3900 1 1 --keepSubscriptions true - - On the TH(reference app), verify a report data message is received and verify it contains the following data : - Report data - data of the attribute/event requested earlier. - Verify on the TH the Subscribe Response has the following fields, - SubscriptionId - Verify it is of type uint32. - MaxInterval - Verify it is of type uint32. - Verify that the MaxInterval is less than or equal MaxIntervalCeiling. - - [1686294743.438593][101362:101364] CHIP:DMG: ], - [1686294743.438598][101362:101364] CHIP:DMG: - [1686294743.438601][101362:101364] CHIP:DMG: InteractionModelRevision = 1 - [1686294743.438604][101362:101364] CHIP:DMG: } - [1686294743.438641][101362:101364] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3334871844 - [1686294743.438651][101362:101364] CHIP:TOO: OnOff: FALSE - [1686294743.438663][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec011c50]: Moving to [AwaitingSu] - [1686294743.438688][101362:101364] CHIP:EM: <<< [E:49832i S:18140 M:226017852 (Ack:29621147)] (S) Msg TX to 1:0000000000000001 [A822] --- Type 0001:01 (IM:StatusResponse) - [1686294743.438695][101362:101364] CHIP:IN: (S) Sending msg 226017852 on secure session with LSID: 18140 - [1686294743.441447][101362:101364] CHIP:EM: >>> [E:49832i S:18140 M:29621148 (Ack:226017852)] (S) Msg RX from 1:0000000000000001 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686294743.441455][101362:101364] CHIP:EM: Found matching exchange: 49832i, Delegate: 0x7fc7ec011c60 - [1686294743.441461][101362:101364] CHIP:EM: Rxd Ack; Removing MessageCounter:226017852 from Retrans Table on exchange 49832i - [1686294743.441467][101362:101364] CHIP:DMG: SubscribeResponse is received - [1686294743.441475][101362:101364] CHIP:DMG: SubscribeResponseMessage = - [1686294743.441479][101362:101364] CHIP:DMG: { - [1686294743.441483][101362:101364] CHIP:DMG: SubscriptionId = 0x51734852, - [1686294743.441487][101362:101364] CHIP:DMG: MaxInterval = 0xf3c, - [1686294743.441490][101362:101364] CHIP:DMG: InteractionModelRevision = 1 - [1686294743.441494][101362:101364] CHIP:DMG: } - [1686294743.441498][101362:101364] CHIP:DMG: Subscription established with SubscriptionID = 0x51734852 MinInterval = 100s MaxInterval = 3900s Peer = 01:0000000000000001 - [1686294743.441504][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec011c50]: Moving to [Subscripti] + Please run the following command on the TH to test the subscription feature and verify that the value of MaxIntervalCeiling is set correctly(set the value greater than SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT) + + onoff subscribe on-off 100 600 1 1 --keepSubscriptions true + + On the TH( chip-tool), verify a report data message is received and verify it contains the following data : + 1. Verify Report Data Message Received: + Check if a report data message is received on the TH. + + 2. Verify Report Data Contents: + Confirm that the received report data message contains the data of the attribute/event that was previously requested. + + 3. Verify Subscribe Response Fields: + Examine the Subscribe Response to ensure it includes the following fields: + SubscriptionId: Verify that it is of type uint32. + Verify MaxInterval Field: + + 4. Check for an additional field in the Subscribe Response: + MaxInterval: Verify that it is of type uint32. + + 5. Verify MaxInterval against MaxIntervalCeiling: + Compare the MaxInterval value received in the Subscribe Response to the MaxIntervalCeiling value to verify that MaxInterval is less than or equal to MaxIntervalCeiling. + + [1690475115.797447][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690475115.797452][5694:5696] CHIP:DMG: } + [1690475115.797536][5694:5696] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 2332229409 + [1690475115.797556][5694:5696] CHIP:TOO: OnOff: FALSE + [1690475115.797577][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd84800fb20]: Moving to [AwaitingSu] + [1690475115.797625][5694:5696] CHIP:EM: <<< [E:36539i S:55497 M:232793668 (Ack:16536682)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0001:01 (IM:StatusResponse) + [1690475115.797638][5694:5696] CHIP:IN: (S) Sending msg 232793668 on secure session with LSID: 55497 + [1690475115.798143][5694:5696] CHIP:EM: >>> [E:36539i S:55497 M:16536683 (Ack:232793668)] (S) Msg RX from 1:0000000000000001 [3C19] --- Type 0001:04 (IM:SubscribeResponse) + [1690475115.798165][5694:5696] CHIP:EM: Found matching exchange: 36539i, Delegate: 0x7fd84800fb30 + [1690475115.798179][5694:5696] CHIP:EM: Rxd Ack; Removing MessageCounter:232793668 from Retrans Table on exchange 36539i + [1690475115.798192][5694:5696] CHIP:DMG: SubscribeResponse is received + [1690475115.798206][5694:5696] CHIP:DMG: SubscribeResponseMessage = + [1690475115.798213][5694:5696] CHIP:DMG: { + [1690475115.798220][5694:5696] CHIP:DMG: SubscriptionId = 0x9b87e9c7, + [1690475115.798226][5694:5696] CHIP:DMG: MaxInterval = 0x258, + [1690475115.798232][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690475115.798238][5694:5696] CHIP:DMG: } + [1690475115.798247][5694:5696] CHIP:DMG: Subscription established with SubscriptionID = 0x9b87e9c7 MinInterval = 100s MaxInterval = 600s Peer = 01:0000000000000001 + [1690475115.798256][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd84800fb20]: Moving to [Subscripti] disabled: true - label: "Step 2: TH sends a subscription message to the DUT with - MaxIntervalCeiling set to a value less than han the - SubscriptionMaxIntervalPublisherLimit. DUT sends a report data action - to the TH. TH sends a success status response to the DUT. DUT sends a - Subscribe Response Message to the TH to activate the subscription." + MaxIntervalCeiling set to a value less than + SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. DUT sends a report data + action to the TH. TH sends a success status response to the DUT. DUT + sends a Subscribe Response Message to the TH to activate the + subscription." verification: | - basicinformation subscribe location 10 2400 1 0 --keepSubscriptions true + Please run the following command on the TH to test the subscription feature and verify that the value of MaxIntervalCeiling is set correctly( set the value less than SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT) + + + basicinformation subscribe location 10 400 1 0 --keepSubscriptions true + On the TH(chip-tool), verify a report data message is received and verify it contains the following data : - Report data - data of the attribute/event requested earlier. - Verify on the TH the Subscribe Response has the following fields, - SubscriptionId - Verify it is of type uint32. - MaxInterval - Verify it is of type uint32. - Verify that the MaxInterval is less than or equal to the MaxIntervalCeiling. - - [1686294932.404445][101362:101364] CHIP:DMG: InteractionModelRevision = 1 - [1686294932.404449][101362:101364] CHIP:DMG: } - [1686294932.404497][101362:101364] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 946377024 - [1686294932.404508][101362:101364] CHIP:TOO: Location: XX - [1686294932.404523][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec00e400]: Moving to [AwaitingSu] - [1686294932.404565][101362:101364] CHIP:EM: <<< [E:49833i S:18140 M:226017855 (Ack:29621149)] (S) Msg TX to 1:0000000000000001 [A822] --- Type 0001:01 (IM:StatusResponse) - [1686294932.404575][101362:101364] CHIP:IN: (S) Sending msg 226017855 on secure session with LSID: 18140 - [1686294932.420682][101362:101364] CHIP:EM: >>> [E:49833i S:18140 M:29621150 (Ack:226017855)] (S) Msg RX from 1:0000000000000001 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686294932.420716][101362:101364] CHIP:EM: Found matching exchange: 49833i, Delegate: 0x7fc7ec00e410 - [1686294932.420737][101362:101364] CHIP:EM: Rxd Ack; Removing MessageCounter:226017855 from Retrans Table on exchange 49833i - [1686294932.420754][101362:101364] CHIP:DMG: SubscribeResponse is received - [1686294932.420777][101362:101364] CHIP:DMG: SubscribeResponseMessage = - [1686294932.420787][101362:101364] CHIP:DMG: { - [1686294932.420796][101362:101364] CHIP:DMG: SubscriptionId = 0xcbbba269, - [1686294932.420805][101362:101364] CHIP:DMG: MaxInterval = 0x960, - [1686294932.420815][101362:101364] CHIP:DMG: InteractionModelRevision = 1 - [1686294932.420822][101362:101364] CHIP:DMG: } - [1686294932.420834][101362:101364] CHIP:DMG: Subscription established with SubscriptionID = 0xcbbba269 MinInterval = 10s MaxInterval = 2400s Peer = 01:0000000000000001 - [1686294932.420847][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec00e400]: Moving to [Subscripti] + 1. Verify Report Data Message Received: + Check if a report data message is received on the TH (target hardware). + + 2. Verify Report Data Contents: + Confirm that the received report data message contains the data of the attribute/event that was previously requested. + + 3. Verify Subscribe Response Fields: + Examine the Subscribe Response to ensure it includes the following fields: + SubscriptionId: Verify that it is of type uint32. + MaxInterval: Verify that it is of type uint32. + + 4. Verify MaxInterval against SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT: + Compare the MaxInterval value received in the Subscribe Response to the value of SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. + Verify that the MaxInterval value is less than or equal to SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. + + [1690475286.624596][5694:5696] CHIP:DMG: + [1690475286.624598][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690475286.624600][5694:5696] CHIP:DMG: } + [1690475286.624620][5694:5696] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 2118637528 + [1690475286.624625][5694:5696] CHIP:TOO: Location: XX + [1690475286.624631][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848010a50]: Moving to [AwaitingSu] + [1690475286.624645][5694:5696] CHIP:EM: <<< [E:36540i S:55497 M:232793671 (Ack:16536684)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0001:01 (IM:StatusResponse) + [1690475286.624649][5694:5696] CHIP:IN: (S) Sending msg 232793671 on secure session with LSID: 55497 + [1690475286.624771][5694:5696] CHIP:EM: >>> [E:36540i S:55497 M:16536685 (Ack:232793671)] (S) Msg RX from 1:0000000000000001 [3C19] --- Type 0001:04 (IM:SubscribeResponse) + [1690475286.624775][5694:5696] CHIP:EM: Found matching exchange: 36540i, Delegate: 0x7fd848010a60 + [1690475286.624778][5694:5696] CHIP:EM: Rxd Ack; Removing MessageCounter:232793671 from Retrans Table on exchange 36540i + [1690475286.624782][5694:5696] CHIP:DMG: SubscribeResponse is received + [1690475286.624787][5694:5696] CHIP:DMG: SubscribeResponseMessage = + [1690475286.624789][5694:5696] CHIP:DMG: { + [1690475286.624791][5694:5696] CHIP:DMG: SubscriptionId = 0xc96fec0e, + [1690475286.624793][5694:5696] CHIP:DMG: MaxInterval = 0x190, + [1690475286.624796][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690475286.624798][5694:5696] CHIP:DMG: } + [1690475286.624801][5694:5696] CHIP:DMG: Subscription established with SubscriptionID = 0xc96fec0e MinInterval = 10s MaxInterval = 400s Peer = 01:0000000000000001 + [1690475286.624805][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848010a50]: Moving to [Subscripti] disabled: true - label: - "Step 3: Setup TH2 such that it does not have access to an attribute - on a specific cluster and endpoint. TH2 sends a subscription message - to subscribe to an attribute for which it does not have access. - AttributePath = [[Attribute = Attribute, Cluster = ClusterID, Endpoint - = EndpointID ]]." + "Step 3: Setup TH2 such that it does not have access to a specific + cluster. TH2 sends a subscription message to subscribe to an attribute + on that cluster for which it does not have access. AttributePath = + [[Attribute = Attribute, Cluster = ClusterID, Endpoint = EndpointID + ]]." verification: | - As per Spec, there is no access control to specifically enable/disable access to an attribute, so the wording of the test plan need to be modified + Please send the below mentioned command to configure TH2 without access to a specific cluster, we send the ACL command, allowing access only to the Level Control cluster (cluster ID: 8); any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION + + accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":8, "endpoint":null, "deviceType":null}]}]' 1 0 + + [1689933254.566655][48781:48783] CHIP:EM: Rxd Ack; Removing MessageCounter:156974239 from Retrans Table on exchange 6316i + [1689933254.566660][48781:48783] CHIP:DMG: WriteClient moving to [ResponseRe] + [1689933254.566671][48781:48783] CHIP:DMG: WriteResponseMessage = + [1689933254.566675][48781:48783] CHIP:DMG: { + [1689933254.566677][48781:48783] CHIP:DMG: AttributeStatusIBs = + [1689933254.566682][48781:48783] CHIP:DMG: [ + [1689933254.566684][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566688][48781:48783] CHIP:DMG: { + [1689933254.566691][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566695][48781:48783] CHIP:DMG: { + [1689933254.566698][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566702][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566705][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566708][48781:48783] CHIP:DMG: } + [1689933254.566713][48781:48783] CHIP:DMG: + [1689933254.566716][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566720][48781:48783] CHIP:DMG: { + [1689933254.566723][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566726][48781:48783] CHIP:DMG: }, + [1689933254.566730][48781:48783] CHIP:DMG: + [1689933254.566732][48781:48783] CHIP:DMG: }, + [1689933254.566739][48781:48783] CHIP:DMG: + [1689933254.566741][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566744][48781:48783] CHIP:DMG: { + [1689933254.566747][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566750][48781:48783] CHIP:DMG: { + [1689933254.566752][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566756][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566760][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566763][48781:48783] CHIP:DMG: ListIndex = Null, + [1689933254.566766][48781:48783] CHIP:DMG: } + [1689933254.566770][48781:48783] CHIP:DMG: + [1689933254.566773][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566776][48781:48783] CHIP:DMG: { + [1689933254.566779][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566782][48781:48783] CHIP:DMG: }, + [1689933254.566786][48781:48783] CHIP:DMG: + [1689933254.566789][48781:48783] CHIP:DMG: }, + [1689933254.566794][48781:48783] CHIP:DMG: + [1689933254.566797][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566800][48781:48783] CHIP:DMG: { + [1689933254.566802][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566805][48781:48783] CHIP:DMG: { + [1689933254.566808][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566811][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566815][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566818][48781:48783] CHIP:DMG: ListIndex = Null, + [1689933254.566821][48781:48783] CHIP:DMG: } + [1689933254.566825][48781:48783] CHIP:DMG: + [1689933254.566828][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566831][48781:48783] CHIP:DMG: { + [1689933254.566834][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566837][48781:48783] CHIP:DMG: }, + [1689933254.566840][48781:48783] CHIP:DMG: + [1689933254.566843][48781:48783] CHIP:DMG: }, + [1689933254.566847][48781:48783] CHIP:DMG: + [1689933254.566849][48781:48783] CHIP:DMG: ], + [1689933254.566857][48781:48783] CHIP:DMG: + [1689933254.566859][48781:48783] CHIP:DMG: InteractionModelRevision = 1 + [1689933254.566862][48781:48783] CHIP:DMG: } + [1689933254.566897][48781:48783] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1689933254.566916][48781:48783] CHIP:EM: <<< [E:6316i S:13964 M:156974240 (Ack:46397313)] (S) Msg TX to 1:0000000000000001 [B15F] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689933254.566922][48781:48783] CHIP:IN: (S) Sending msg 156974240 on secure session with LSID: 13964 + + If TH2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form [[Attribute = AttributeName, Cluster = ClusterID, Endpoint = EndpointID]], but this action will be denied, and TH2 will not be able to access the attribute due to the restricted access. + + below provided the example command used to subscribe location attribute from basicinformation cluster from node id(4) that have access to the “levelcontrol” cluster + + basicinformation subscribe location 10 2400 1 0 --commissioner-nodeid 4 + [1689933387.304826][48781:48783] CHIP:EM: Rxd Ack; Removing MessageCounter:42350588 from Retrans Table on exchange 6319i + [1689933387.304834][48781:48783] CHIP:DMG: StatusResponseMessage = + [1689933387.304838][48781:48783] CHIP:DMG: { + [1689933387.304841][48781:48783] CHIP:DMG: Status = 0x80 (INVALID_ACTION), + [1689933387.304845][48781:48783] CHIP:DMG: InteractionModelRevision = 1 + [1689933387.304846][48781:48783] CHIP:DMG: } + [1689933387.304850][48781:48783] CHIP:IM: Received status response, status is 0x80 (INVALID_ACTION) + [1689933387.304864][48781:48783] CHIP:EM: <<< [E:6319i S:13965 M:42350589 (Ack:227168589)] (S) Msg TX to 2:0000000000000001 [B15F] --- Type 0001:01 (IM:StatusResponse) + [1689933387.304869][48781:48783] CHIP:IN: (S) Sending msg 42350589 on secure session with LSID: 13965 + [1689933387.304882][48781:48783] CHIP:DMG: MoveToState ReadClient[0x7fd404019110]: Moving to [ Idle] - https://github.com/CHIP-Specifications/chip-test-plans/issues/2366 + With the ACL command in step-2, we are overwriting the default privilege that chip-tool has an admin. After this step-3 you need to send below mentioned command to Grant access to all clusters again. + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233,4], "targets":null}]' 1 0 disabled: true - label: @@ -136,7 +266,7 @@ tests: to subscribe to all attributes for which it does not have access. AttributePath = [[Cluster = ClusterID, Endpoint = EndpointID ]]." verification: | - To Setup the TH2(chip-tool) such that it should not have the privilege for the cluster in the path(AttributePath = [[Attribute = Attribute, Cluster = ClusterID, Endpoint = EndpointID ]]). 1st we need to send below mentioned ACL command and Here by sending below mentioned ACL command giving only access for Level control cluster(8), So except Level control cluster if try to subscribe any other cluster commands will get status as INVALID_ACTION . + Please send the below mentioned command to configure TH2 without access to a specific cluster on Specific endpoint, we send the ACL command, allowing access only to the Level Control cluster (cluster ID: 8) on endpoint 1 ; any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":8, "endpoint":1, "deviceType":null}]}]' 1 0 @@ -200,7 +330,11 @@ tests: [1687418564.590811][167960:167962] CHIP:DMG: } [1687418564.590882][167960:167962] CHIP:DMG: WriteClient moving to [AwaitingDe] - Try to subscribe to all attributes onto endpoint 1 for cluster “onoff” from a node id that have access to the “levelcontrol” cluster onto endpoint 1 + If TH2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form AttributePath = [[Cluster = ClusterID, Endpoint = EndpointID ]]., but this action will be denied, and TH2 will not be able to access the attribute due to the restricted access. + + below provided the example command to subscribe all attributes onto endpoint 1 for onoff cluster from node id(4) that have access to the “levelcontrol” cluster onto endpoint 1 + + onoff subscribe-by-id 0xFFFFFFFF 5 100 1 1 --commissioner-nodeid 4 [1687418591.903193][167960:167962] CHIP:EM: Found matching exchange: 3641i, Delegate: 0x7fc81c00bbd0 @@ -225,8 +359,7 @@ tests: clusters on a specific Endpoint for which it does not have access. AttributePath = [[ Endpoint = EndpointID ]]." verification: | - To Setup the TH2(chip-tool) such that it should not have the privilege for the cluster in the path(AttributePath = [[ Endpoint = EndpointID ]]). 1st we need to send below mentioned ACL command and Here by sending below mentioned ACL command giving only access for Level control cluster(8), So except Level control cluster if try to subscribe any other cluster commands will get status as INVALID_ACTION . - + Please send the below mentioned command to configure TH2 without access to a specific endpoint, we send the ACL command, allowing access only to the endpoint 1 ; any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":null, "endpoint":1, "deviceType":null}]}]' 1 0 @@ -290,7 +423,10 @@ tests: [1687418943.853418][167960:167962] CHIP:DMG: } [1687418943.853488][167960:167962] CHIP:DMG: WriteClient moving to [AwaitingDe] - Try to subscribe to all attributes onto endpoint 0 for cluster 6 from a node id that have access to everything onto endpoint 1 + If TH2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form AttributePath = [[ Endpoint = EndpointID ]], but this action will be denied, and TH2 will not be able to access the attribute due to the restricted access. + + below provided the example command to subscribe to all attributes onto endpoint 0 for cluster 6 from a node id that have access to everything onto endpoint 1 + onoff subscribe-by-id 0xFFFFFFFF 5 100 1 0 --commissioner-nodeid 4 [1687418974.537572][167960:167962] CHIP:EM: Rxd Ack; Removing MessageCounter:104560062 from Retrans Table on exchange 3650i @@ -314,21 +450,8 @@ tests: clusters on all endpoints on a Node for which it does not have access. AttributePath = [[ ]]." verification: | - After commissioned the device, Device does not allow access for node id 4. Because it is not granted the access for Node ID 4 - - Try to subscribe to all attributes onto endpoint 1 for cluster 6 from a node id that does not have any access to the node - - onoff subscribe-by-id 0xFFFFFFFF 5 100 1 0 --commissioner-nodeid 4 - - [1687419427.834160][167960:167962] CHIP:EM: Rxd Ack; Removing MessageCounter:104560064 from Retrans Table on exchange 3652i - [1687419427.834192][167960:167962] CHIP:DMG: StatusResponseMessage = - [1687419427.834207][167960:167962] CHIP:DMG: { - [1687419427.834216][167960:167962] CHIP:DMG: Status = 0x80 (INVALID_ACTION), - [1687419427.834225][167960:167962] CHIP:DMG: InteractionModelRevision = 1 - [1687419427.834233][167960:167962] CHIP:DMG: } - [1687419427.834242][167960:167962] CHIP:IM: Received status response, status is 0x80 (INVALID_ACTION) - [1687419427.834293][167960:167962] CHIP:EM: <<< [E:3652i S:26604 M:104560065 (Ack:37058094)] (S) Msg TX to 2:0000000000000001 [2DB4] --- Type 0001:01 (IM:StatusResponse) - [1687419427.834308][167960:167962] CHIP:IN: (S) Sending msg 104560065 on secure session with LSID: 26604 + Chip-Tool support required to validate this step : SDK Issue - https://github.com/project-chip/connectedhomeip/issues/28360 + Not Testable disabled: true - label: @@ -338,53 +461,8 @@ tests: subscription for that attribute. Start another subscription with the DataVersionFilter field set to the data version received above." verification: | - onoff subscribe start-up-on-off 50 800 1 1 --keepSubscriptions true - - verify that subscription is activated between TH(chip-tool) and DUT(reference app) and DUT(reference-app) sends a report data action with the data of the attribute along with the data version to TH(chip-tool) - [1686295071.084688][101362:101364] CHIP:DMG: } - [1686295071.084713][101362:101364] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 3334871844 - [1686295071.084721][101362:101364] CHIP:TOO: StartUpOnOff: null - [1686295071.084730][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec011120]: Moving to [AwaitingSu] - [1686295071.084754][101362:101364] CHIP:EM: <<< [E:49834i S:18140 M:226017858 (Ack:29621151)] (S) Msg TX to 1:0000000000000001 [A822] --- Type 0001:01 (IM:StatusResponse) - [1686295071.084759][101362:101364] CHIP:IN: (S) Sending msg 226017858 on secure session with LSID: 18140 - [1686295071.087868][101362:101364] CHIP:EM: >>> [E:49834i S:18140 M:29621152 (Ack:226017858)] (S) Msg RX from 1:0000000000000001 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686295071.087881][101362:101364] CHIP:EM: Found matching exchange: 49834i, Delegate: 0x7fc7ec011130 - [1686295071.087887][101362:101364] CHIP:EM: Rxd Ack; Removing MessageCounter:226017858 from Retrans Table on exchange 49834i - [1686295071.087893][101362:101364] CHIP:DMG: SubscribeResponse is received - [1686295071.087899][101362:101364] CHIP:DMG: SubscribeResponseMessage = - [1686295071.087902][101362:101364] CHIP:DMG: { - [1686295071.087905][101362:101364] CHIP:DMG: SubscriptionId = 0x6bd3d042, - [1686295071.087908][101362:101364] CHIP:DMG: MaxInterval = 0x320, - [1686295071.087911][101362:101364] CHIP:DMG: InteractionModelRevision = 1 - [1686295071.087914][101362:101364] CHIP:DMG: } - [1686295071.087918][101362:101364] CHIP:DMG: Subscription established with SubscriptionID = 0x6bd3d042 MinInterval = 50s MaxInterval = 800s Peer = 01:0000000000000001 - [1686295071.087923][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec011120]: Moving to [Subscripti] - - - Start another subscription with the DataVersionFilter field set to the data version received above and Verify that the subscription is activated between TH and DUT. - onoff subscribe start-up-on-off 50 800 1 1 --data-version 3334871844 - - [1657450845.854472][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733050 from RetransTable on exchange 33630i - [1657450845.854526][11635:11640] CHIP:DMG: ReportDataMessage = - [1657450845.854555][11635:11640] CHIP:DMG: { - [1657450845.854581][11635:11640] CHIP:DMG: SubscriptionId = 0x6139c55e, - [1657450845.854607][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657450845.854631][11635:11640] CHIP:DMG: } - [1657450845.854675][11635:11640] CHIP:DMG: MoveToState ReadClient[0xffff94002cb0]: Moving to [AwaitingSu] - [1657450845.854728][11635:11640] CHIP:EM: Piggybacking Ack for MessageCounter:11055899 on exchange: 33630i - [1657450845.854786][11635:11640] CHIP:IN: Prepared secure message 0xffff94002458 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 33630i with MessageCounter:190733051. - [1657450845.854822][11635:11640] CHIP:IN: Sending encrypted msg 0xffff94002458 with MessageCounter:190733051 to 0x0000000000000001 (1) at monotonic time: 0000000000B04EDB msec - [1657450845.855783][11635:11640] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:11055900 on exchange 33630i - [1657450845.855818][11635:11640] CHIP:EM: Found matching exchange: 33630i, Delegate: 0xffff94002cb0 - [1657450845.855856][11635:11640] CHIP:EM: Rxd Ack; Removing MessageCounter:190733051 from Retrans Table on exchange 33630i - [1657450845.855876][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733051 from RetransTable on exchange 33630i - [1657450845.855921][11635:11640] CHIP:DMG: SubscribeResponseMessage = - [1657450845.855943][11635:11640] CHIP:DMG: { - [1657450845.855963][11635:11640] CHIP:DMG: SubscriptionId = 0x6bd3d042, - [1657450845.855985][11635:11640] CHIP:DMG: MaxInterval = 0x320, - [1657450845.856006][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657450845.856026][11635:11640] CHIP:DMG: } - [1657450845.856050][11635:11640] CHIP:DMG: Subscription established with SubscriptionID = 0x6139c55e MinInterval = 50s MaxInterval = 800s Peer = 01:0000000000000001 + Chip-Tool support required to validate this step : SDK Issue - https://github.com/project-chip/connectedhomeip/issues/28363 + Not Testable disabled: true - label: @@ -393,42 +471,126 @@ tests: Activate the Subscription between TH and DUT. Modify the attribute which has been subscribed to on the DUT." verification: | - The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. + Please send the following command from TH (the subscription requester) to DUT (the device under test) to activate the subscription for the "on-time" attribute, setting the MinIntervalFloor and MaxIntervalCeiling values to be the same (in this case, 100 seconds): onoff subscribe on-time 100 100 1 1 --keepSubscriptions true - - On TH(chip-tool) verify that the DUT sends a report data with the value of the attribute after the MinIntervalFloor time. - - [1657450934.856825][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733053 from RetransTable on exchange 33631i - [1657450934.856955][11635:11640] CHIP:DMG: ReportDataMessage = - [1657450934.857025][11635:11640] CHIP:DMG: { - [1657450934.857088][11635:11640] CHIP:DMG: SubscriptionId = 0x4b34909f, - [1657450934.857152][11635:11640] CHIP:DMG: AttributeReportIBs = - [1657450934.857262][11635:11640] CHIP:DMG: [ - [1657450934.857326][11635:11640] CHIP:DMG: AttributeReportIB = - [1657450934.857409][11635:11640] CHIP:DMG: { - [1657450934.857475][11635:11640] CHIP:DMG: AttributeDataIB = - [1657450934.857553][11635:11640] CHIP:DMG: { - [1657450934.857633][11635:11640] CHIP:DMG: DataVersion = 0x1979c37, - [1657450934.857719][11635:11640] CHIP:DMG: AttributePathIB = - [1657450934.857801][11635:11640] CHIP:DMG: { - [1657450934.857885][11635:11640] CHIP:DMG: Endpoint = 0x1, - [1657450934.857974][11635:11640] CHIP:DMG: Cluster = 0x6, - [1657450934.858061][11635:11640] CHIP:DMG: Attribute = 0x0000_4001, - [1657450934.858142][11635:11640] CHIP:DMG: } - [1657450934.858228][11635:11640] CHIP:DMG: - [1657450934.858314][11635:11640] CHIP:DMG: Data = 0, - [1657450934.858391][11635:11640] CHIP:DMG: }, - [1657450934.858471][11635:11640] CHIP:DMG: - [1657450934.858539][11635:11640] CHIP:DMG: }, - [1657450934.858612][11635:11640] CHIP:DMG: - [1657450934.858672][11635:11640] CHIP:DMG: ], - [1657450934.858747][11635:11640] CHIP:DMG: - [1657450934.858808][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657450934.858866][11635:11640] CHIP:DMG: } - [1657450934.859074][11635:11640] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 26713143 - [1657450934.859155][11635:11640] CHIP:TOO: OnTime: 0 - [1657450934.859242][11635:11640] CHIP:DMG: MoveToState ReadClient[0xffff940027a0]: Moving to [AwaitingSu] + On the TH(all-clusters-app) verify the SubscribeResponse is received successfully + [1690540281.061350][9488:9490] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 3310786904 + [1690540281.061363][9488:9490] CHIP:TOO: OnTime: 0 + [1690540281.061379][9488:9490] CHIP:DMG: MoveToState ReadClient[0x7faef8013880]: Moving to [AwaitingSu] + [1690540281.061427][9488:9490] CHIP:EM: <<< [E:49945i S:38251 M:151709012 (Ack:20807554)] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0001:01 (IM:StatusResponse) + [1690540281.061441][9488:9490] CHIP:IN: (S) Sending msg 151709012 on secure session with LSID: 38251 + [1690540281.061758][9488:9490] CHIP:EM: >>> [E:49945i S:38251 M:20807555 (Ack:151709012)] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0001:04 (IM:SubscribeResponse) + [1690540281.061771][9488:9490] CHIP:EM: Found matching exchange: 49945i, Delegate: 0x7faef8013890 + [1690540281.061786][9488:9490] CHIP:EM: Rxd Ack; Removing MessageCounter:151709012 from Retrans Table on exchange 49945i + [1690540281.061800][9488:9490] CHIP:DMG: SubscribeResponse is received + [1690540281.061816][9488:9490] CHIP:DMG: SubscribeResponseMessage = + [1690540281.061825][9488:9490] CHIP:DMG: { + [1690540281.061833][9488:9490] CHIP:DMG: SubscriptionId = 0x3ef5dc34, + [1690540281.061844][9488:9490] CHIP:DMG: MaxInterval = 0x64, + [1690540281.061853][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690540281.061862][9488:9490] CHIP:DMG: } + [1690540281.061875][9488:9490] CHIP:DMG: Subscription established with SubscriptionID = 0x3ef5dc34 MinInterval = 100s MaxInterval = 100s Peer = 01:0000000000000001 + + + + After activating the subscription between TH and DUT, please send the following command to modify the 'on-time' attribute value: + + >>> onoff write on-time 1 1 1 + On TH(chip-tool), verify that the DUT sends a report data containing the current 'ontime' attribute value after the MinIntervalFloor time has elapsed + + [1690540304.761997][9488:9488] CHIP:TOO: Command: onoff write on-time 1 1 1 + [1690540304.762298][9488:9490] CHIP:TOO: Sending command to node 0x1 + [1690540304.762462][9488:9490] CHIP:CSM: FindOrEstablishSession: PeerId = [1:0000000000000001] + [1690540304.762474][9488:9490] CHIP:CSM: FindOrEstablishSession: No existing OperationalSessionSetup instance found + [1690540304.762493][9488:9490] CHIP:DIS: Found an existing secure session to [1:0000000000000001]! + [1690540304.762501][9488:9490] CHIP:DIS: OperationalSessionSetup[1:0000000000000001]: State change 1 --> 5 + [1690540304.762534][9488:9490] CHIP:TOO: cluster 0x0000_0006, attribute: 0x0000_4001, endpoint 1 + [1690540304.762585][9488:9490] CHIP:DMG: WriteClient moving to [AddAttribu] + [1690540304.762673][9488:9490] CHIP:EM: <<< [E:49946i S:38251 M:151709014] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0001:06 (IM:WriteRequest) + [1690540304.762693][9488:9490] CHIP:IN: (S) Sending msg 151709014 on secure session with LSID: 38251 + [1690540304.762788][9488:9490] CHIP:DMG: WriteClient moving to [AwaitingRe] + [1690540304.763448][9488:9490] CHIP:EM: >>> [E:49946i S:38251 M:20807556 (Ack:151709014)] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0001:07 (IM:WriteResponse) + [1690540304.763464][9488:9490] CHIP:EM: Found matching exchange: 49946i, Delegate: 0x7faef800a5e0 + [1690540304.763478][9488:9490] CHIP:EM: Rxd Ack; Removing MessageCounter:151709014 from Retrans Table on exchange 49946i + [1690540304.763493][9488:9490] CHIP:DMG: WriteClient moving to [ResponseRe] + [1690540304.763518][9488:9490] CHIP:DMG: WriteResponseMessage = + [1690540304.763527][9488:9490] CHIP:DMG: { + [1690540304.763534][9488:9490] CHIP:DMG: AttributeStatusIBs = + [1690540304.763546][9488:9490] CHIP:DMG: [ + [1690540304.763553][9488:9490] CHIP:DMG: AttributeStatusIB = + [1690540304.763562][9488:9490] CHIP:DMG: { + [1690540304.763570][9488:9490] CHIP:DMG: AttributePathIB = + [1690540304.763579][9488:9490] CHIP:DMG: { + [1690540304.763589][9488:9490] CHIP:DMG: Endpoint = 0x1, + [1690540304.763597][9488:9490] CHIP:DMG: Cluster = 0x6, + [1690540304.763606][9488:9490] CHIP:DMG: Attribute = 0x0000_4001, + [1690540304.763614][9488:9490] CHIP:DMG: } + [1690540304.763626][9488:9490] CHIP:DMG: + [1690540304.763634][9488:9490] CHIP:DMG: StatusIB = + [1690540304.763646][9488:9490] CHIP:DMG: { + [1690540304.763654][9488:9490] CHIP:DMG: status = 0x00 (SUCCESS), + [1690540304.763662][9488:9490] CHIP:DMG: }, + [1690540304.763671][9488:9490] CHIP:DMG: + [1690540304.763677][9488:9490] CHIP:DMG: }, + [1690540304.763688][9488:9490] CHIP:DMG: + [1690540304.763694][9488:9490] CHIP:DMG: ], + [1690540304.763706][9488:9490] CHIP:DMG: + [1690540304.763713][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690540304.763719][9488:9490] CHIP:DMG: } + [1690540304.763753][9488:9490] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1690540304.763793][9488:9490] CHIP:EM: <<< [E:49946i S:38251 M:151709015 (Ack:20807556)] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690540304.763810][9488:9490] CHIP:IN: (S) Sending msg 151709015 on secure session with LSID: 38251 + [1690540304.763846][9488:9490] CHIP:EM: Flushed pending ack for MessageCounter:20807556 on exchange 49946i + [1690540325.496486][9488:9490] CHIP:EM: >>> [E:48664r S:38251 M:20807557] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0001:05 (IM:ReportData) + [1690540325.496520][9488:9490] CHIP:EM: Handling via exchange: 48664r, Delegate: 0x5639a50ebc68 + [1690540325.496552][9488:9490] CHIP:DMG: ReportDataMessage = + [1690540325.496565][9488:9490] CHIP:DMG: { + [1690540325.496576][9488:9490] CHIP:DMG: SubscriptionId = 0x3a11136b, + [1690540325.496587][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690540325.496595][9488:9490] CHIP:DMG: } + [1690540325.496632][9488:9490] CHIP:DMG: Refresh LivenessCheckTime for 804224 milliseconds with SubscriptionId = 0x3a11136b Peer = 01:0000000000000001 + [1690540325.496682][9488:9490] CHIP:EM: <<< [E:48664r S:38251 M:151709016 (Ack:20807557)] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0001:01 (IM:StatusResponse) + [1690540325.496697][9488:9490] CHIP:IN: (S) Sending msg 151709016 on secure session with LSID: 38251 + [1690540325.497211][9488:9490] CHIP:EM: >>> [E:48664r S:38251 M:20807558 (Ack:151709016)] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690540325.497237][9488:9490] CHIP:EM: Found matching exchange: 48664r, Delegate: (nil) + [1690540325.497258][9488:9490] CHIP:EM: Rxd Ack; Removing MessageCounter:151709016 from Retrans Table on exchange 48664r + [1690540381.062201][9488:9490] CHIP:EM: >>> [E:48665r S:38251 M:20807559] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0001:05 (IM:ReportData) + [1690540381.062234][9488:9490] CHIP:EM: Handling via exchange: 48665r, Delegate: 0x5639a50ebc68 + [1690540381.062272][9488:9490] CHIP:DMG: ReportDataMessage = + [1690540381.062281][9488:9490] CHIP:DMG: { + [1690540381.062289][9488:9490] CHIP:DMG: SubscriptionId = 0x3ef5dc34, + [1690540381.062296][9488:9490] CHIP:DMG: AttributeReportIBs = + [1690540381.062308][9488:9490] CHIP:DMG: [ + [1690540381.062315][9488:9490] CHIP:DMG: AttributeReportIB = + [1690540381.062325][9488:9490] CHIP:DMG: { + [1690540381.062332][9488:9490] CHIP:DMG: AttributeDataIB = + [1690540381.062338][9488:9490] CHIP:DMG: { + [1690540381.062346][9488:9490] CHIP:DMG: DataVersion = 0xc5569959, + [1690540381.062354][9488:9490] CHIP:DMG: AttributePathIB = + [1690540381.062367][9488:9490] CHIP:DMG: { + [1690540381.062375][9488:9490] CHIP:DMG: Endpoint = 0x1, + [1690540381.062383][9488:9490] CHIP:DMG: Cluster = 0x6, + [1690540381.062392][9488:9490] CHIP:DMG: Attribute = 0x0000_4001, + [1690540381.062399][9488:9490] CHIP:DMG: } + [1690540381.062409][9488:9490] CHIP:DMG: + [1690540381.062417][9488:9490] CHIP:DMG: Data = 1, + [1690540381.062423][9488:9490] CHIP:DMG: }, + [1690540381.062433][9488:9490] CHIP:DMG: + [1690540381.062439][9488:9490] CHIP:DMG: }, + [1690540381.062447][9488:9490] CHIP:DMG: + [1690540381.062453][9488:9490] CHIP:DMG: ], + [1690540381.062463][9488:9490] CHIP:DMG: + [1690540381.062470][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690540381.062476][9488:9490] CHIP:DMG: } + [1690540381.062543][9488:9490] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 3310786905 + [1690540381.062558][9488:9490] CHIP:TOO: OnTime: 1 + [1690540381.062580][9488:9490] CHIP:DMG: Refresh LivenessCheckTime for 104224 milliseconds with SubscriptionId = 0x3ef5dc34 Peer = 01:0000000000000001 + [1690540381.062627][9488:9490] CHIP:EM: <<< [E:48665r S:38251 M:151709017 (Ack:20807559)] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0001:01 (IM:StatusResponse) + [1690540381.062641][9488:9490] CHIP:IN: (S) Sending msg 151709017 on secure session with LSID: 38251 + [1690540381.063237][9488:9490] CHIP:EM: >>> [E:48665r S:38251 M:20807560 (Ack:151709017)] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690540381.063261][9488:9490] CHIP:EM: Found matching exchange: 48665r, Delegate: (nil) + [1690540381.063276][9488:9490] CHIP:EM: Rxd Ack; Removing MessageCounter:151709017 from Retrans Table on exchange 48665r disabled: true - label: @@ -436,11 +598,12 @@ tests: set the MinIntervalFloor value to be greater than MaxIntervalCeiling. +" verification: | - The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. + Please send the following command from TH (the subscription requester) to DUT (the device under test) to activate the subscription for the "on-time" attribute, setting the MinIntervalFloor value to be greater than MaxIntervalCeiling: + + onoff subscribe on-time 500 100 1 1 --keepSubscriptions true - onoff subscribe on-time 500 100 1 1 --keepSubscriptions true + On TH (chip-tool), verify that the DUT sends an error message, confirming that the subscription is not established successfully - On TH(chip-tool) Verify that the DUT sends an error message and the subscription is not established. [1661754615.089845][103654:103659] CHIP:DMG: StatusResponseMessage = [1661754615.089857][103654:103659] CHIP:DMG: { [1661754615.089868][103654:103659] CHIP:DMG: Status = 0x80 (INVALID_ACTION), @@ -455,12 +618,41 @@ tests: global attribute from all clusters on all endpoints. AttributePath = [[Attribute = Global Attribute]]. +" verification: | - The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. - - any subscribe-by-id 0xFFFFFFFF 0xFFFD 10 300 1 0xFFFF --keepSubscriptions true - - - On TH(chip-tool) Verify that the Subscription succeeds and the DUT sends back the attribute values for the global attribute + any subscribe-by-id 0xFFFFFFFF 0xFFFD 10 300 1 0xFFFF --keepSubscriptions true + + The following log is an example of the output obtained for Attribute 0x0000_FFFD on Endpoint 0 + Pls repeat this for every cluster on every endpoint. The log represents the attributes of clusters found on different endpoints. + + Verify the presence of mandatory global attribute ClusterRevision for every cluster on every endpoint: + + + Verification Instructions: + Please use the provided example log as a guide to verify the attributes for other clusters and endpoints in a similar manner. + [1690541617.461279][9488:9490] CHIP:DMG: } + [1690541617.461374][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 124546948 + [1690541617.461379][9488:9490] CHIP:TOO: ClusterRevision: 4 + [1690541617.461388][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 1468663600 + [1690541617.461391][9488:9490] CHIP:TOO: ClusterRevision: 4 + [1690541617.461399][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 2536415407 + [1690541617.461402][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461410][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFD DataVersion: 1723648967 + [1690541617.461413][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461421][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFFD DataVersion: 659240739 + [1690541617.461424][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461432][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFFD DataVersion: 3950349597 + [1690541617.461435][9488:9490] CHIP:TOO: ClusterRevision: 2 + [1690541617.461443][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Attribute 0x0000_FFFD DataVersion: 1224601682 + [1690541617.461446][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461454][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFD DataVersion: 2744454868 + [1690541617.461456][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461464][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 463823876 + [1690541617.461467][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461475][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFD DataVersion: 115397017 + [1690541617.461477][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461485][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFD DataVersion: 85684249 + [1690541617.461488][9488:9490] CHIP:TOO: ClusterRevision: 2 + [1690541617.461496][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_FFFD DataVersion: 75615160 + [1690541617.461498][9488:9490] CHIP:TOO: ClusterRevision: 1 disabled: true - label: @@ -468,81 +660,107 @@ tests: attribute on an endpoint on all clusters. AttributePath = [[Attribute = Global Attribute, Endpoint = EndpointID ]]. +" verification: | - The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. - - any subscribe-by-id 0xFFFFFFFF 0xFFFD 10 300 1 0 --keepSubscriptions true + The following log is an example of the output obtained for Attribute 0x0000_FFFD on Endpoint 0 + Pls repeat this for every cluster on endpoint 0. The log represents the attribute of clusters found on endpoint 0. + + Verify the presence of mandatory global attribute ClusterRevision for every cluster on every endpoint: + + + Verification Instructions: + Please use the provided example log as a guide to verify the attributes for other clusters and endpoints in a similar manner. + + [1690542041.905545][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690542041.905546][9488:9490] CHIP:DMG: } + [1690542041.905621][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 124546948 + [1690542041.905625][9488:9490] CHIP:TOO: ClusterRevision: 4 + [1690542041.905634][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 1468663600 + [1690542041.905637][9488:9490] CHIP:TOO: ClusterRevision: 4 + [1690542041.905646][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 2536415407 + [1690542041.905649][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905657][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFD DataVersion: 1723648967 + [1690542041.905659][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905667][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFFD DataVersion: 659240739 + [1690542041.905670][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905678][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFFD DataVersion: 3950349597 + [1690542041.905680][9488:9490] CHIP:TOO: ClusterRevision: 2 + [1690542041.905688][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Attribute 0x0000_FFFD DataVersion: 1224601682 + [1690542041.905691][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905699][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFD DataVersion: 2744454868 + [1690542041.905701][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905710][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 463823876 + [1690542041.905712][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905720][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFD DataVersion: 115397017 + [1690542041.905722][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905730][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFD DataVersion: 85684249 + [1690542041.905733][9488:9490] CHIP:TOO: ClusterRevision: 2 + [1690542041.905741][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_FFFD DataVersion: 75615160 + [1690542041.905743][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905751][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFD DataVersion: 1962336111 + [1690542041.905753][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905761][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFD DataVersion: 465381371 + [1690542041.905763][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905772][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_FFFD DataVersion: 2781452270 + [1690542041.905774][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905782][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_FFFD DataVersion: 3343308905 + [1690542041.905784][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905792][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_FFFD DataVersion: 1933667935 + [1690542041.905794][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905803][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFD DataVersion: 1917440631 + [1690542041.905806][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905814][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_FFFD DataVersion: 2059544742 + [1690542041.905816][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905824][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0038 Attribute 0x0000_FFFD DataVersion: 292367345 + [1690542041.905826][9488:9490] CHIP:TOO: ClusterRevision: 2 + [1690542041.905835][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_FFFD DataVersion: 4275836516 + [1690542041.905837][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905845][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_FFFD DataVersion: 2334789054 + [1690542041.905848][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905856][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFD DataVersion: 2215403935 + [1690542041.905858][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905866][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFD DataVersion: 1171006049 + [1690542041.905868][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905877][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_FFFD DataVersion: 1339481925 + [1690542041.905879][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905887][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_FFFD DataVersion: 2155717858 + [1690542041.905889][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905897][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0405 Attribute 0x0000_FFFD DataVersion: 2620361579 + [1690542041.906830][9488:9490] CHIP:TOO: ClusterRevision: 3 + [1690542041.906854][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0xFFF1_FC06 Attribute 0x0000_FFFD DataVersion: 2161647034 + [1690542041.906860][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.906886][9488:9490] CHIP:DMG: MoveToState ReadClient[0x7faef801d0f0]: Moving to [AwaitingSu] + [1690542041.906910][9488:9490] CHIP:EM: <<< [E:49949i S:38251 M:151709045 (Ack:20807605)] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0001:01 (IM:StatusResponse) + [1690542041.906915][9488:9490] CHIP:IN: (S) Sending msg 151709045 on secure session with LSID: 38251 + [1690542041.907098][9488:9490] CHIP:EM: >>> [E:49949i S:38251 M:20807606 (Ack:151709045)] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0001:04 (IM:SubscribeResponse) + [1690542041.907107][9488:9490] CHIP:EM: Found matching exchange: 49949i, Delegate: 0x7faef801d100 + [1690542041.907113][9488:9490] CHIP:EM: Rxd Ack; Removing MessageCounter:151709045 from Retrans Table on exchange 49949i + [1690542041.907119][9488:9490] CHIP:DMG: SubscribeResponse is received + [1690542041.907126][9488:9490] CHIP:DMG: SubscribeResponseMessage = + [1690542041.907128][9488:9490] CHIP:DMG: { + [1690542041.907131][9488:9490] CHIP:DMG: SubscriptionId = 0x9488dc04, + [1690542041.907134][9488:9490] CHIP:DMG: MaxInterval = 0x12c, + [1690542041.907137][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690542041.907139][9488:9490] CHIP:DMG: } + [1690542041.907144][9488:9490] CHIP:DMG: Subscription established with SubscriptionID = 0x9488dc04 MinInterval = 10s MaxInterval = 300s Peer = 01:0000000000000001 + disabled: true - - On TH(chip-tool) Verify that the Subscription succeeds and the DUT sends back the attribute values for the global attribute - - [1657451191.595630][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657451191.595654][11635:11640] CHIP:DMG: } - [1657451191.596003][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 1247215770 - [1657451191.596042][11635:11640] CHIP:TOO: ClusterRevision: 4 - [1657451191.596102][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 3391062846 - [1657451191.596129][11635:11640] CHIP:TOO: ClusterRevision: 4 - [1657451191.596187][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 4071202320 - [1657451191.596214][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596271][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFD DataVersion: 2618211726 - [1657451191.596299][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596356][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFFD DataVersion: 2563208108 - [1657451191.596382][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596439][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFFD DataVersion: 1504991228 - [1657451191.596466][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596523][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Attribute 0x0000_FFFD DataVersion: 3503114671 - [1657451191.596550][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596607][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFD DataVersion: 655424947 - [1657451191.596634][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596691][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 2421456926 - [1657451191.596717][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596774][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFD DataVersion: 3528791487 - [1657451191.596800][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596857][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002E Attribute 0x0000_FFFD DataVersion: 968449410 - [1657451191.596883][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596940][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFD DataVersion: 2811758882 - [1657451191.596967][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597023][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_FFFD DataVersion: 1035240738 - [1657451191.597050][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597107][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFD DataVersion: 1760092942 - [1657451191.597133][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597191][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFD DataVersion: 2220680799 - [1657451191.597217][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597275][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_FFFD DataVersion: 3326056069 - [1657451191.597301][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597360][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_FFFD DataVersion: 3433535141 - [1657451191.597386][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597443][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_FFFD DataVersion: 3003261549 - [1657451191.597470][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597526][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFD DataVersion: 3106710214 - [1657451191.597553][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597610][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_FFFD DataVersion: 3053018824 - [1657451191.597637][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597694][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_FFFD DataVersion: 1257168122 - [1657451191.597721][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597777][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_FFFD DataVersion: 2262465581 - [1657451191.597804][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597861][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFD DataVersion: 901334231 - [1657451191.597888][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597945][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFD DataVersion: 4191161303 - [1657451191.597972][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.598030][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_FFFD DataVersion: 2358987419 - [1657451191.598057][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.598114][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0405 Attribute 0x0000_FFFD DataVersion: 2403664035 - [1657451191.598141][11635:11640] CHIP:TOO: ClusterRevision: 3 - [1657451191.598261][11635:11640] CHIP:DMG: MoveToState ReadClient[0xffff94006d20]: Moving to [AwaitingSu] - [1657451191.598325][11635:11640] CHIP:EM: Piggybacking Ack for MessageCounter:11055908 on exchange: 33634i - [1657451191.598398][11635:11640] CHIP:IN: Prepared secure message 0xffff940026a8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 33634i with MessageCounter:190733064. - [1657451191.598437][11635:11640] CHIP:IN: Sending encrypted msg 0xffff940026a8 with MessageCounter:190733064 to 0x0000000000000001 (1) at monotonic time: 0000000000B5956B msec - [1657451191.599445][11635:11640] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:11055909 on exchange 33634i - [1657451191.599480][11635:11640] CHIP:EM: Found matching exchange: 33634i, Delegate: 0xffff94006d20 - [1657451191.599517][11635:11640] CHIP:EM: Rxd Ack; Removing MessageCounter:190733064 from Retrans Table on exchange 33634i - [1657451191.599544][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733064 from RetransTable on exchange 33634i - [1657451191.599595][11635:11640] CHIP:DMG: SubscribeResponseMessage = - [1657451191.599623][11635:11640] CHIP:DMG: { - [1657451191.599647][11635:11640] CHIP:DMG: SubscriptionId = 0x22d38d78, - [1657451191.599674][11635:11640] CHIP:DMG: MaxInterval = 0x12c, - [1657451191.599700][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657451191.599723][11635:11640] CHIP:DMG: } - [1657451191.599751][11635:11640] CHIP:DMG: Subscription established with SubscriptionID = 0x22d38d78 MinInterval = 10s MaxInterval = 300s Peer = 01:0000000000000001 + - label: + "Step 12: TH sends a subscription request to the DUT with both + AttributeRequests and EventRequests as empty" + verification: | + Please send the following command from TH (the subscription requester) to DUT (the device under test) to activate the subscription with both AttributeRequests and EventRequests as empty + + any subscribe-none 10 100 1 --keepSubscriptions 1 + + On TH (chip-tool), verify that the DUT sends an error message, confirming that the subscription is not established successfully + [1690884829.708780][84191:84193] CHIP:EM: Rxd Ack; Removing MessageCounter:136461510 from Retrans Table on exchange 23099i + [1690884829.708861][84191:84193] CHIP:DMG: StatusResponseMessage = + [1690884829.708907][84191:84193] CHIP:DMG: { + [1690884829.708947][84191:84193] CHIP:DMG: Status = 0x80 (INVALID_ACTION), + [1690884829.708988][84191:84193] CHIP:DMG: InteractionModelRevision = 1 + [1690884829.709026][84191:84193] CHIP:DMG: } + [1690884829.709064][84191:84193] CHIP:IM: Received status response, status is 0x80 (INVALID_ACTION) + [1690884829.709196][84191:84193] CHIP:EM: <<< [E:23099i S:5058 M:136461511 (Ack:90075666)] (S) Msg TX to 1:0000000000000001 [EAE3] --- Type 0001:01 (IM:StatusResponse) + [1690884829.709252][84191:84193] CHIP:IN: (S) Sending msg 136461511 on secure session with LSID: 5058 + [1690884829.709420][84191:84193] CHIP:DMG: MoveToState ReadClient[0xffff9c005e90]: Moving to [ Idle] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml index 393c01c3bb8db2..b0e91d442a3898 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 3.4.3. [TC-IDM-4.3] Report Data Messages post Subscription Activation from - DUT Test Cases. [{DUT_Server}] + 32.4.3. [TC-IDM-4.3] Report Data Messages post Subscription Activation from + DUT Test Cases. [DUT as Server] PICS: - MCORE.IDM.S @@ -26,17 +26,62 @@ config: endpoint: 0 tests: - - label: "Note" + - label: "Notes/Testing Considerations" + verification: | + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. + disabled: true + + - label: "Pre condition" verification: | Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start + Here the command to enter interactive mode:-- ./chip-tool interactive start + disabled: true + + - label: "Step 1a: DUT and TH activate the subscription." + verification: | + Activate the Subscription between DUT and TH by sending below mentioned command + + onoff subscribe on-off 10 100 1 1 --keepSubscriptions true + + on TH(chip-tool), + 1. Verify Report Data Message Received: + On the target hardware (TH), check if a report data message is received. + + 2. Verify Subscribe Response Fields: + In the received report data message, examine the Subscribe Response to ensure it contains the following fields: + SubscriptionId + MaxInterval + + [1690479841.107906][5694:5696] CHIP:DMG: + [1690479841.107911][5694:5696] CHIP:DMG: ], + [1690479841.107923][5694:5696] CHIP:DMG: + [1690479841.107930][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690479841.107936][5694:5696] CHIP:DMG: } + [1690479841.107987][5694:5696] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 2332229409 + [1690479841.107999][5694:5696] CHIP:TOO: OnOff: FALSE + [1690479841.108015][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848013240]: Moving to [AwaitingSu] + [1690479841.108061][5694:5696] CHIP:EM: <<< [E:36541i S:55497 M:232793692 (Ack:16536722)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0001:01 (IM:StatusResponse) + [1690479841.108075][5694:5696] CHIP:IN: (S) Sending msg 232793692 on secure session with LSID: 55497 + [1690479841.108621][5694:5696] CHIP:EM: >>> [E:36541i S:55497 M:16536723 (Ack:232793692)] (S) Msg RX from 1:0000000000000001 [3C19] --- Type 0001:04 (IM:SubscribeResponse) + [1690479841.108645][5694:5696] CHIP:EM: Found matching exchange: 36541i, Delegate: 0x7fd848013250 + [1690479841.108659][5694:5696] CHIP:EM: Rxd Ack; Removing MessageCounter:232793692 from Retrans Table on exchange 36541i + [1690479841.108673][5694:5696] CHIP:DMG: SubscribeResponse is received + [1690479841.108689][5694:5696] CHIP:DMG: SubscribeResponseMessage = + [1690479841.108697][5694:5696] CHIP:DMG: { + [1690479841.108704][5694:5696] CHIP:DMG: SubscriptionId = 0x5503a5a, + [1690479841.108711][5694:5696] CHIP:DMG: MaxInterval = 0x64, + [1690479841.108718][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690479841.108723][5694:5696] CHIP:DMG: } + [1690479841.108732][5694:5696] CHIP:DMG: Subscription established with SubscriptionID = 0x05503a5a MinInterval = 10s MaxInterval = 100s Peer = 01:0000000000000001 + [1690479841.108743][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848013240]: Moving to [Subscripti] disabled: true - label: - "Step 1: DUT and TH activate the subscription. Change the value of the - attribute which has been subscribed on the DUT by manually changing - some settings on the device. Example: Temperature sensor may update - the value of the room temperature. Turning on/off on a light bulb." + "Step 1b: Change the value of the attribute which has been subscribed + on the DUT by manually changing some settings on the device. Example: + Temperature sensor may update the value of the room temperature. + Turning on/off on a light bulb." verification: | DUT dependency test step is execpting to Change the value of the attribute which has been subscribed on the DUT by manually changing some settings on the device. @@ -49,6 +94,8 @@ tests: attribute which has been subscribed on the DUT by sending an IMWrite or Invoke message to the DUT from the TH. +" verification: | + Activate the Subscription between DUT and TH by sending below mentioned command + onoff subscribe start-up-on-off 30 100 1 1 --keepSubscriptions true on TH(chip-tool), verify that DUT is responds right attribute value for above command @@ -120,9 +167,11 @@ tests: disabled: true - label: - "Step 3: DUT and TH activate the subscription for an attribute. Dont + "Step 3: DUT and TH activate the subscription for an attribute. Do not change the value of the attribute which has been subscribed." verification: | + Activate the Subscription between DUT and TH by sending below mentioned command + onoff subscribe on-off 10 200 1 1 --keepSubscriptions true on TH(chip-tool) verify that DUT is responds right attribute value for above command @@ -172,7 +221,7 @@ tests: - label: "Step 4: DUT and TH activate the subscription. Change the value of the attribute which has been subscribed on the DUT. TH force sends a - status response with an 'inactive subscription'. Change the value of + status response with an 'invalid subscription'. Change the value of the attribute which has been subscribed on the DUT." verification: | Out of scope @@ -182,7 +231,7 @@ tests: "Step 5: Activate the subscription between the DUT and the TH for an attribute of data type bool. Modify that attribute on the DUT. DUT should send the report data with the modified attribute value. Modify - the attribute multiple times (3 times) before the max interval time + the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_Bool verification: | @@ -265,7 +314,7 @@ tests: "Step 6: Activate the subscription between the DUT and the TH for an attribute of data type string. Modify that attribute on the DUT. DUT should send the report data with the modified attribute value Modify - the attribute multiple times (3 times) before the max interval time + the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_String verification: | @@ -347,8 +396,8 @@ tests: "Step 7: Activate the subscription between the DUT and the TH for an attribute of data type 'unsigned integer'. Modify that attribute on the DUT. DUT should send the report data with the modified attribute - value. Modify the attribute multiple times (3 times) before the max - interval time specified during the subscription activation." + value. Modify the attribute multiple times (3 times) before the + MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_UnsignedInteger verification: | any subscribe-by-id 0x0008 0x0010 10 100 1 1 --keepSubscriptions true @@ -430,8 +479,8 @@ tests: "Step 8: Activate the subscription between the DUT and the TH for an attribute of data type 'signed integer'. Modify that attribute on the DUT. DUT should send the report data with the modified attribute - value. Modify the attribute multiple times (3 times)before the max - interval time specified during the subscription activation." + value. Modify the attribute multiple times (3 times)before the + MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_SignedInteger verification: | Subscribe to an attribute of type signed integer to the Harness @@ -444,8 +493,8 @@ tests: "Step 9: Activate the subscription between the DUT and the TH for an attribute of data type 'floating point'. Modify that attribute on the DUT. DUT should send the report data with the modified attribute - value. Modify the attribute multiple times (3 times) before the max - interval time specified during the subscription activation." + value. Modify the attribute multiple times (3 times) before the + MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_FloatingPoint verification: | Subscribe to an attribute of type floating point to the Harness @@ -458,7 +507,7 @@ tests: "Step 10: Activate the subscription between the DUT and the TH for an attribute of data type list. Modify that attribute on the DUT. DUT should send the report data with the modified attribute value. Modify - the attribute multiple times (3 times) before the max interval time + the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_List verification: | @@ -489,10 +538,10 @@ tests: - label: "Step 11: Activate the subscription between the DUT and the TH for any - attribute. KeepSubsriptions flag should be set to False After the + attribute. KeepSubscriptions flag should be set to False After the Maximum interval time is elapsed, TH should send another subscription request message with different parameters than before. - KeepSubsriptions flag should be set to False Change the value of the + KeepSubscriptions flag should be set to False Change the value of the attribute requested on the DUT." verification: | basicinformation subscribe local-config-disabled 10 100 1 0 --keepSubscriptions 0 diff --git a/src/app/tests/suites/certification/Test_TC_ILL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_ILL_3_1_Simulated.yaml deleted file mode 100644 index 17e4c8b93399e4..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_ILL_3_1_Simulated.yaml +++ /dev/null @@ -1,240 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 69.3.1. [TC-ILL-3.1] Attributes with client as DUT - -PICS: - - ILL.C - - ILL.C.AM-READ - - ILL.C.AO-READ - - ILL.C.AM-WRITE - - ILL.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Illuminance Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: MeasuredValue" - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute: MinMeasuredValue" - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute: MaxMeasuredValue" - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute: Tolerance" - wait: "readAttribute" - attribute: "Tolerance" - - - label: "Read attribute: LightSensorType" - wait: "readAttribute" - attribute: "LightSensorType" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool illuminancemeasurement read attribute-list 1 1 - - Verify DUT receives AttributeList response on the TH(all-clusters-minimal-app) Log: - - Received Read request - [1663070306.262953][4422:4422] CHIP:DMG: ReadRequestMessage = - [1663070281.411639][4422:4422] CHIP:DMG: { - [1663070281.411663][4422:4422] CHIP:DMG: AttributePathIBs = - [1663070281.411698][4422:4422] CHIP:DMG: [ - [1663070281.411724][4422:4422] CHIP:DMG: AttributePathIB = - [1663070281.411757][4422:4422] CHIP:DMG: { - [1663070281.411794][4422:4422] CHIP:DMG: Endpoint = 0x1, - [1663070281.411830][4422:4422] CHIP:DMG: Cluster = 0x400, - [1663070281.411865][4422:4422] CHIP:DMG: Attribute = 0x0000_FFFB, - [1663070281.411898][4422:4422] CHIP:DMG: } - [1663070281.411930][4422:4422] CHIP:DMG: - [1663070281.411962][4422:4422] CHIP:DMG: ], - [1663070281.411992][4422:4422] CHIP:DMG: - [1663070281.412021][4422:4422] CHIP:DMG: isFabricFiltered = true, - [1663070281.412051][4422:4422] CHIP:DMG: InteractionModelRevision = 1 - [1663070281.412078][4422:4422] CHIP:DMG: }, - [1663070281.412158][4422:4422] CHIP:DMG: IM RH moving to [GeneratingReports] - [1663070281.412262][4422:4422] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1663070281.412293][4422:4422] CHIP:DMG: Cluster 400, Attribute fffb is dirty - [1663070281.412317][4422:4422] CHIP:DMG: Reading attribute: Cluster=0x0000_0400 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - [1663070281.412345][4422:4422] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0400 e=1 p=v - - - ./chip-tool illuminancemeasurement read feature-map 1 1 - - Verify DUT receives FeatureMap attribute response on the TH(all-clusters-minimal-app) Log: - - Received Read request - [1663070306.262953][4422:4422] CHIP:DMG: ReadRequestMessage = - [1663070306.262953][4422:4422] CHIP:DMG: ReadRequestMessage = - [1663070306.262984][4422:4422] CHIP:DMG: { - [1663070306.263008][4422:4422] CHIP:DMG: AttributePathIBs = - [1663070306.263041][4422:4422] CHIP:DMG: [ - [1663070306.263067][4422:4422] CHIP:DMG: AttributePathIB = - [1663070306.263103][4422:4422] CHIP:DMG: { - [1663070306.263140][4422:4422] CHIP:DMG: Endpoint = 0x1, - [1663070306.263175][4422:4422] CHIP:DMG: Cluster = 0x400, - [1663070306.263212][4422:4422] CHIP:DMG: Attribute = 0x0000_FFFC, - [1663070306.263244][4422:4422] CHIP:DMG: } - [1663070306.263277][4422:4422] CHIP:DMG: - [1663070306.263307][4422:4422] CHIP:DMG: ], - [1663070306.263339][4422:4422] CHIP:DMG: - [1663070306.263370][4422:4422] CHIP:DMG: isFabricFiltered = true, - [1663070306.263399][4422:4422] CHIP:DMG: InteractionModelRevision = 1 - [1663070306.263426][4422:4422] CHIP:DMG: }, - [1663070306.263508][4422:4422] CHIP:DMG: IM RH moving to [GeneratingReports] - [1663070306.263608][4422:4422] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1663070306.263640][4422:4422] CHIP:DMG: Cluster 400, Attribute fffc is dirty - [1663070306.263663][4422:4422] CHIP:DMG: Reading attribute: Cluster=0x0000_0400 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1663070306.263695][4422:4422] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0400 e=1 p=v - - - - - ./chip-tool illuminancemeasurement read min-measured-value 1 1 - - Verify DUT receives min-measured-value attribute response on the TH(all-clusters-minimal-app) Log: - - [1658142106.966504][13946:13946] CHIP:IM: Received Read request - [1658142106.966671][13946:13946] CHIP:DMG: ReadRequestMessage = - [1658142106.966738][13946:13946] CHIP:DMG: { - [1658142106.966821][13946:13946] CHIP:DMG: AttributePathIBs = - [1658142106.966887][13946:13946] CHIP:DMG: [ - [1658142106.966947][13946:13946] CHIP:DMG: AttributePathIB = - [1658142106.967035][13946:13946] CHIP:DMG: { - [1658142106.967105][13946:13946] CHIP:DMG: Endpoint = 0x1, - [1658142106.967209][13946:13946] CHIP:DMG: Cluster = 0x400, - [1658142106.967254][13946:13946] CHIP:DMG: Attribute = 0x0000_0001, - [1658142106.967281][13946:13946] CHIP:DMG: } - [1658142106.967320][13946:13946] CHIP:DMG: - [1658142106.967346][13946:13946] CHIP:DMG: ], - [1658142106.967384][13946:13946] CHIP:DMG: - [1658142106.967413][13946:13946] CHIP:DMG: isFabricFiltered = true, - [1658142106.967447][13946:13946] CHIP:DMG: InteractionModelRevision = 1 - [1658142106.967471][13946:13946] CHIP:DMG: }, - [1658142106.967568][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] - [1658142106.967676][13946:13946] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - - - ./chip-tool illuminancemeasurement read max-measured-value 1 1 - - Verify DUT receives max-measured-value attribute response on the TH(all-clusters-minimal-app) Log: - [1658142397.298817][13946:13946] CHIP:IM: Received Read request - [1658142397.298895][13946:13946] CHIP:DMG: ReadRequestMessage = - [1658142397.298932][13946:13946] CHIP:DMG: { - [1658142397.298960][13946:13946] CHIP:DMG: AttributePathIBs = - [1658142397.298986][13946:13946] CHIP:DMG: [ - [1658142397.299020][13946:13946] CHIP:DMG: AttributePathIB = - [1658142397.299047][13946:13946] CHIP:DMG: { - [1658142397.299085][13946:13946] CHIP:DMG: Endpoint = 0x1, - [1658142397.299125][13946:13946] CHIP:DMG: Cluster = 0x400, - [1658142397.299158][13946:13946] CHIP:DMG: Attribute = 0x0000_0002, - [1658142397.299195][13946:13946] CHIP:DMG: } - [1658142397.299223][13946:13946] CHIP:DMG: - [1658142397.299258][13946:13946] CHIP:DMG: ], - [1658142397.299286][13946:13946] CHIP:DMG: - [1658142397.299321][13946:13946] CHIP:DMG: isFabricFiltered = true, - [1658142397.299346][13946:13946] CHIP:DMG: InteractionModelRevision = 1 - [1658142397.299378][13946:13946] CHIP:DMG: }, - [1658142397.299462][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] - [1658142397.299556][13946:13946] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - - - ./chip-tool illuminancemeasurement read measured-value 1 1 - - Verify DUT receives measured-value attribute response on the TH(all-clusters-minimal-app) Log: - - [1658142471.266188][13946:13946] CHIP:IM: Received Read request - [1658142471.266273][13946:13946] CHIP:DMG: ReadRequestMessage = - [1658142471.266303][13946:13946] CHIP:DMG: { - [1658142471.266329][13946:13946] CHIP:DMG: AttributePathIBs = - [1658142471.266358][13946:13946] CHIP:DMG: [ - [1658142471.266386][13946:13946] CHIP:DMG: AttributePathIB = - [1658142471.266417][13946:13946] CHIP:DMG: { - [1658142471.266449][13946:13946] CHIP:DMG: Endpoint = 0x1, - [1658142471.266486][13946:13946] CHIP:DMG: Cluster = 0x400, - [1658142471.266521][13946:13946] CHIP:DMG: Attribute = 0x0000_0000, - [1658142471.266558][13946:13946] CHIP:DMG: } - [1658142471.266593][13946:13946] CHIP:DMG: - [1658142471.266624][13946:13946] CHIP:DMG: ], - [1658142471.266656][13946:13946] CHIP:DMG: - [1658142471.266686][13946:13946] CHIP:DMG: isFabricFiltered = true, - [1658142471.266714][13946:13946] CHIP:DMG: InteractionModelRevision = 1 - [1658142471.266740][13946:13946] CHIP:DMG: }, - [1658142471.266826][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] - [1658142471.266939][13946:13946] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool illuminancemeasurement read tolerance 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool illuminancemeasurement read light-sensor-type 1 1 - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_I_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_I_3_1_Simulated.yaml deleted file mode 100644 index 408b2fbf46ae9d..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_I_3_1_Simulated.yaml +++ /dev/null @@ -1,527 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 59.3.1. [TC-I-3.1] Attributes with Client as DUT - -PICS: - - I.C - - I.C.AM-READ - - I.C.AO-READ - - I.C.AM-WRITE - - I.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Identify" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: IdentifyTime" - PICS: I.C.AM-READ - wait: "readAttribute" - attribute: "IdentifyTime" - - - label: "Read attribute: identifytype" - PICS: I.C.AM-READ - wait: "readAttribute" - attribute: "IdentifyType" - - - label: "write attribute: IdentifyTime" - PICS: I.C.AM-WRITE - wait: "writeAttribute" - attribute: "IdentifyTime" - arguments: - value: - - - label: "Readback attribute: IdentifyTime" - PICS: I.C.AM-READ - wait: "readAttribute" - attribute: "IdentifyTime" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool identify read feature-map 1 1 - - Verify none of the optional feature of the server-side of the cluster is listed on TH(all-clusters-minnimal-app) Log - - [1667198019.683786][11390:11390] CHIP:EM: Handling via exchange: 36421r, Delegate: 0xaaaaad555148 - [1667198019.683892][11390:11390] CHIP:IM: Received Read request - [1667198019.684067][11390:11390] CHIP:DMG: ReadRequestMessage = - [1667198019.684135][11390:11390] CHIP:DMG: { - [1667198019.684186][11390:11390] CHIP:DMG: AttributePathIBs = - [1667198019.684252][11390:11390] CHIP:DMG: [ - [1667198019.684313][11390:11390] CHIP:DMG: AttributePathIB = - [1667198019.684383][11390:11390] CHIP:DMG: { - [1667198019.684453][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198019.684537][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198019.684611][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFC, - [1667198019.684695][11390:11390] CHIP:DMG: } - [1667198019.684767][11390:11390] CHIP:DMG: - [1667198019.684826][11390:11390] CHIP:DMG: ], - [1667198019.684896][11390:11390] CHIP:DMG: - [1667198019.684962][11390:11390] CHIP:DMG: isFabricFiltered = true, - [1667198019.685032][11390:11390] CHIP:DMG: InteractionModelRevision = 1 - [1667198019.685092][11390:11390] CHIP:DMG: }, - [1667198019.685252][11390:11390] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667198019.685482][11390:11390] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667198019.685556][11390:11390] CHIP:DMG: Cluster 3, Attribute fffc is dirty - [1667198019.685625][11390:11390] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1667198019.685693][11390:11390] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v - [1667198019.685770][11390:11390] CHIP:DMG: AccessControl: allowed - [1667198019.685889][11390:11390] CHIP:DMG: Sending report (payload has 37 bytes)... - [1667198019.686450][11390:11390] CHIP:EM: <<< [E:36421r M:134293096 (Ack:90102725)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:05 (IM:ReportData) - [1667198019.686596][11390:11390] CHIP:IN: (S) Sending msg 134293096 on secure session with LSID: 13942 - [1667198019.687274][11390:11390] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:34895 | 134293096 | [Interaction Model (1) / Report Data (0x05) / Session = 39691 / Exchange = 36421] - [1667198019.687369][11390:11390] CHIP:DMG: Header Flags = - [1667198019.687425][11390:11390] CHIP:DMG: { - [1667198019.687511][11390:11390] CHIP:DMG: Exchange (0x06) = - [1667198019.687567][11390:11390] CHIP:DMG: { - [1667198019.687627][11390:11390] CHIP:DMG: AckMsg = 90102725 - [1667198019.687685][11390:11390] CHIP:DMG: NeedsAck = true - [1667198019.687738][11390:11390] CHIP:DMG: } - [1667198019.687809][11390:11390] CHIP:DMG: } - [1667198019.687860][11390:11390] CHIP:DMG: - [1667198019.687923][11390:11390] CHIP:DMG: Encrypted Payload (71 bytes) = - [1667198019.687979][11390:11390] CHIP:DMG: { - [1667198019.688033][11390:11390] CHIP:DMG: data = 000b9b00682601088051c3accb764025501e3a98907ee49fde00fb52eb4376fe15e852d2a6496f2f1e303426d75480b16676e4703eef4fa5faeafdd8cbbe06a5b89a6ed3bb5380 - [1667198019.688086][11390:11390] CHIP:DMG: buffer_ptr = 187650200610416 - [1667198019.688139][11390:11390] CHIP:DMG: } - [1667198019.688190][11390:11390] CHIP:DMG: - [1667198019.688266][11390:11390] CHIP:DMG: Decrypted Payload (37 bytes) = - [1667198019.688323][11390:11390] CHIP:DMG: { - [1667198019.688371][11390:11390] CHIP:DMG: data = 1536011535012600810a313837012402012403032504fcff18240200181818290424ff0118 - [1667198019.688426][11390:11390] CHIP:DMG: } - [1667198019.688484][11390:11390] CHIP:DMG: - [1667198019.688635][11390:11390] CHIP:DMG: ReportDataMessage = - [1667198019.688702][11390:11390] CHIP:DMG: { - [1667198019.688756][11390:11390] CHIP:DMG: AttributeReportIBs = - [1667198019.688833][11390:11390] CHIP:DMG: [ - [1667198019.688891][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198019.688971][11390:11390] CHIP:DMG: { - [1667198019.689038][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198019.689104][11390:11390] CHIP:DMG: { - [1667198019.689187][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198019.689278][11390:11390] CHIP:DMG: AttributePathIB = - [1667198019.689364][11390:11390] CHIP:DMG: { - [1667198019.689444][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198019.689543][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198019.689645][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFC, - [1667198019.689741][11390:11390] CHIP:DMG: } - [1667198019.689839][11390:11390] CHIP:DMG: - [1667198019.689936][11390:11390] CHIP:DMG: Data = 0, - [1667198019.690003][11390:11390] CHIP:DMG: }, - [1667198019.690087][11390:11390] CHIP:DMG: - [1667198019.690159][11390:11390] CHIP:DMG: }, - - ./chip-tool identify read attribute-list 1 1 - - Verify none of the optional attribute of the server-side of the cluster is listed on TH(all-clusters-minnimal-app) Log - - [1667198224.933982][11390:11390] CHIP:EM: Handling via exchange: 27925r, Delegate: 0xaaaaad555148 - [1667198224.934084][11390:11390] CHIP:IM: Received Read request - [1667198224.934251][11390:11390] CHIP:DMG: ReadRequestMessage = - [1667198224.934318][11390:11390] CHIP:DMG: { - [1667198224.934373][11390:11390] CHIP:DMG: AttributePathIBs = - [1667198224.934439][11390:11390] CHIP:DMG: [ - [1667198224.934546][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.934627][11390:11390] CHIP:DMG: { - [1667198224.934699][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.934793][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.934877][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.934954][11390:11390] CHIP:DMG: } - [1667198224.935024][11390:11390] CHIP:DMG: - [1667198224.935089][11390:11390] CHIP:DMG: ], - [1667198224.935161][11390:11390] CHIP:DMG: - [1667198224.935221][11390:11390] CHIP:DMG: isFabricFiltered = true, - [1667198224.935286][11390:11390] CHIP:DMG: InteractionModelRevision = 1 - [1667198224.935347][11390:11390] CHIP:DMG: }, - [1667198224.935508][11390:11390] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667198224.935740][11390:11390] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667198224.935813][11390:11390] CHIP:DMG: Cluster 3, Attribute fffb is dirty - [1667198224.935870][11390:11390] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - [1667198224.935933][11390:11390] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v - [1667198224.936010][11390:11390] CHIP:DMG: AccessControl: allowed - [1667198224.936182][11390:11390] CHIP:DMG: Sending report (payload has 245 bytes)... - [1667198224.936812][11390:11390] CHIP:EM: <<< [E:27925r M:151663564 (Ack:200483580)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:05 (IM:ReportData) - [1667198224.936917][11390:11390] CHIP:IN: (S) Sending msg 151663564 on secure session with LSID: 13943 - [1667198224.937653][11390:11390] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:59621 | 151663564 | [Interaction Model (1) / Report Data (0x05) / Session = 56997 / Exchange = 27925] - [1667198224.937751][11390:11390] CHIP:DMG: Header Flags = - [1667198224.937807][11390:11390] CHIP:DMG: { - [1667198224.937893][11390:11390] CHIP:DMG: Exchange (0x06) = - [1667198224.937950][11390:11390] CHIP:DMG: { - [1667198224.938010][11390:11390] CHIP:DMG: AckMsg = 200483580 - [1667198224.938065][11390:11390] CHIP:DMG: NeedsAck = true - [1667198224.938118][11390:11390] CHIP:DMG: } - [1667198224.938190][11390:11390] CHIP:DMG: } - [1667198224.938245][11390:11390] CHIP:DMG: - [1667198224.938314][11390:11390] CHIP:DMG: Encrypted Payload (279 bytes) = - [1667198224.938371][11390:11390] CHIP:DMG: { - [1667198224.938426][11390:11390] CHIP:DMG: data = 00a5de00cc330a0959e5cf9c38a602566830c8a854f61a764c38778932202dbd2459c7421e99d13982ea64c4e9bb13abe2b6498a67680727ab75ab029010bfd8fe9c1d4d4eac5573df7aca513dbb5727f27e9be48c11180cc3fb57985e446e60fca1454f3438ae974d7674570e60b9a7dbcd99d49a18ae607bbf2ee937d164399a5c1104322d44e8e48adf1fe35fee2a415705c74244709303c1373991d1f116ce5b3d7c9e0c03770c460fa43681d72ae6460cf825f333984a4d749f723e0c962ce57c2ad29c4abfa75c2fa89c59c8ef37843738fbb8dd7eab026ed10e790cc57558baa64c36994e7d06d27e6a43d324923dcb03f95e2f2e35a81a49cbef0afd9c3cc14ff156c3c6c0bea876ad4f3b3dad37d591f25cf0 - [1667198224.938547][11390:11390] CHIP:DMG: buffer_ptr = 187650200610672 - [1667198224.938609][11390:11390] CHIP:DMG: } - [1667198224.938661][11390:11390] CHIP:DMG: - [1667198224.938740][11390:11390] CHIP:DMG: Decrypted Payload (245 bytes) = - [1667198224.938794][11390:11390] CHIP:DMG: { - [1667198224.938848][11390:11390] CHIP:DMG: data = 1536011535012600810a313837012402012403032504fbff1836021818181535012600810a313837012402012403032504fbff34051824020018181535012600810a313837012402012403032504fbff34051824020118181535012600810a313837012402012403032504fbff3405182502f8ff18181535012600810a313837012402012403032504fbff3405182502f9ff18181535012600810a313837012402012403032504fbff3405182502fbff18181535012600810a313837012402012403032504fbff3405182502fcff18181535012600810a313837012402012403032504fbff3405182502fdff181818290424ff0118 - [1667198224.938912][11390:11390] CHIP:DMG: } - [1667198224.938963][11390:11390] CHIP:DMG: - [1667198224.939380][11390:11390] CHIP:DMG: ReportDataMessage = - [1667198224.939446][11390:11390] CHIP:DMG: { - [1667198224.939500][11390:11390] CHIP:DMG: AttributeReportIBs = - [1667198224.939585][11390:11390] CHIP:DMG: [ - [1667198224.939647][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.939745][11390:11390] CHIP:DMG: { - [1667198224.939817][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.939897][11390:11390] CHIP:DMG: { - [1667198224.939988][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.940059][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.940154][11390:11390] CHIP:DMG: { - [1667198224.940250][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.940327][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.940426][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.940521][11390:11390] CHIP:DMG: } - [1667198224.940603][11390:11390] CHIP:DMG: - [1667198224.940686][11390:11390] CHIP:DMG: Data = [ - [1667198224.940779][11390:11390] CHIP:DMG: - [1667198224.940855][11390:11390] CHIP:DMG: ], - [1667198224.940943][11390:11390] CHIP:DMG: }, - [1667198224.941038][11390:11390] CHIP:DMG: - [1667198224.941108][11390:11390] CHIP:DMG: }, - [1667198224.941204][11390:11390] CHIP:DMG: - [1667198224.941273][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.941353][11390:11390] CHIP:DMG: { - [1667198224.941425][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.941493][11390:11390] CHIP:DMG: { - [1667198224.941583][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.941672][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.941764][11390:11390] CHIP:DMG: { - [1667198224.941858][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.941954][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.942032][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.942118][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.942212][11390:11390] CHIP:DMG: } - [1667198224.942310][11390:11390] CHIP:DMG: - [1667198224.942408][11390:11390] CHIP:DMG: Data = 0, - [1667198224.942519][11390:11390] CHIP:DMG: }, - [1667198224.942595][11390:11390] CHIP:DMG: - [1667198224.942658][11390:11390] CHIP:DMG: }, - [1667198224.942746][11390:11390] CHIP:DMG: - [1667198224.942808][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.942895][11390:11390] CHIP:DMG: { - [1667198224.942957][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.943034][11390:11390] CHIP:DMG: { - [1667198224.943125][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.943215][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.943306][11390:11390] CHIP:DMG: { - [1667198224.943382][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.943478][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.943580][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.943675][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.943756][11390:11390] CHIP:DMG: } - [1667198224.943838][11390:11390] CHIP:DMG: - [1667198224.943919][11390:11390] CHIP:DMG: Data = 1, - [1667198224.944009][11390:11390] CHIP:DMG: }, - [1667198224.944089][11390:11390] CHIP:DMG: - [1667198224.944159][11390:11390] CHIP:DMG: }, - [1667198224.944248][11390:11390] CHIP:DMG: - [1667198224.944303][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.944382][11390:11390] CHIP:DMG: { - [1667198224.944447][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.944525][11390:11390] CHIP:DMG: { - [1667198224.944616][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.944706][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.944776][11390:11390] CHIP:DMG: { - [1667198224.944868][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.944968][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.945068][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.945165][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.945247][11390:11390] CHIP:DMG: } - [1667198224.945328][11390:11390] CHIP:DMG: - [1667198224.945414][11390:11390] CHIP:DMG: Data = 65528, - [1667198224.945501][11390:11390] CHIP:DMG: }, - [1667198224.945586][11390:11390] CHIP:DMG: - [1667198224.945644][11390:11390] CHIP:DMG: }, - [1667198224.945732][11390:11390] CHIP:DMG: - [1667198224.945794][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.945875][11390:11390] CHIP:DMG: { - [1667198224.945940][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.946011][11390:11390] CHIP:DMG: { - [1667198224.946091][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.946183][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.946266][11390:11390] CHIP:DMG: { - [1667198224.946360][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.946580][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.946689][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.946777][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.946856][11390:11390] CHIP:DMG: } - [1667198224.946940][11390:11390] CHIP:DMG: - [1667198224.947019][11390:11390] CHIP:DMG: Data = 65529, - [1667198224.947091][11390:11390] CHIP:DMG: }, - [1667198224.947172][11390:11390] CHIP:DMG: - [1667198224.947233][11390:11390] CHIP:DMG: }, - [1667198224.947324][11390:11390] CHIP:DMG: - [1667198224.947386][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.947467][11390:11390] CHIP:DMG: { - [1667198224.947534][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.947606][11390:11390] CHIP:DMG: { - [1667198224.947680][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.947752][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.947828][11390:11390] CHIP:DMG: { - [1667198224.947902][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.947987][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.948073][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.948153][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.948233][11390:11390] CHIP:DMG: } - [1667198224.948317][11390:11390] CHIP:DMG: - [1667198224.948399][11390:11390] CHIP:DMG: Data = 65531, - [1667198224.948473][11390:11390] CHIP:DMG: }, - [1667198224.948549][11390:11390] CHIP:DMG: - [1667198224.948614][11390:11390] CHIP:DMG: }, - [1667198224.948699][11390:11390] CHIP:DMG: - [1667198224.948760][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.948841][11390:11390] CHIP:DMG: { - [1667198224.948902][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.948973][11390:11390] CHIP:DMG: { - [1667198224.949042][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.949118][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.949196][11390:11390] CHIP:DMG: { - [1667198224.949274][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.949359][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.949444][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.949526][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.949606][11390:11390] CHIP:DMG: } - [1667198224.949685][11390:11390] CHIP:DMG: - [1667198224.949765][11390:11390] CHIP:DMG: Data = 65532, - [1667198224.949841][11390:11390] CHIP:DMG: }, - [1667198224.949915][11390:11390] CHIP:DMG: - [1667198224.949981][11390:11390] CHIP:DMG: }, - [1667198224.950072][11390:11390] CHIP:DMG: - [1667198224.950133][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.950214][11390:11390] CHIP:DMG: { - [1667198224.950274][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.950346][11390:11390] CHIP:DMG: { - [1667198224.950420][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.950536][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.950625][11390:11390] CHIP:DMG: { - [1667198224.950715][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.950805][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.950890][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.950978][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.951062][11390:11390] CHIP:DMG: } - [1667198224.951145][11390:11390] CHIP:DMG: - [1667198224.951231][11390:11390] CHIP:DMG: Data = 65533, - [1667198224.951310][11390:11390] CHIP:DMG: }, - [1667198224.951385][11390:11390] CHIP:DMG: - [1667198224.951455][11390:11390] CHIP:DMG: }, - [1667198224.951534][11390:11390] CHIP:DMG: - - - ./chip-tool identify read identify-time 1 1 - - Verify DUT receives identify-time attribute response on theTH(all-clusters-minimal-app) - - [1667198339.074575][11390:11390] CHIP:EM: Handling via exchange: 6451r, Delegate: 0xaaaaad555148 - [1667198339.074679][11390:11390] CHIP:IM: Received Read request - [1667198339.074858][11390:11390] CHIP:DMG: ReadRequestMessage = - [1667198339.074925][11390:11390] CHIP:DMG: { - [1667198339.074984][11390:11390] CHIP:DMG: AttributePathIBs = - [1667198339.075050][11390:11390] CHIP:DMG: [ - [1667198339.075110][11390:11390] CHIP:DMG: AttributePathIB = - [1667198339.075186][11390:11390] CHIP:DMG: { - [1667198339.075265][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198339.075356][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198339.075447][11390:11390] CHIP:DMG: Attribute = 0x0000_0000, - [1667198339.075531][11390:11390] CHIP:DMG: } - [1667198339.075604][11390:11390] CHIP:DMG: - [1667198339.075671][11390:11390] CHIP:DMG: ], - [1667198339.075742][11390:11390] CHIP:DMG: - [1667198339.075809][11390:11390] CHIP:DMG: isFabricFiltered = true, - [1667198339.075875][11390:11390] CHIP:DMG: InteractionModelRevision = 1 - [1667198339.075934][11390:11390] CHIP:DMG: }, - [1667198339.076096][11390:11390] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667198339.076326][11390:11390] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667198339.076400][11390:11390] CHIP:DMG: Cluster 3, Attribute 0 is dirty - [1667198339.076456][11390:11390] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1667198339.076522][11390:11390] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v - [1667198339.076600][11390:11390] CHIP:DMG: AccessControl: allowed - [1667198339.076716][11390:11390] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667198339.077270][11390:11390] CHIP:EM: <<< [E:6451r M:222156074 (Ack:7059472)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:05 (IM:ReportData) - [1667198339.077372][11390:11390] CHIP:IN: (S) Sending msg 222156074 on secure session with LSID: 13945 - [1667198339.078057][11390:11390] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:46790 | 222156074 | [Interaction Model (1) / Report Data (0x05) / Session = 2802 / Exchange = 6451] - [1667198339.078153][11390:11390] CHIP:DMG: Header Flags = - [1667198339.078211][11390:11390] CHIP:DMG: { - [1667198339.078298][11390:11390] CHIP:DMG: Exchange (0x06) = - [1667198339.078355][11390:11390] CHIP:DMG: { - [1667198339.078414][11390:11390] CHIP:DMG: AckMsg = 7059472 - [1667198339.078523][11390:11390] CHIP:DMG: NeedsAck = true - [1667198339.078581][11390:11390] CHIP:DMG: } - [1667198339.078654][11390:11390] CHIP:DMG: } - [1667198339.078703][11390:11390] CHIP:DMG: - [1667198339.078772][11390:11390] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667198339.078828][11390:11390] CHIP:DMG: { - [1667198339.078882][11390:11390] CHIP:DMG: data = 00f20a002ad53d0dbfe9edb13d868a05c798791f5f8fdd9da1275c3e8b4a0e90d79afa29de34e027d2151f9b8eddefe41084248d0eb87df77fff3e74845f815637f1d35bdbf5 - [1667198339.078940][11390:11390] CHIP:DMG: buffer_ptr = 187650200611616 - [1667198339.078993][11390:11390] CHIP:DMG: } - [1667198339.079044][11390:11390] CHIP:DMG: - [1667198339.079118][11390:11390] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667198339.079177][11390:11390] CHIP:DMG: { - [1667198339.079230][11390:11390] CHIP:DMG: data = 1536011535012600810a3138370124020124030324040018240200181818290424ff0118 - [1667198339.079286][11390:11390] CHIP:DMG: } - [1667198339.079337][11390:11390] CHIP:DMG: - [1667198339.079498][11390:11390] CHIP:DMG: ReportDataMessage = - [1667198339.079557][11390:11390] CHIP:DMG: { - [1667198339.079613][11390:11390] CHIP:DMG: AttributeReportIBs = - [1667198339.079699][11390:11390] CHIP:DMG: [ - [1667198339.079762][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198339.079843][11390:11390] CHIP:DMG: { - [1667198339.079916][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198339.080009][11390:11390] CHIP:DMG: { - [1667198339.080102][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198339.080193][11390:11390] CHIP:DMG: AttributePathIB = - [1667198339.080287][11390:11390] CHIP:DMG: { - [1667198339.080384][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198339.080467][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198339.080567][11390:11390] CHIP:DMG: Attribute = 0x0000_0000, - [1667198339.080648][11390:11390] CHIP:DMG: } - [1667198339.080752][11390:11390] CHIP:DMG: - [1667198339.080853][11390:11390] CHIP:DMG: Data = 0, - [1667198339.080927][11390:11390] CHIP:DMG: }, - [1667198339.081022][11390:11390] CHIP:DMG: - [1667198339.081103][11390:11390] CHIP:DMG: }, - - - - ./chip-tool identify read identify-type 1 1 - - Verify DUT receives identify-type attribute response on theTH(all-clusters-minimal-app) - - [1667198289.735862][11390:11390] CHIP:EM: Handling via exchange: 64741r, Delegate: 0xaaaaad555148 - [1667198289.735963][11390:11390] CHIP:IM: Received Read request - [1667198289.736138][11390:11390] CHIP:DMG: ReadRequestMessage = - [1667198289.736198][11390:11390] CHIP:DMG: { - [1667198289.736254][11390:11390] CHIP:DMG: AttributePathIBs = - [1667198289.736320][11390:11390] CHIP:DMG: [ - [1667198289.736375][11390:11390] CHIP:DMG: AttributePathIB = - [1667198289.736452][11390:11390] CHIP:DMG: { - [1667198289.736528][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198289.736602][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198289.736682][11390:11390] CHIP:DMG: Attribute = 0x0000_0001, - [1667198289.736754][11390:11390] CHIP:DMG: } - [1667198289.736827][11390:11390] CHIP:DMG: - [1667198289.736899][11390:11390] CHIP:DMG: ], - [1667198289.736964][11390:11390] CHIP:DMG: - [1667198289.737029][11390:11390] CHIP:DMG: isFabricFiltered = true, - [1667198289.737095][11390:11390] CHIP:DMG: InteractionModelRevision = 1 - [1667198289.737155][11390:11390] CHIP:DMG: }, - [1667198289.737319][11390:11390] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667198289.737548][11390:11390] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667198289.737622][11390:11390] CHIP:DMG: Cluster 3, Attribute 1 is dirty - [1667198289.737678][11390:11390] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) - [1667198289.737744][11390:11390] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v - [1667198289.737815][11390:11390] CHIP:DMG: AccessControl: allowed - [1667198289.737932][11390:11390] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667198289.738541][11390:11390] CHIP:EM: <<< [E:64741r M:69392004 (Ack:178331771)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:05 (IM:ReportData) - [1667198289.738642][11390:11390] CHIP:IN: (S) Sending msg 69392004 on secure session with LSID: 13944 - [1667198289.739330][11390:11390] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:42392 | 69392004 | [Interaction Model (1) / Report Data (0x05) / Session = 32014 / Exchange = 64741] - [1667198289.739426][11390:11390] CHIP:DMG: Header Flags = - [1667198289.739484][11390:11390] CHIP:DMG: { - [1667198289.739569][11390:11390] CHIP:DMG: Exchange (0x06) = - [1667198289.739626][11390:11390] CHIP:DMG: { - [1667198289.739683][11390:11390] CHIP:DMG: AckMsg = 178331771 - [1667198289.739739][11390:11390] CHIP:DMG: NeedsAck = true - [1667198289.739793][11390:11390] CHIP:DMG: } - [1667198289.739864][11390:11390] CHIP:DMG: } - [1667198289.739913][11390:11390] CHIP:DMG: - [1667198289.739975][11390:11390] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667198289.740036][11390:11390] CHIP:DMG: { - [1667198289.740090][11390:11390] CHIP:DMG: data = 000e7d0084d62204cbd01ef8fb96fef21446fb254f4ff23fac8a52c2dd91613eab078272abd47216595fafa1d635d39acb95eb86803156e59f4b8355e1b58b60cee20904a1f2 - [1667198289.740142][11390:11390] CHIP:DMG: buffer_ptr = 187650200612528 - [1667198289.740194][11390:11390] CHIP:DMG: } - [1667198289.740245][11390:11390] CHIP:DMG: - [1667198289.740321][11390:11390] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667198289.740379][11390:11390] CHIP:DMG: { - [1667198289.740431][11390:11390] CHIP:DMG: data = 1536011535012600810a3138370124020124030324040118240202181818290424ff0118 - [1667198289.740486][11390:11390] CHIP:DMG: } - [1667198289.740532][11390:11390] CHIP:DMG: - [1667198289.740692][11390:11390] CHIP:DMG: ReportDataMessage = - [1667198289.740749][11390:11390] CHIP:DMG: { - [1667198289.740794][11390:11390] CHIP:DMG: AttributeReportIBs = - [1667198289.740861][11390:11390] CHIP:DMG: [ - [1667198289.740913][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198289.740984][11390:11390] CHIP:DMG: { - [1667198289.741055][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198289.741135][11390:11390] CHIP:DMG: { - [1667198289.741217][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198289.741305][11390:11390] CHIP:DMG: AttributePathIB = - [1667198289.741389][11390:11390] CHIP:DMG: { - [1667198289.741484][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198289.741588][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198289.741688][11390:11390] CHIP:DMG: Attribute = 0x0000_0001, - [1667198289.741782][11390:11390] CHIP:DMG: } - [1667198289.741858][11390:11390] CHIP:DMG: - [1667198289.741946][11390:11390] CHIP:DMG: Data = 2, - [1667198289.742034][11390:11390] CHIP:DMG: }, - [1667198289.742120][11390:11390] CHIP:DMG: - [1667198289.742180][11390:11390] CHIP:DMG: }, - [1667198289.742256][11390:11390] CHIP:DMG: - [1667198289.742317][11390:11390] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - There is no optional attribute for this cluster - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_3_1_Simulated.yaml deleted file mode 100644 index a004c2c02a0021..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LCFG_3_1_Simulated.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 101.3.1. [TC-LCFG-3.1] Localization Configuration Cluster - Attributes[DUT-Client] - -PICS: - - LCFG.C - -config: - nodeId: 0x12344321 - cluster: "Localization Configuration" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads SupportedLocales attribute from TH" - PICS: LCFG.C.A0001 - wait: "readAttribute" - attribute: "SupportedLocales" - - - label: "DUT reads ActiveLocale attribute from TH" - PICS: LCFG.C.A0000 - wait: "readAttribute" - attribute: "ActiveLocale" diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml deleted file mode 100644 index 5d315c8c3cf9bc..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# 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. - -name: 108.1.1. [TC-LTIME-1.1] Global Attributes [DUT as Client] - -PICS: - - LTIME.C - -config: - nodeId: 0x12344321 - cluster: "Time Format Localization" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT read (0xFFFD) ClusterRevision attribute" - PICS: LTIME.C.Afffd - wait: "readAttribute" - attribute: "ClusterRevision" - - - label: "DUT read (0xFFFC) FeatureMap attribute" - PICS: LTIME.C.Afffc - wait: "readAttribute" - attribute: "FeatureMap" - - - label: "DUT read (0xFFFB) AttributeList attribute" - PICS: LTIME.C.Afffb - wait: "readAttribute" - attribute: "AttributeList" - - #Commenting out the step EventList attribute which is out of scope for matter V1.0 - #- label: "DUT read (0xFFFA) EventList attribute" - # PICS: LTIME.C.Afffa - # wait: "readAttribute" - # attribute: "EventList" - - - label: "DUT read (0xFFF9) AcceptedCommandList attribute" - PICS: LTIME.C.Afff9 - wait: "readAttribute" - attribute: "AcceptedCommandList" - - - label: "DUT read (0xFFF8) GeneratedCommandList attribute" - PICS: LTIME.C.Afff8 - wait: "readAttribute" - attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml deleted file mode 100644 index de3b799ac2bc7d..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml +++ /dev/null @@ -1,938 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 4.2.1. [TC-LTIME-2.1] Read and Write Time Format Localization Cluster - Attributes [DUT as Client] - -PICS: - - LTIME.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Commission TH(all-clusters-app) to DUT(chip-tool) using below command - - TH(all-clusters-app) : ./chip-all-clusters-app --trace_decode 1 - DUT(chip-tool) : ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 - disabled: true - - - label: "Step 1: DUT reads HourFormat attribute from TH" - PICS: LTIME.C.A0000 - verification: | - ./chip-tool timeformatlocalization read hour-format 1 0 - - Verify HourFormat attribute read request is successful on the TH(all-clusters-app) Log and below is the sample log provided for raspi platform: - - [1686897742.935624][12411:12411] CHIP:DMG: ReadRequestMessage = - [1686897742.935627][12411:12411] CHIP:DMG: { - [1686897742.935630][12411:12411] CHIP:DMG: AttributePathIBs = - [1686897742.935633][12411:12411] CHIP:DMG: [ - [1686897742.935636][12411:12411] CHIP:DMG: AttributePathIB = - [1686897742.935640][12411:12411] CHIP:DMG: { - [1686897742.935643][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686897742.935646][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686897742.935650][12411:12411] CHIP:DMG: Attribute = 0x0000_0000, - [1686897742.935652][12411:12411] CHIP:DMG: } - [1686897742.935656][12411:12411] CHIP:DMG: - [1686897742.935658][12411:12411] CHIP:DMG: ], - [1686897742.935662][12411:12411] CHIP:DMG: - [1686897742.935665][12411:12411] CHIP:DMG: isFabricFiltered = true, - [1686897742.935668][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686897742.935670][12411:12411] CHIP:DMG: }, - disabled: true - - - label: - "Step 2: If (LTIME.C.A0000.12HR) DUT writes 0 to HourFormat attribute - on TH" - PICS: LTIME.C.A0000.12HR - verification: | - ./chip-tool timeformatlocalization write hour-format 0 1 0 - - Verify TH receives HourFormat attribute write command and updates value to 0 on the TH(all-clusters-app) Log and below is the sample log provided for raspi platform: - - [1686897823.291113][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686897823.291116][12411:12411] CHIP:DMG: { - [1686897823.291119][12411:12411] CHIP:DMG: suppressResponse = false, - [1686897823.291122][12411:12411] CHIP:DMG: timedRequest = false, - [1686897823.291124][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686897823.291128][12411:12411] CHIP:DMG: [ - [1686897823.291131][12411:12411] CHIP:DMG: AttributeDataIB = - [1686897823.291134][12411:12411] CHIP:DMG: { - [1686897823.291137][12411:12411] CHIP:DMG: AttributePathIB = - [1686897823.291140][12411:12411] CHIP:DMG: { - [1686897823.291144][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686897823.291147][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686897823.291150][12411:12411] CHIP:DMG: Attribute = 0x0000_0000, - [1686897823.291153][12411:12411] CHIP:DMG: } - [1686897823.291156][12411:12411] CHIP:DMG: - [1686897823.291160][12411:12411] CHIP:DMG: Data = 0, - [1686897823.291163][12411:12411] CHIP:DMG: }, - [1686897823.291167][12411:12411] CHIP:DMG: - [1686897823.291169][12411:12411] CHIP:DMG: ], - [1686897823.291173][12411:12411] CHIP:DMG: - [1686897823.291176][12411:12411] CHIP:DMG: moreChunkedMessages = false, - [1686897823.291179][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686897823.291181][12411:12411] CHIP:DMG: }, - disabled: true - - - label: "Step 3: DUT reads HourFormat attribute from TH" - PICS: LTIME.C.A0000 - verification: | - ./chip-tool timeformatlocalization read hour-format 1 0 - - Verify HourFormat attribute value is same as one that was set in the step 2 on the TH(all-clusters-app) Log: - - ReportDataMessage = - [1666853805.326001][20237:20237] CHIP:DMG: { - [1666853805.326004][20237:20237] CHIP:DMG: AttributeReportIBs = - [1666853805.326009][20237:20237] CHIP:DMG: [ - [1666853805.326012][20237:20237] CHIP:DMG: AttributeReportIB = - [1666853805.326016][20237:20237] CHIP:DMG: { - [1666853805.326020][20237:20237] CHIP:DMG: AttributeDataIB = - [1666853805.326023][20237:20237] CHIP:DMG: { - [1666853805.326026][20237:20237] CHIP:DMG: DataVersion = 0xbeb406dc, - [1666853805.326030][20237:20237] CHIP:DMG: AttributePathIB = - [1666853805.326034][20237:20237] CHIP:DMG: { - [1666853805.326040][20237:20237] CHIP:DMG: Endpoint = 0x0, - [1666853805.326044][20237:20237] CHIP:DMG: Cluster = 0x2c, - [1666853805.326049][20237:20237] CHIP:DMG: Attribute = 0x0000_0000, - [1666853805.326054][20237:20237] CHIP:DMG: } - [1666853805.326059][20237:20237] CHIP:DMG: - [1666853805.326062][20237:20237] CHIP:DMG: Data = 0, - [1666853805.326066][20237:20237] CHIP:DMG: }, - [1666853805.326070][20237:20237] CHIP:DMG: - [1666853805.326073][20237:20237] CHIP:DMG: }, - [1666853805.326076][20237:20237] CHIP:DMG: - [1666853805.326079][20237:20237] CHIP:DMG: ], - [1666853805.326085][20237:20237] CHIP:DMG: - [1666853805.326088][20237:20237] CHIP:DMG: SuppressResponse = true, - [1666853805.326090][20237:20237] CHIP:DMG: InteractionModelRevision = 1 - [1666853805.326093][20237:20237] CHIP:DMG: } - disabled: true - - - label: - "Step 4: If (LTIME.C.A0000.24HR) DUT writes 1 to HourFormat attribute - on TH" - PICS: LTIME.C.A0000.24HR - verification: | - ./chip-tool timeformatlocalization write hour-format 1 1 0 - - Verify TH receives HourFormat attribute write command and updates value to 1 on the TH(all-clusters-app) Log and below is the sample log provided for raspi platform: - - [1686897976.668257][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686897976.668269][12411:12411] CHIP:DMG: { - [1686897976.668279][12411:12411] CHIP:DMG: suppressResponse = false, - [1686897976.668291][12411:12411] CHIP:DMG: timedRequest = false, - [1686897976.668305][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686897976.668327][12411:12411] CHIP:DMG: [ - [1686897976.668341][12411:12411] CHIP:DMG: AttributeDataIB = - [1686897976.668360][12411:12411] CHIP:DMG: { - [1686897976.668369][12411:12411] CHIP:DMG: AttributePathIB = - [1686897976.668403][12411:12411] CHIP:DMG: { - [1686897976.668407][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686897976.668410][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686897976.668415][12411:12411] CHIP:DMG: Attribute = 0x0000_0000, - [1686897976.668419][12411:12411] CHIP:DMG: } - [1686897976.668424][12411:12411] CHIP:DMG: - [1686897976.668429][12411:12411] CHIP:DMG: Data = 1, - [1686897976.668432][12411:12411] CHIP:DMG: }, - [1686897976.668438][12411:12411] CHIP:DMG: - [1686897976.668442][12411:12411] CHIP:DMG: ], - [1686897976.668446][12411:12411] CHIP:DMG: - [1686897976.668449][12411:12411] CHIP:DMG: moreChunkedMessages = false, - [1686897976.668452][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686897976.668454][12411:12411] CHIP:DMG: }, - disabled: true - - - label: "Step 5: DUT reads HourFormat attribute on TH" - PICS: LTIME.C.A0000 - verification: | - ./chip-tool timeformatlocalization read hour-format 1 0 - - Verify HourFormat attribute value is same as one that was set in the step 5 on the TH(all-clusters-app) Log and below is the sample log provided for raspi platform: - - ReportDataMessage = - [1666853879.264685][20237:20237] CHIP:DMG: { - [1666853879.264688][20237:20237] CHIP:DMG: AttributeReportIBs = - [1666853879.264695][20237:20237] CHIP:DMG: [ - [1666853879.264698][20237:20237] CHIP:DMG: AttributeReportIB = - [1666853879.264706][20237:20237] CHIP:DMG: { - [1666853879.264709][20237:20237] CHIP:DMG: AttributeDataIB = - [1666853879.264713][20237:20237] CHIP:DMG: { - [1666853879.264717][20237:20237] CHIP:DMG: DataVersion = 0xbeb406dd, - [1666853879.264720][20237:20237] CHIP:DMG: AttributePathIB = - [1666853879.264724][20237:20237] CHIP:DMG: { - [1666853879.264727][20237:20237] CHIP:DMG: Endpoint = 0x0, - [1666853879.264730][20237:20237] CHIP:DMG: Cluster = 0x2c, - [1666853879.264734][20237:20237] CHIP:DMG: Attribute = 0x0000_0000, - [1666853879.264740][20237:20237] CHIP:DMG: } - [1666853879.264745][20237:20237] CHIP:DMG: - [1666853879.264749][20237:20237] CHIP:DMG: Data = 1, - [1666853879.264753][20237:20237] CHIP:DMG: }, - [1666853879.264759][20237:20237] CHIP:DMG: - [1666853879.264763][20237:20237] CHIP:DMG: }, - [1666853879.264769][20237:20237] CHIP:DMG: - [1666853879.264772][20237:20237] CHIP:DMG: ], - [1666853879.264779][20237:20237] CHIP:DMG: - [1666853879.264782][20237:20237] CHIP:DMG: SuppressResponse = true, - [1666853879.264785][20237:20237] CHIP:DMG: InteractionModelRevision = 1 - [1666853879.264788][20237:20237] CHIP:DMG: } - disabled: true - - - label: "Step 6: DUT reads ActiveCalendarType attribute on TH" - PICS: LTIME.C.A0001 - verification: | - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify active-calendar-type attribute read request is successful on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898051.422884][12411:12411] CHIP:DMG: ReadRequestMessage = - [1686898051.422888][12411:12411] CHIP:DMG: { - [1686898051.422890][12411:12411] CHIP:DMG: AttributePathIBs = - [1686898051.422893][12411:12411] CHIP:DMG: [ - [1686898051.422896][12411:12411] CHIP:DMG: AttributePathIB = - [1686898051.422900][12411:12411] CHIP:DMG: { - [1686898051.422903][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898051.422906][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898051.422909][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898051.422911][12411:12411] CHIP:DMG: } - [1686898051.422915][12411:12411] CHIP:DMG: - [1686898051.422917][12411:12411] CHIP:DMG: ], - [1686898051.422921][12411:12411] CHIP:DMG: - [1686898051.422924][12411:12411] CHIP:DMG: isFabricFiltered = true, - [1686898051.422926][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686898051.422929][12411:12411] CHIP:DMG: }, - disabled: true - - - label: "Step 7: DUT reads SupportedCalendarTypes attribute TH" - PICS: LTIME.C.A0002 - verification: | - ./chip-tool timeformatlocalization read supported-calendar-types 1 0 - - Verify SupportedCalendarTypes attribute read request is successful on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898103.035536][12411:12411] CHIP:DMG: ReadRequestMessage = - [1686898103.035540][12411:12411] CHIP:DMG: { - [1686898103.035542][12411:12411] CHIP:DMG: AttributePathIBs = - [1686898103.035546][12411:12411] CHIP:DMG: [ - [1686898103.035548][12411:12411] CHIP:DMG: AttributePathIB = - [1686898103.035551][12411:12411] CHIP:DMG: { - [1686898103.035554][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898103.035557][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898103.035560][12411:12411] CHIP:DMG: Attribute = 0x0000_0002, - [1686898103.035563][12411:12411] CHIP:DMG: } - [1686898103.035566][12411:12411] CHIP:DMG: - [1686898103.035568][12411:12411] CHIP:DMG: ], - [1686898103.035572][12411:12411] CHIP:DMG: - [1686898103.035575][12411:12411] CHIP:DMG: isFabricFiltered = true, - [1686898103.035579][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686898103.035581][12411:12411] CHIP:DMG: }, - disabled: true - - - label: - "Step 8: DUT writes value in PIXIT.LTIME.SCT to ActiveCalendarType - attribute on TH, followed by reading the ActiveCalendarType attribute - from TH" - PICS: LTIME.C.A0001 - verification: | - ./chip-tool timeformatlocalization write active-calendar-type 0 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 0 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898167.800454][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898167.800468][12411:12411] CHIP:DMG: { - [1686898167.800483][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898167.800501][12411:12411] CHIP:DMG: timedRequest = false, - [1686898167.800511][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898167.800529][12411:12411] CHIP:DMG: [ - [1686898167.800540][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898167.800552][12411:12411] CHIP:DMG: { - [1686898167.800563][12411:12411] CHIP:DMG: AttributePathIB = - [1686898167.800575][12411:12411] CHIP:DMG: { - [1686898167.800589][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898167.800604][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898167.800620][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898167.800630][12411:12411] CHIP:DMG: } - [1686898167.800649][12411:12411] CHIP:DMG: - [1686898167.800662][12411:12411] CHIP:DMG: Data = 0, - [1686898167.800672][12411:12411] CHIP:DMG: }, - [1686898167.800687][12411:12411] CHIP:DMG: - [1686898167.800696][12411:12411] CHIP:DMG: ], - [1686898167.800710][12411:12411] CHIP:DMG: - [1686898167.800721][12411:12411] CHIP:DMG: moreChunkedMessages = false, - [1686898167.800734][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686898167.800742][12411:12411] CHIP:DMG: }, - disabled: true - - - label: "Step 9: Repeat step 8 for all the values in PIXIT.LTIME.SCT" - PICS: LTIME.C.A0001 - verification: | - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is same as the value that was set before on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - ReportDataMessage = - [1666854060.848201][20237:20237] CHIP:DMG: { - [1666854060.848204][20237:20237] CHIP:DMG: AttributeReportIBs = - [1666854060.848211][20237:20237] CHIP:DMG: [ - [1666854060.848215][20237:20237] CHIP:DMG: AttributeReportIB = - [1666854060.848222][20237:20237] CHIP:DMG: { - [1666854060.848225][20237:20237] CHIP:DMG: AttributeDataIB = - [1666854060.848229][20237:20237] CHIP:DMG: { - [1666854060.848234][20237:20237] CHIP:DMG: DataVersion = 0xbeb406de, - [1666854060.848238][20237:20237] CHIP:DMG: AttributePathIB = - [1666854060.848244][20237:20237] CHIP:DMG: { - [1666854060.848248][20237:20237] CHIP:DMG: Endpoint = 0x0, - [1666854060.848253][20237:20237] CHIP:DMG: Cluster = 0x2c, - [1666854060.848257][20237:20237] CHIP:DMG: Attribute = 0x0000_0001, - [1666854060.848260][20237:20237] CHIP:DMG: } - [1666854060.848266][20237:20237] CHIP:DMG: - [1666854060.848269][20237:20237] CHIP:DMG: Data = 0, - [1666854060.848272][20237:20237] CHIP:DMG: }, - [1666854060.848276][20237:20237] CHIP:DMG: - [1666854060.848279][20237:20237] CHIP:DMG: }, - [1666854060.848284][20237:20237] CHIP:DMG: - [1666854060.848287][20237:20237] CHIP:DMG: ], - [1666854060.848294][20237:20237] CHIP:DMG: - [1666854060.848298][20237:20237] CHIP:DMG: SuppressResponse = true, - [1666854060.848301][20237:20237] CHIP:DMG: InteractionModelRevision = 1 - [1666854060.848304][20237:20237] CHIP:DMG: } - disabled: true - - - label: "Step 10: Repeat step 8 for all the values in PIXIT.LTIME.SCT" - PICS: LTIME.C.A0001 - verification: | - ./chip-tool timeformatlocalization write active-calendar-type 1 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 1 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898332.358543][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898332.358546][12411:12411] CHIP:DMG: { - [1686898332.358550][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898332.358555][12411:12411] CHIP:DMG: timedRequest = false, - [1686898332.358559][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898332.358567][12411:12411] CHIP:DMG: [ - [1686898332.358570][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898332.358577][12411:12411] CHIP:DMG: { - [1686898332.358579][12411:12411] CHIP:DMG: AttributePathIB = - [1686898332.358586][12411:12411] CHIP:DMG: { - [1686898332.358590][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898332.358595][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898332.358598][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898332.358600][12411:12411] CHIP:DMG: } - [1686898332.358604][12411:12411] CHIP:DMG: - [1686898332.358607][12411:12411] CHIP:DMG: Data = 1, - [1686898332.358609][12411:12411] CHIP:DMG: }, - [1686898332.358613][12411:12411] CHIP:DMG: - [1686898332.358615][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 1 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898454.639136][12687:12689] CHIP:DMG: ReportDataMessage = - [1686898454.639140][12687:12689] CHIP:DMG: { - [1686898454.639142][12687:12689] CHIP:DMG: AttributeReportIBs = - [1686898454.639148][12687:12689] CHIP:DMG: [ - [1686898454.639150][12687:12689] CHIP:DMG: AttributeReportIB = - [1686898454.639155][12687:12689] CHIP:DMG: { - [1686898454.639158][12687:12689] CHIP:DMG: AttributeDataIB = - [1686898454.639163][12687:12689] CHIP:DMG: { - [1686898454.639166][12687:12689] CHIP:DMG: DataVersion = 0x68385037, - [1686898454.639170][12687:12689] CHIP:DMG: AttributePathIB = - [1686898454.639174][12687:12689] CHIP:DMG: { - [1686898454.639177][12687:12689] CHIP:DMG: Endpoint = 0x0, - [1686898454.639180][12687:12689] CHIP:DMG: Cluster = 0x2c, - [1686898454.639183][12687:12689] CHIP:DMG: Attribute = 0x0000_0001, - [1686898454.639186][12687:12689] CHIP:DMG: } - [1686898454.639192][12687:12689] CHIP:DMG: - [1686898454.639196][12687:12689] CHIP:DMG: Data = 1, - [1686898454.639199][12687:12689] CHIP:DMG: }, - [1686898454.639203][12687:12689] CHIP:DMG: - [1686898454.639205][12687:12689] CHIP:DMG: }, - [1686898454.639210][12687:12689] CHIP:DMG: - [1686898454.639213][12687:12689] CHIP:DMG: ], - [1686898454.639217][12687:12689] CHIP:DMG: - [1686898454.639220][12687:12689] CHIP:DMG: SuppressResponse = true, - [1686898454.639223][12687:12689] CHIP:DMG: InteractionModelRevision = 1 - [1686898454.639225][12687:12689] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 2 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 2 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898499.368660][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898499.368664][12411:12411] CHIP:DMG: { - [1686898499.368667][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898499.368671][12411:12411] CHIP:DMG: timedRequest = false, - [1686898499.368675][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898499.368682][12411:12411] CHIP:DMG: [ - [1686898499.368684][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898499.368688][12411:12411] CHIP:DMG: { - [1686898499.368690][12411:12411] CHIP:DMG: AttributePathIB = - [1686898499.368694][12411:12411] CHIP:DMG: { - [1686898499.368697][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898499.368701][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898499.368704][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898499.368706][12411:12411] CHIP:DMG: } - [1686898499.368711][12411:12411] CHIP:DMG: - [1686898499.368716][12411:12411] CHIP:DMG: Data = 2, - [1686898499.368718][12411:12411] CHIP:DMG: }, - [1686898499.368722][12411:12411] CHIP:DMG: - [1686898499.368725][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 2 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898544.231876][12718:12720] CHIP:DMG: ReportDataMessage = - [1686898544.231879][12718:12720] CHIP:DMG: { - [1686898544.231881][12718:12720] CHIP:DMG: AttributeReportIBs = - [1686898544.231887][12718:12720] CHIP:DMG: [ - [1686898544.231889][12718:12720] CHIP:DMG: AttributeReportIB = - [1686898544.231895][12718:12720] CHIP:DMG: { - [1686898544.231898][12718:12720] CHIP:DMG: AttributeDataIB = - [1686898544.231901][12718:12720] CHIP:DMG: { - [1686898544.231905][12718:12720] CHIP:DMG: DataVersion = 0x68385038, - [1686898544.231908][12718:12720] CHIP:DMG: AttributePathIB = - [1686898544.231911][12718:12720] CHIP:DMG: { - [1686898544.231915][12718:12720] CHIP:DMG: Endpoint = 0x0, - [1686898544.231919][12718:12720] CHIP:DMG: Cluster = 0x2c, - [1686898544.231922][12718:12720] CHIP:DMG: Attribute = 0x0000_0001, - [1686898544.231925][12718:12720] CHIP:DMG: } - [1686898544.231928][12718:12720] CHIP:DMG: - [1686898544.231932][12718:12720] CHIP:DMG: Data = 2, - [1686898544.231935][12718:12720] CHIP:DMG: }, - [1686898544.231939][12718:12720] CHIP:DMG: - [1686898544.231942][12718:12720] CHIP:DMG: }, - [1686898544.231946][12718:12720] CHIP:DMG: - [1686898544.231949][12718:12720] CHIP:DMG: ], - [1686898544.231953][12718:12720] CHIP:DMG: - [1686898544.231956][12718:12720] CHIP:DMG: SuppressResponse = true, - [1686898544.231959][12718:12720] CHIP:DMG: InteractionModelRevision = 1 - [1686898544.231961][12718:12720] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 3 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 3 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898582.764639][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898582.764656][12411:12411] CHIP:DMG: { - [1686898582.764670][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898582.764687][12411:12411] CHIP:DMG: timedRequest = false, - [1686898582.764698][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898582.764716][12411:12411] CHIP:DMG: [ - [1686898582.764726][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898582.764738][12411:12411] CHIP:DMG: { - [1686898582.764748][12411:12411] CHIP:DMG: AttributePathIB = - [1686898582.764760][12411:12411] CHIP:DMG: { - [1686898582.764773][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898582.764785][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898582.764798][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898582.764809][12411:12411] CHIP:DMG: } - [1686898582.764823][12411:12411] CHIP:DMG: - [1686898582.764836][12411:12411] CHIP:DMG: Data = 3, - [1686898582.764846][12411:12411] CHIP:DMG: }, - [1686898582.764859][12411:12411] CHIP:DMG: - [1686898582.764868][12411:12411] CHIP:DMG: - - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 3 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898658.627985][12740:12742] CHIP:DMG: ReportDataMessage = - [1686898658.628004][12740:12742] CHIP:DMG: { - [1686898658.628017][12740:12742] CHIP:DMG: AttributeReportIBs = - [1686898658.628042][12740:12742] CHIP:DMG: [ - [1686898658.628051][12740:12742] CHIP:DMG: AttributeReportIB = - [1686898658.628072][12740:12742] CHIP:DMG: { - [1686898658.628082][12740:12742] CHIP:DMG: AttributeDataIB = - [1686898658.628094][12740:12742] CHIP:DMG: { - [1686898658.628107][12740:12742] CHIP:DMG: DataVersion = 0x68385039, - [1686898658.628121][12740:12742] CHIP:DMG: AttributePathIB = - [1686898658.628134][12740:12742] CHIP:DMG: { - [1686898658.628148][12740:12742] CHIP:DMG: Endpoint = 0x0, - [1686898658.628161][12740:12742] CHIP:DMG: Cluster = 0x2c, - [1686898658.628173][12740:12742] CHIP:DMG: Attribute = 0x0000_0001, - [1686898658.628183][12740:12742] CHIP:DMG: } - [1686898658.628198][12740:12742] CHIP:DMG: - [1686898658.628211][12740:12742] CHIP:DMG: Data = 3, - [1686898658.628226][12740:12742] CHIP:DMG: }, - [1686898658.628243][12740:12742] CHIP:DMG: - [1686898658.628252][12740:12742] CHIP:DMG: }, - [1686898658.628266][12740:12742] CHIP:DMG: - [1686898658.628275][12740:12742] CHIP:DMG: ], - [1686898658.628293][12740:12742] CHIP:DMG: - [1686898658.628304][12740:12742] CHIP:DMG: SuppressResponse = true, - [1686898658.628312][12740:12742] CHIP:DMG: InteractionModelRevision = 1 - [1686898658.628319][12740:12742] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 4 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 4 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898760.973271][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898760.973274][12411:12411] CHIP:DMG: { - [1686898760.973277][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898760.973282][12411:12411] CHIP:DMG: timedRequest = false, - [1686898760.973285][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898760.973291][12411:12411] CHIP:DMG: [ - [1686898760.973294][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898760.973299][12411:12411] CHIP:DMG: { - [1686898760.973301][12411:12411] CHIP:DMG: AttributePathIB = - [1686898760.973308][12411:12411] CHIP:DMG: { - [1686898760.973311][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898760.973315][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898760.973317][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898760.973320][12411:12411] CHIP:DMG: } - [1686898760.973326][12411:12411] CHIP:DMG: - [1686898760.973331][12411:12411] CHIP:DMG: Data = 4, - [1686898760.973335][12411:12411] CHIP:DMG: }, - [1686898760.973340][12411:12411] CHIP:DMG: - [1686898760.973342][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 4 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898820.179173][12799:12801] CHIP:DMG: ReportDataMessage = - [1686898820.179178][12799:12801] CHIP:DMG: { - [1686898820.179180][12799:12801] CHIP:DMG: AttributeReportIBs = - [1686898820.179185][12799:12801] CHIP:DMG: [ - [1686898820.179188][12799:12801] CHIP:DMG: AttributeReportIB = - [1686898820.179193][12799:12801] CHIP:DMG: { - [1686898820.179196][12799:12801] CHIP:DMG: AttributeDataIB = - [1686898820.179200][12799:12801] CHIP:DMG: { - [1686898820.179203][12799:12801] CHIP:DMG: DataVersion = 0x6838503a, - [1686898820.179206][12799:12801] CHIP:DMG: AttributePathIB = - [1686898820.179209][12799:12801] CHIP:DMG: { - [1686898820.179213][12799:12801] CHIP:DMG: Endpoint = 0x0, - [1686898820.179217][12799:12801] CHIP:DMG: Cluster = 0x2c, - [1686898820.179220][12799:12801] CHIP:DMG: Attribute = 0x0000_0001, - [1686898820.179223][12799:12801] CHIP:DMG: } - [1686898820.179226][12799:12801] CHIP:DMG: - [1686898820.179231][12799:12801] CHIP:DMG: Data = 4, - [1686898820.179235][12799:12801] CHIP:DMG: }, - [1686898820.179239][12799:12801] CHIP:DMG: - [1686898820.179241][12799:12801] CHIP:DMG: }, - [1686898820.179246][12799:12801] CHIP:DMG: - [1686898820.179248][12799:12801] CHIP:DMG: ], - [1686898820.179253][12799:12801] CHIP:DMG: - [1686898820.179255][12799:12801] CHIP:DMG: SuppressResponse = true, - [1686898820.179258][12799:12801] CHIP:DMG: InteractionModelRevision = 1 - [1686898820.179260][12799:12801] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 5 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 5 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898866.001997][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898866.002000][12411:12411] CHIP:DMG: { - [1686898866.002002][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898866.002004][12411:12411] CHIP:DMG: timedRequest = false, - [1686898866.002007][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898866.002012][12411:12411] CHIP:DMG: [ - [1686898866.002014][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898866.002018][12411:12411] CHIP:DMG: { - [1686898866.002021][12411:12411] CHIP:DMG: AttributePathIB = - [1686898866.002025][12411:12411] CHIP:DMG: { - [1686898866.002029][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898866.002032][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898866.002036][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898866.002039][12411:12411] CHIP:DMG: } - [1686898866.002042][12411:12411] CHIP:DMG: - [1686898866.002046][12411:12411] CHIP:DMG: Data = 5, - [1686898866.002048][12411:12411] CHIP:DMG: }, - [1686898866.002052][12411:12411] CHIP:DMG: - [1686898866.002055][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 5 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898936.936445][12826:12828] CHIP:DMG: ReportDataMessage = - [1686898936.936449][12826:12828] CHIP:DMG: { - [1686898936.936452][12826:12828] CHIP:DMG: AttributeReportIBs = - [1686898936.936458][12826:12828] CHIP:DMG: [ - [1686898936.936461][12826:12828] CHIP:DMG: AttributeReportIB = - [1686898936.936466][12826:12828] CHIP:DMG: { - [1686898936.936468][12826:12828] CHIP:DMG: AttributeDataIB = - [1686898936.936473][12826:12828] CHIP:DMG: { - [1686898936.936478][12826:12828] CHIP:DMG: DataVersion = 0x6838503b, - [1686898936.936482][12826:12828] CHIP:DMG: AttributePathIB = - [1686898936.936487][12826:12828] CHIP:DMG: { - [1686898936.936492][12826:12828] CHIP:DMG: Endpoint = 0x0, - [1686898936.936496][12826:12828] CHIP:DMG: Cluster = 0x2c, - [1686898936.936501][12826:12828] CHIP:DMG: Attribute = 0x0000_0001, - [1686898936.936505][12826:12828] CHIP:DMG: } - [1686898936.936510][12826:12828] CHIP:DMG: - [1686898936.936515][12826:12828] CHIP:DMG: Data = 5, - [1686898936.936518][12826:12828] CHIP:DMG: }, - [1686898936.936524][12826:12828] CHIP:DMG: - [1686898936.936528][12826:12828] CHIP:DMG: }, - [1686898936.936533][12826:12828] CHIP:DMG: - [1686898936.936536][12826:12828] CHIP:DMG: ], - [1686898936.936542][12826:12828] CHIP:DMG: - [1686898936.936546][12826:12828] CHIP:DMG: SuppressResponse = true, - [1686898936.936549][12826:12828] CHIP:DMG: InteractionModelRevision = 1 - [1686898936.936552][12826:12828] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 6 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 6 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898992.461667][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898992.461679][12411:12411] CHIP:DMG: { - [1686898992.461690][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898992.461702][12411:12411] CHIP:DMG: timedRequest = false, - [1686898992.461716][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898992.461733][12411:12411] CHIP:DMG: [ - [1686898992.461742][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898992.461755][12411:12411] CHIP:DMG: { - [1686898992.461765][12411:12411] CHIP:DMG: AttributePathIB = - [1686898992.461778][12411:12411] CHIP:DMG: { - [1686898992.461794][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898992.461806][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898992.461825][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898992.461835][12411:12411] CHIP:DMG: } - [1686898992.461849][12411:12411] CHIP:DMG: - [1686898992.461862][12411:12411] CHIP:DMG: Data = 6, - [1686898992.461872][12411:12411] CHIP:DMG: }, - [1686898992.461887][12411:12411] CHIP:DMG: - [1686898992.461896][12411:12411] CHIP:DMG: ], - - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 6 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899048.031912][12884:12886] CHIP:DMG: ReportDataMessage = - [1686899048.031916][12884:12886] CHIP:DMG: { - [1686899048.031918][12884:12886] CHIP:DMG: AttributeReportIBs = - [1686899048.031924][12884:12886] CHIP:DMG: [ - [1686899048.031927][12884:12886] CHIP:DMG: AttributeReportIB = - [1686899048.031932][12884:12886] CHIP:DMG: { - [1686899048.031934][12884:12886] CHIP:DMG: AttributeDataIB = - [1686899048.031940][12884:12886] CHIP:DMG: { - [1686899048.031943][12884:12886] CHIP:DMG: DataVersion = 0x6838503c, - [1686899048.031946][12884:12886] CHIP:DMG: AttributePathIB = - [1686899048.031950][12884:12886] CHIP:DMG: { - [1686899048.031953][12884:12886] CHIP:DMG: Endpoint = 0x0, - [1686899048.031957][12884:12886] CHIP:DMG: Cluster = 0x2c, - [1686899048.031961][12884:12886] CHIP:DMG: Attribute = 0x0000_0001, - [1686899048.031964][12884:12886] CHIP:DMG: } - [1686899048.031969][12884:12886] CHIP:DMG: - [1686899048.031975][12884:12886] CHIP:DMG: Data = 6, - [1686899048.031979][12884:12886] CHIP:DMG: }, - [1686899048.031983][12884:12886] CHIP:DMG: - [1686899048.031985][12884:12886] CHIP:DMG: }, - [1686899048.031989][12884:12886] CHIP:DMG: - [1686899048.031992][12884:12886] CHIP:DMG: ], - [1686899048.031996][12884:12886] CHIP:DMG: - [1686899048.031999][12884:12886] CHIP:DMG: SuppressResponse = true, - [1686899048.032002][12884:12886] CHIP:DMG: InteractionModelRevision = 1 - [1686899048.032004][12884:12886] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 7 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 7 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899076.211353][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686899076.211357][12411:12411] CHIP:DMG: { - [1686899076.211360][12411:12411] CHIP:DMG: suppressResponse = false, - [1686899076.211364][12411:12411] CHIP:DMG: timedRequest = false, - [1686899076.211368][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686899076.211374][12411:12411] CHIP:DMG: [ - [1686899076.211377][12411:12411] CHIP:DMG: AttributeDataIB = - [1686899076.211382][12411:12411] CHIP:DMG: { - [1686899076.211386][12411:12411] CHIP:DMG: AttributePathIB = - [1686899076.211391][12411:12411] CHIP:DMG: { - [1686899076.211396][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686899076.211400][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686899076.211405][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686899076.211409][12411:12411] CHIP:DMG: } - [1686899076.211417][12411:12411] CHIP:DMG: - [1686899076.211425][12411:12411] CHIP:DMG: Data = 7, - [1686899076.211430][12411:12411] CHIP:DMG: }, - [1686899076.211435][12411:12411] CHIP:DMG: - [1686899076.211438][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 7 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899229.897526][12933:12935] CHIP:DMG: ReportDataMessage = - [1686899229.897531][12933:12935] CHIP:DMG: { - [1686899229.897534][12933:12935] CHIP:DMG: AttributeReportIBs = - [1686899229.897542][12933:12935] CHIP:DMG: [ - [1686899229.897545][12933:12935] CHIP:DMG: AttributeReportIB = - [1686899229.897552][12933:12935] CHIP:DMG: { - [1686899229.897557][12933:12935] CHIP:DMG: AttributeDataIB = - [1686899229.897563][12933:12935] CHIP:DMG: { - [1686899229.897569][12933:12935] CHIP:DMG: DataVersion = 0x6838503e, - [1686899229.897574][12933:12935] CHIP:DMG: AttributePathIB = - [1686899229.897580][12933:12935] CHIP:DMG: { - [1686899229.897585][12933:12935] CHIP:DMG: Endpoint = 0x0, - [1686899229.897590][12933:12935] CHIP:DMG: Cluster = 0x2c, - [1686899229.897596][12933:12935] CHIP:DMG: Attribute = 0x0000_0001, - [1686899229.897600][12933:12935] CHIP:DMG: } - [1686899229.897606][12933:12935] CHIP:DMG: - [1686899229.897611][12933:12935] CHIP:DMG: Data = 7, - [1686899229.897615][12933:12935] CHIP:DMG: }, - [1686899229.897621][12933:12935] CHIP:DMG: - [1686899229.897624][12933:12935] CHIP:DMG: }, - [1686899229.897630][12933:12935] CHIP:DMG: - [1686899229.897634][12933:12935] CHIP:DMG: ], - [1686899229.897640][12933:12935] CHIP:DMG: - [1686899229.897644][12933:12935] CHIP:DMG: SuppressResponse = true, - [1686899229.897648][12933:12935] CHIP:DMG: InteractionModelRevision = 1 - [1686899229.897651][12933:12935] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 8 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 8 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899312.894890][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686899312.894893][12411:12411] CHIP:DMG: { - [1686899312.894896][12411:12411] CHIP:DMG: suppressResponse = false, - [1686899312.894898][12411:12411] CHIP:DMG: timedRequest = false, - [1686899312.894901][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686899312.894905][12411:12411] CHIP:DMG: [ - [1686899312.894908][12411:12411] CHIP:DMG: AttributeDataIB = - [1686899312.894911][12411:12411] CHIP:DMG: { - [1686899312.894914][12411:12411] CHIP:DMG: AttributePathIB = - [1686899312.894918][12411:12411] CHIP:DMG: { - [1686899312.894921][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686899312.894924][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686899312.894927][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686899312.894930][12411:12411] CHIP:DMG: } - [1686899312.894933][12411:12411] CHIP:DMG: - [1686899312.894938][12411:12411] CHIP:DMG: Data = 8, - [1686899312.894940][12411:12411] CHIP:DMG: }, - [1686899312.894944][12411:12411] CHIP:DMG: - [1686899312.894946][12411:12411] CHIP:DMG: ], - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 8 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899353.959365][12994:12996] CHIP:DMG: ReportDataMessage = - [1686899353.959370][12994:12996] CHIP:DMG: { - [1686899353.959374][12994:12996] CHIP:DMG: AttributeReportIBs = - [1686899353.959381][12994:12996] CHIP:DMG: [ - [1686899353.959384][12994:12996] CHIP:DMG: AttributeReportIB = - [1686899353.959391][12994:12996] CHIP:DMG: { - [1686899353.959395][12994:12996] CHIP:DMG: AttributeDataIB = - [1686899353.959400][12994:12996] CHIP:DMG: { - [1686899353.959404][12994:12996] CHIP:DMG: DataVersion = 0x6838503f, - [1686899353.959409][12994:12996] CHIP:DMG: AttributePathIB = - [1686899353.959413][12994:12996] CHIP:DMG: { - [1686899353.959418][12994:12996] CHIP:DMG: Endpoint = 0x0, - [1686899353.959423][12994:12996] CHIP:DMG: Cluster = 0x2c, - [1686899353.959428][12994:12996] CHIP:DMG: Attribute = 0x0000_0001, - [1686899353.959433][12994:12996] CHIP:DMG: } - [1686899353.959438][12994:12996] CHIP:DMG: - [1686899353.959443][12994:12996] CHIP:DMG: Data = 8, - [1686899353.959447][12994:12996] CHIP:DMG: }, - [1686899353.959455][12994:12996] CHIP:DMG: - [1686899353.959459][12994:12996] CHIP:DMG: }, - [1686899353.959465][12994:12996] CHIP:DMG: - [1686899353.959469][12994:12996] CHIP:DMG: ], - [1686899353.959476][12994:12996] CHIP:DMG: - [1686899353.959480][12994:12996] CHIP:DMG: SuppressResponse = true, - [1686899353.959484][12994:12996] CHIP:DMG: InteractionModelRevision = 1 - [1686899353.959488][12994:12996] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 9 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 9 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899403.683238][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686899403.683243][12411:12411] CHIP:DMG: { - [1686899403.683246][12411:12411] CHIP:DMG: suppressResponse = false, - [1686899403.683250][12411:12411] CHIP:DMG: timedRequest = false, - [1686899403.683254][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686899403.683258][12411:12411] CHIP:DMG: [ - [1686899403.683261][12411:12411] CHIP:DMG: AttributeDataIB = - [1686899403.683265][12411:12411] CHIP:DMG: { - [1686899403.683267][12411:12411] CHIP:DMG: AttributePathIB = - [1686899403.683271][12411:12411] CHIP:DMG: { - [1686899403.683274][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686899403.683277][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686899403.683281][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686899403.683283][12411:12411] CHIP:DMG: } - [1686899403.683287][12411:12411] CHIP:DMG: - [1686899403.683290][12411:12411] CHIP:DMG: Data = 9, - [1686899403.683293][12411:12411] CHIP:DMG: }, - [1686899403.683298][12411:12411] CHIP:DMG: - [1686899403.683300][12411:12411] CHIP:DMG: ], - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 9 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899465.353959][13019:13021] CHIP:DMG: ReportDataMessage = - [1686899465.353962][13019:13021] CHIP:DMG: { - [1686899465.353964][13019:13021] CHIP:DMG: AttributeReportIBs = - [1686899465.353970][13019:13021] CHIP:DMG: [ - [1686899465.353972][13019:13021] CHIP:DMG: AttributeReportIB = - [1686899465.353978][13019:13021] CHIP:DMG: { - [1686899465.353982][13019:13021] CHIP:DMG: AttributeDataIB = - [1686899465.353987][13019:13021] CHIP:DMG: { - [1686899465.353992][13019:13021] CHIP:DMG: DataVersion = 0x68385040, - [1686899465.353997][13019:13021] CHIP:DMG: AttributePathIB = - [1686899465.354001][13019:13021] CHIP:DMG: { - [1686899465.354006][13019:13021] CHIP:DMG: Endpoint = 0x0, - [1686899465.354011][13019:13021] CHIP:DMG: Cluster = 0x2c, - [1686899465.354014][13019:13021] CHIP:DMG: Attribute = 0x0000_0001, - [1686899465.354019][13019:13021] CHIP:DMG: } - [1686899465.354024][13019:13021] CHIP:DMG: - [1686899465.354030][13019:13021] CHIP:DMG: Data = 9, - [1686899465.354034][13019:13021] CHIP:DMG: }, - [1686899465.354039][13019:13021] CHIP:DMG: - [1686899465.354043][13019:13021] CHIP:DMG: }, - [1686899465.354049][13019:13021] CHIP:DMG: - [1686899465.354053][13019:13021] CHIP:DMG: ], - [1686899465.354059][13019:13021] CHIP:DMG: - [1686899465.354063][13019:13021] CHIP:DMG: SuppressResponse = true, - [1686899465.354066][13019:13021] CHIP:DMG: InteractionModelRevision = 1 - [1686899465.354069][13019:13021] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 10 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 10 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899526.841349][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686899526.841354][12411:12411] CHIP:DMG: { - [1686899526.841357][12411:12411] CHIP:DMG: suppressResponse = false, - [1686899526.841361][12411:12411] CHIP:DMG: timedRequest = false, - [1686899526.841364][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686899526.841370][12411:12411] CHIP:DMG: [ - [1686899526.841374][12411:12411] CHIP:DMG: AttributeDataIB = - [1686899526.841379][12411:12411] CHIP:DMG: { - [1686899526.841382][12411:12411] CHIP:DMG: AttributePathIB = - [1686899526.841387][12411:12411] CHIP:DMG: { - [1686899526.841392][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686899526.841396][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686899526.841401][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686899526.841405][12411:12411] CHIP:DMG: } - [1686899526.841410][12411:12411] CHIP:DMG: - [1686899526.841415][12411:12411] CHIP:DMG: Data = 10, - [1686899526.841419][12411:12411] CHIP:DMG: }, - [1686899526.841425][12411:12411] CHIP:DMG: - [1686899526.841429][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 10 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899615.016743][13059:13061] CHIP:DMG: ReportDataMessage = - [1686899615.016748][13059:13061] CHIP:DMG: { - [1686899615.016751][13059:13061] CHIP:DMG: AttributeReportIBs = - [1686899615.016759][13059:13061] CHIP:DMG: [ - [1686899615.016762][13059:13061] CHIP:DMG: AttributeReportIB = - [1686899615.016769][13059:13061] CHIP:DMG: { - [1686899615.016773][13059:13061] CHIP:DMG: AttributeDataIB = - [1686899615.016777][13059:13061] CHIP:DMG: { - [1686899615.016781][13059:13061] CHIP:DMG: DataVersion = 0x68385041, - [1686899615.016786][13059:13061] CHIP:DMG: AttributePathIB = - [1686899615.016791][13059:13061] CHIP:DMG: { - [1686899615.016796][13059:13061] CHIP:DMG: Endpoint = 0x0, - [1686899615.016801][13059:13061] CHIP:DMG: Cluster = 0x2c, - [1686899615.016806][13059:13061] CHIP:DMG: Attribute = 0x0000_0001, - [1686899615.016810][13059:13061] CHIP:DMG: } - [1686899615.016816][13059:13061] CHIP:DMG: - [1686899615.016821][13059:13061] CHIP:DMG: Data = 10, - [1686899615.016824][13059:13061] CHIP:DMG: }, - [1686899615.016830][13059:13061] CHIP:DMG: - [1686899615.016833][13059:13061] CHIP:DMG: }, - [1686899615.016839][13059:13061] CHIP:DMG: - [1686899615.016842][13059:13061] CHIP:DMG: ], - [1686899615.016848][13059:13061] CHIP:DMG: - [1686899615.016852][13059:13061] CHIP:DMG: SuppressResponse = true, - [1686899615.016856][13059:13061] CHIP:DMG: InteractionModelRevision = 1 - [1686899615.016859][13059:13061] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 11 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 11 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899658.971405][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686899658.971421][12411:12411] CHIP:DMG: { - [1686899658.971437][12411:12411] CHIP:DMG: suppressResponse = false, - [1686899658.971450][12411:12411] CHIP:DMG: timedRequest = false, - [1686899658.971459][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686899658.971477][12411:12411] CHIP:DMG: [ - [1686899658.971493][12411:12411] CHIP:DMG: AttributeDataIB = - [1686899658.971510][12411:12411] CHIP:DMG: { - [1686899658.971520][12411:12411] CHIP:DMG: AttributePathIB = - [1686899658.971534][12411:12411] CHIP:DMG: { - [1686899658.971547][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686899658.971560][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686899658.971575][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686899658.971586][12411:12411] CHIP:DMG: } - [1686899658.971600][12411:12411] CHIP:DMG: - [1686899658.971613][12411:12411] CHIP:DMG: Data = 11, - [1686899658.971624][12411:12411] CHIP:DMG: }, - [1686899658.971637][12411:12411] CHIP:DMG: - [1686899658.971646][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 11 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899707.460046][13108:13110] CHIP:DMG: ReportDataMessage = - [1686899707.460059][13108:13110] CHIP:DMG: { - [1686899707.460066][13108:13110] CHIP:DMG: AttributeReportIBs = - [1686899707.460087][13108:13110] CHIP:DMG: [ - [1686899707.460097][13108:13110] CHIP:DMG: AttributeReportIB = - [1686899707.460116][13108:13110] CHIP:DMG: { - [1686899707.460132][13108:13110] CHIP:DMG: AttributeDataIB = - [1686899707.460148][13108:13110] CHIP:DMG: { - [1686899707.460168][13108:13110] CHIP:DMG: DataVersion = 0x68385042, - [1686899707.460183][13108:13110] CHIP:DMG: AttributePathIB = - [1686899707.460202][13108:13110] CHIP:DMG: { - [1686899707.460221][13108:13110] CHIP:DMG: Endpoint = 0x0, - [1686899707.460239][13108:13110] CHIP:DMG: Cluster = 0x2c, - [1686899707.460259][13108:13110] CHIP:DMG: Attribute = 0x0000_0001, - [1686899707.460276][13108:13110] CHIP:DMG: } - [1686899707.460297][13108:13110] CHIP:DMG: - [1686899707.460318][13108:13110] CHIP:DMG: Data = 11, - [1686899707.460333][13108:13110] CHIP:DMG: }, - [1686899707.460352][13108:13110] CHIP:DMG: - [1686899707.460368][13108:13110] CHIP:DMG: }, - [1686899707.460391][13108:13110] CHIP:DMG: - [1686899707.460405][13108:13110] CHIP:DMG: ], - [1686899707.460434][13108:13110] CHIP:DMG: - [1686899707.460450][13108:13110] CHIP:DMG: SuppressResponse = true, - [1686899707.460467][13108:13110] CHIP:DMG: InteractionModelRevision = 1 - [1686899707.460480][13108:13110] CHIP:DMG: } - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_1_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_1_1_Simulated.yaml deleted file mode 100644 index ee5159751bbf42..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_1_1_Simulated.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 104.1.1. [TC-LUNIT-1.1] Global Attributes [DUT as Client] - -PICS: - - LUNIT.C - -config: - nodeId: 0x12344321 - cluster: "Unit Localization" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT read (0xFFFD) ClusterRevision attribute" - PICS: LUNIT.C.Afffd - wait: "readAttribute" - attribute: "ClusterRevision" - - - label: "DUT read (0xFFFC) FeatureMap attribute" - PICS: LUNIT.C.Afffc - wait: "readAttribute" - attribute: "FeatureMap" - - - label: "DUT read (0xFFFB) AttributeList attribute" - PICS: LUNIT.C.Afffb - wait: "readAttribute" - attribute: "AttributeList" - - - label: "DUT read (0xFFF9) AcceptedCommandList attribute" - PICS: LUNIT.C.Afff9 - wait: "readAttribute" - attribute: "AcceptedCommandList" - - - label: "DUT read (0xFFF8) GeneratedCommandList attribute" - PICS: LUNIT.C.Afff8 - wait: "readAttribute" - attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_2_1_Simulated.yaml deleted file mode 100644 index 9030404b43cc1c..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1_Simulated.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 104.2.1. [TC-LUNIT-2.1] Read and Write Unit Localization Cluster Attributes - [DUT as Client] - -PICS: - - LUNIT.C - -config: - nodeId: 0x12344321 - cluster: "Unit Localization" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads TemperatureUnit attribute from TH" - PICS: LUNIT.C.A0000 - wait: "readAttribute" - attribute: "TemperatureUnit" - - - label: "DUT writes 2 to TemperatureUnit attribute on TH" - PICS: LUNIT.C.A0000 - wait: "writeAttribute" - attribute: "TemperatureUnit" - arguments: - value: - - - label: "DUT reads TemperatureUnit attribute from TH" - PICS: LUNIT.C.A0000 - wait: "readAttribute" - attribute: "TemperatureUnit" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_8_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_8_1.yaml deleted file mode 100644 index 7691c62dc07f7d..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LVL_8_1.yaml +++ /dev/null @@ -1,314 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 22.6.3. [TC-LVL-8.1] Verification of commands (DUT as Client) - -PICS: - - LVL.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: - "Step 1: TH prompts the operator to make the DUT send one or more - supported commands from the Level Control cluster" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - ./chip-tool levelcontrol move-to-level 125 10 0 0 1 1 - Verify DUT receives move-to-level command response on the TH(all-clusters-app) Log: - [1657915209.151256][3245:3245] CHIP:DMG: InvokeRequestMessage = - [1657915209.151306][3245:3245] CHIP:DMG: { - [1657915209.151348][3245:3245] CHIP:DMG: suppressResponse = false, - [1657915209.151397][3245:3245] CHIP:DMG: timedRequest = false, - [1657915209.151441][3245:3245] CHIP:DMG: InvokeRequests = - [1657915209.151498][3245:3245] CHIP:DMG: [ - [1657915209.151543][3245:3245] CHIP:DMG: CommandDataIB = - [1657915209.151594][3245:3245] CHIP:DMG: { - [1657915209.151642][3245:3245] CHIP:DMG: CommandPathIB = - [1657915209.151699][3245:3245] CHIP:DMG: { - [1657915209.151752][3245:3245] CHIP:DMG: EndpointId = 0x1, - [1657915209.151814][3245:3245] CHIP:DMG: ClusterId = 0x8, - [1657915209.151874][3245:3245] CHIP:DMG: CommandId = 0x0, - [1657915209.151929][3245:3245] CHIP:DMG: }, - [1657915209.151993][3245:3245] CHIP:DMG: - [1657915209.152041][3245:3245] CHIP:DMG: CommandFields = - [1657915209.152128][3245:3245] CHIP:DMG: { - [1657915209.152190][3245:3245] CHIP:DMG: 0x0 = 125, - [1657915209.152251][3245:3245] CHIP:DMG: 0x1 = 10, - [1657915209.152311][3245:3245] CHIP:DMG: 0x2 = 0, - [1657915209.152370][3245:3245] CHIP:DMG: 0x3 = 0, - [1657915209.152424][3245:3245] CHIP:DMG: }, - [1657915209.152474][3245:3245] CHIP:DMG: }, - [1657915209.152530][3245:3245] CHIP:DMG: - [1657915209.152574][3245:3245] CHIP:DMG: ], - [1657915209.152630][3245:3245] CHIP:DMG: - [1657915209.152674][3245:3245] CHIP:DMG: InteractionModelRevision = 1 - [1657915209.152717][3245:3245] CHIP:DMG: }, - - - ./chip-tool levelcontrol move 1 5 0 0 1 1 - Verify DUT receives move command response on the TH(all-clusters-app) Log: - [1657915236.437571][3245:3245] CHIP:DMG: InvokeRequestMessage = - [1657915236.437601][3245:3245] CHIP:DMG: { - [1657915236.437624][3245:3245] CHIP:DMG: suppressResponse = false, - [1657915236.437658][3245:3245] CHIP:DMG: timedRequest = false, - [1657915236.437684][3245:3245] CHIP:DMG: InvokeRequests = - [1657915236.437719][3245:3245] CHIP:DMG: [ - [1657915236.437747][3245:3245] CHIP:DMG: CommandDataIB = - [1657915236.437779][3245:3245] CHIP:DMG: { - [1657915236.437809][3245:3245] CHIP:DMG: CommandPathIB = - [1657915236.437842][3245:3245] CHIP:DMG: { - [1657915236.437876][3245:3245] CHIP:DMG: EndpointId = 0x1, - [1657915236.437909][3245:3245] CHIP:DMG: ClusterId = 0x8, - [1657915236.437942][3245:3245] CHIP:DMG: CommandId = 0x1, - [1657915236.437972][3245:3245] CHIP:DMG: }, - [1657915236.438005][3245:3245] CHIP:DMG: - [1657915236.438035][3245:3245] CHIP:DMG: CommandFields = - [1657915236.438066][3245:3245] CHIP:DMG: { - [1657915236.438099][3245:3245] CHIP:DMG: 0x0 = 1, - [1657915236.438133][3245:3245] CHIP:DMG: 0x1 = 5, - [1657915236.438167][3245:3245] CHIP:DMG: 0x2 = 0, - [1657915236.438199][3245:3245] CHIP:DMG: 0x3 = 0, - [1657915236.438232][3245:3245] CHIP:DMG: }, - [1657915236.438261][3245:3245] CHIP:DMG: }, - [1657915236.438295][3245:3245] CHIP:DMG: - [1657915236.438321][3245:3245] CHIP:DMG: ], - [1657915236.438352][3245:3245] CHIP:DMG: - [1657915236.438376][3245:3245] CHIP:DMG: InteractionModelRevision = 1 - [1657915236.438402][3245:3245] CHIP:DMG: }, - - - ./chip-tool levelcontrol step 1 10 0 0 0 1 1 - Verify DUT receives step command response on the TH(all-clusters-app) Log: - [1659607055.170850][3434:3434] CHIP:DMG: InvokeRequestMessage = - [1659607055.170877][3434:3434] CHIP:DMG: { - [1659607055.170900][3434:3434] CHIP:DMG: suppressResponse = false, - [1659607055.170927][3434:3434] CHIP:DMG: timedRequest = false, - [1659607055.170952][3434:3434] CHIP:DMG: InvokeRequests = - [1659607055.170983][3434:3434] CHIP:DMG: [ - [1659607055.171008][3434:3434] CHIP:DMG: CommandDataIB = - [1659607055.171035][3434:3434] CHIP:DMG: { - [1659607055.171061][3434:3434] CHIP:DMG: CommandPathIB = - [1659607055.171093][3434:3434] CHIP:DMG: { - [1659607055.171124][3434:3434] CHIP:DMG: EndpointId = 0x1, - [1659607055.171160][3434:3434] CHIP:DMG: ClusterId = 0x8, - [1659607055.171193][3434:3434] CHIP:DMG: CommandId = 0x2, - [1659607055.171219][3434:3434] CHIP:DMG: }, - [1659607055.171251][3434:3434] CHIP:DMG: - [1659607055.171277][3434:3434] CHIP:DMG: CommandFields = - [1659607055.171307][3434:3434] CHIP:DMG: { - [1659607055.171340][3434:3434] CHIP:DMG: 0x0 = 1, - [1659607055.171373][3434:3434] CHIP:DMG: 0x1 = 10, - [1659607055.171409][3434:3434] CHIP:DMG: 0x2 = 0, - [1659607055.171439][3434:3434] CHIP:DMG: 0x3 = 0, - [1659607055.171474][3434:3434] CHIP:DMG: 0x4 = 0, - [1659607055.171504][3434:3434] CHIP:DMG: }, - [1659607055.171532][3434:3434] CHIP:DMG: }, - [1659607055.171563][3434:3434] CHIP:DMG: - [1659607055.171586][3434:3434] CHIP:DMG: ], - [1659607055.171617][3434:3434] CHIP:DMG: - [1659607055.171641][3434:3434] CHIP:DMG: InteractionModelRevision = 1 - [1659607055.171665][3434:3434] CHIP:DMG: }, - [1659607055.171731][3434:3434] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o - - - - ./chip-tool levelcontrol stop 0 0 1 1 - Verify DUT receives stop command response on the TH(all-clusters-app) Log: - [1657915273.417099][3245:3245] CHIP:DMG: InvokeRequestMessage = - [1657915273.417157][3245:3245] CHIP:DMG: { - [1657915273.417205][3245:3245] CHIP:DMG: suppressResponse = false, - [1657915273.417260][3245:3245] CHIP:DMG: timedRequest = false, - [1657915273.417311][3245:3245] CHIP:DMG: InvokeRequests = - [1657915273.417376][3245:3245] CHIP:DMG: [ - [1657915273.417428][3245:3245] CHIP:DMG: CommandDataIB = - [1657915273.417484][3245:3245] CHIP:DMG: { - [1657915273.417545][3245:3245] CHIP:DMG: CommandPathIB = - [1657915273.417605][3245:3245] CHIP:DMG: { - [1657915273.417669][3245:3245] CHIP:DMG: EndpointId = 0x1, - [1657915273.417739][3245:3245] CHIP:DMG: ClusterId = 0x8, - [1657915273.417806][3245:3245] CHIP:DMG: CommandId = 0x3, - [1657915273.417871][3245:3245] CHIP:DMG: }, - [1657915273.417934][3245:3245] CHIP:DMG: - [1657915273.417988][3245:3245] CHIP:DMG: CommandFields = - [1657915273.418051][3245:3245] CHIP:DMG: { - [1657915273.418117][3245:3245] CHIP:DMG: 0x0 = 0, - [1657915273.418185][3245:3245] CHIP:DMG: 0x1 = 0, - [1657915273.418246][3245:3245] CHIP:DMG: }, - [1657915273.418298][3245:3245] CHIP:DMG: }, - [1657915273.418327][3245:3245] CHIP:DMG: - [1657915273.418350][3245:3245] CHIP:DMG: ], - [1657915273.418380][3245:3245] CHIP:DMG: - [1657915273.418458][3245:3245] CHIP:DMG: InteractionModelRevision = 1 - [1657915273.418483][3245:3245] CHIP:DMG: }, - - - ./chip-tool levelcontrol move-to-level-with-on-off 1 0 0 0 1 1 - Verify DUT receives move-to-level-with-on-off command response on the TH(all-clusters-app) Log: - [1659607213.257973][3434:3434] CHIP:DMG: InvokeRequestMessage = - [1659607213.258015][3434:3434] CHIP:DMG: { - [1659607213.258039][3434:3434] CHIP:DMG: suppressResponse = false, - [1659607213.258066][3434:3434] CHIP:DMG: timedRequest = false, - [1659607213.258090][3434:3434] CHIP:DMG: InvokeRequests = - [1659607213.258132][3434:3434] CHIP:DMG: [ - [1659607213.258158][3434:3434] CHIP:DMG: CommandDataIB = - [1659607213.258219][3434:3434] CHIP:DMG: { - [1659607213.258254][3434:3434] CHIP:DMG: CommandPathIB = - [1659607213.258300][3434:3434] CHIP:DMG: { - [1659607213.258339][3434:3434] CHIP:DMG: EndpointId = 0x1, - [1659607213.258387][3434:3434] CHIP:DMG: ClusterId = 0x8, - [1659607213.258432][3434:3434] CHIP:DMG: CommandId = 0x4, - [1659607213.258467][3434:3434] CHIP:DMG: }, - [1659607213.258512][3434:3434] CHIP:DMG: - [1659607213.258550][3434:3434] CHIP:DMG: CommandFields = - [1659607213.258587][3434:3434] CHIP:DMG: { - [1659607213.258629][3434:3434] CHIP:DMG: 0x0 = 1, - [1659607213.258677][3434:3434] CHIP:DMG: 0x1 = 0, - [1659607213.258715][3434:3434] CHIP:DMG: 0x2 = 0, - [1659607213.258761][3434:3434] CHIP:DMG: 0x3 = 0, - [1659607213.258801][3434:3434] CHIP:DMG: }, - [1659607213.258834][3434:3434] CHIP:DMG: }, - [1659607213.258876][3434:3434] CHIP:DMG: - [1659607213.258909][3434:3434] CHIP:DMG: ], - [1659607213.258942][3434:3434] CHIP:DMG: - [1659607213.258974][3434:3434] CHIP:DMG: InteractionModelRevision = 1 - [1659607213.258999][3434:3434] CHIP:DMG: }, - [1659607213.259078][3434:3434] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o - [1659607213.259117][3434:3434] CHIP:DMG: AccessControl: allowed - [1659607213.259146][3434:3434] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0004 - [1659607213.259181][3434:3434] CHIP:ZCL: 0xaaaad3c4a860MOVE_TO_LEVEL_WITH_ON_OFF 1 0 - [1659607213.259217][3434:3434] CHIP:ZCL: Setting on/off to 0xaaaad3c4a800 due to level change - - - - ./chip-tool levelcontrol move-with-on-off 1 5 0 0 1 1 - Verify DUT receives move-with-on-off command response on the TH(all-clusters-app) Log: - [1659607307.208156][3434:3434] CHIP:DMG: InvokeRequestMessage = - [1659607307.208184][3434:3434] CHIP:DMG: { - [1659607307.208208][3434:3434] CHIP:DMG: suppressResponse = false, - [1659607307.208234][3434:3434] CHIP:DMG: timedRequest = false, - [1659607307.208258][3434:3434] CHIP:DMG: InvokeRequests = - [1659607307.208290][3434:3434] CHIP:DMG: [ - [1659607307.208315][3434:3434] CHIP:DMG: CommandDataIB = - [1659607307.208343][3434:3434] CHIP:DMG: { - [1659607307.208368][3434:3434] CHIP:DMG: CommandPathIB = - [1659607307.208420][3434:3434] CHIP:DMG: { - [1659607307.208457][3434:3434] CHIP:DMG: EndpointId = 0x1, - [1659607307.208496][3434:3434] CHIP:DMG: ClusterId = 0x8, - [1659607307.208533][3434:3434] CHIP:DMG: CommandId = 0x5, - [1659607307.208568][3434:3434] CHIP:DMG: }, - [1659607307.208601][3434:3434] CHIP:DMG: - [1659607307.208628][3434:3434] CHIP:DMG: CommandFields = - [1659607307.208659][3434:3434] CHIP:DMG: { - [1659607307.208694][3434:3434] CHIP:DMG: 0x0 = 1, - [1659607307.208731][3434:3434] CHIP:DMG: 0x1 = 5, - [1659607307.208769][3434:3434] CHIP:DMG: 0x2 = 0, - [1659607307.208806][3434:3434] CHIP:DMG: 0x3 = 0, - [1659607307.208842][3434:3434] CHIP:DMG: }, - [1659607307.208871][3434:3434] CHIP:DMG: }, - [1659607307.208902][3434:3434] CHIP:DMG: - [1659607307.208926][3434:3434] CHIP:DMG: ], - [1659607307.208956][3434:3434] CHIP:DMG: - [1659607307.208980][3434:3434] CHIP:DMG: InteractionModelRevision = 1 - [1659607307.209004][3434:3434] CHIP:DMG: }, - [1659607307.209073][3434:3434] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o - [1659607307.209111][3434:3434] CHIP:DMG: AccessControl: allowed - [1659607307.209139][3434:3434] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0005 - [1659607307.209176][3434:3434] CHIP:ZCL: 0xaaaad3c4a860MOVE_WITH_ON_OFF 1 5 - - - - ./chip-tool levelcontrol step-with-on-off 1 15 123 0 0 1 1 - Verify DUT receives step-with-on-off command response on the TH(all-clusters-app) Log: - [1659607424.990107][3434:3434] CHIP:DMG: InvokeRequestMessage = - [1659607424.990142][3434:3434] CHIP:DMG: { - [1659607424.990173][3434:3434] CHIP:DMG: suppressResponse = false, - [1659607424.990235][3434:3434] CHIP:DMG: timedRequest = false, - [1659607424.990282][3434:3434] CHIP:DMG: InvokeRequests = - [1659607424.990326][3434:3434] CHIP:DMG: [ - [1659607424.990360][3434:3434] CHIP:DMG: CommandDataIB = - [1659607424.990397][3434:3434] CHIP:DMG: { - [1659607424.990431][3434:3434] CHIP:DMG: CommandPathIB = - [1659607424.990470][3434:3434] CHIP:DMG: { - [1659607424.990512][3434:3434] CHIP:DMG: EndpointId = 0x1, - [1659607424.990557][3434:3434] CHIP:DMG: ClusterId = 0x8, - [1659607424.990602][3434:3434] CHIP:DMG: CommandId = 0x6, - [1659607424.990648][3434:3434] CHIP:DMG: }, - [1659607424.990692][3434:3434] CHIP:DMG: - [1659607424.990727][3434:3434] CHIP:DMG: CommandFields = - [1659607424.990773][3434:3434] CHIP:DMG: { - [1659607424.990816][3434:3434] CHIP:DMG: 0x0 = 1, - [1659607424.990862][3434:3434] CHIP:DMG: 0x1 = 15, - [1659607424.990910][3434:3434] CHIP:DMG: 0x2 = 123, - [1659607424.990951][3434:3434] CHIP:DMG: 0x3 = 0, - [1659607424.990996][3434:3434] CHIP:DMG: 0x4 = 0, - [1659607424.991035][3434:3434] CHIP:DMG: }, - [1659607424.991073][3434:3434] CHIP:DMG: }, - [1659607424.991118][3434:3434] CHIP:DMG: - [1659607424.991150][3434:3434] CHIP:DMG: ], - [1659607424.991192][3434:3434] CHIP:DMG: - [1659607424.991225][3434:3434] CHIP:DMG: InteractionModelRevision = 1 - [1659607424.991260][3434:3434] CHIP:DMG: }, - [1659607424.991350][3434:3434] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o - [1659607424.991400][3434:3434] CHIP:DMG: AccessControl: allowed - [1659607424.991438][3434:3434] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0006 - [1659607424.991490][3434:3434] CHIP:ZCL: 0xaaaad3c4a860STEP_WITH_ON_OFF 1 f 7b - - - ./chip-tool levelcontrol stop-with-on-off 0 0 1 1 - Verify DUT receives stop-with-on-off command response on the TH(all-clusters-app) Log: - Verify in TH all-clusters-app[1659607566.304117][3434:3434] CHIP:DMG: InvokeRequestMessage = - [1659607566.304146][3434:3434] CHIP:DMG: { - [1659607566.304169][3434:3434] CHIP:DMG: suppressResponse = false, - [1659607566.304196][3434:3434] CHIP:DMG: timedRequest = false, - [1659607566.304220][3434:3434] CHIP:DMG: InvokeRequests = - [1659607566.304252][3434:3434] CHIP:DMG: [ - [1659607566.304276][3434:3434] CHIP:DMG: CommandDataIB = - [1659607566.304303][3434:3434] CHIP:DMG: { - [1659607566.304328][3434:3434] CHIP:DMG: CommandPathIB = - [1659607566.304363][3434:3434] CHIP:DMG: { - [1659607566.304396][3434:3434] CHIP:DMG: EndpointId = 0x1, - [1659607566.304434][3434:3434] CHIP:DMG: ClusterId = 0x8, - [1659607566.304471][3434:3434] CHIP:DMG: CommandId = 0x7, - [1659607566.304506][3434:3434] CHIP:DMG: }, - [1659607566.304539][3434:3434] CHIP:DMG: - [1659607566.304565][3434:3434] CHIP:DMG: CommandFields = - [1659607566.304596][3434:3434] CHIP:DMG: { - [1659607566.304629][3434:3434] CHIP:DMG: 0x0 = 0, - [1659607566.304667][3434:3434] CHIP:DMG: 0x1 = 0, - [1659607566.304703][3434:3434] CHIP:DMG: }, - [1659607566.304733][3434:3434] CHIP:DMG: }, - [1659607566.304762][3434:3434] CHIP:DMG: - [1659607566.304786][3434:3434] CHIP:DMG: ], - [1659607566.304817][3434:3434] CHIP:DMG: - [1659607566.304841][3434:3434] CHIP:DMG: InteractionModelRevision = 1 - [1659607566.304865][3434:3434] CHIP:DMG: }, - [1659607566.304932][3434:3434] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o - [1659607566.304970][3434:3434] CHIP:DMG: AccessControl: allowed - [1659607566.304999][3434:3434] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0007 - [1659607566.305032][3434:3434] CHIP:ZCL: 0xaaaad3c4a860STOP_WITH_ON_OFF - [1659607566.305069][3434:3434] CHIP:DMG: Endpoint 1, Cluster 0x0000_0008 update version to 671abea5 - [1659607566.305110][3434:3434] CHIP:DMG: ICR moving to [ Preparing] - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml index 8d8d34d82f591b..e68e3f8ad88709 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml @@ -33,65 +33,75 @@ tests: - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." verification: | - Verify that the DUT response contains the ClusterRevision attribute and has the value 1. + ./chip-tool laundrywashermode read cluster-revision 1 1 + + Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: + + [1690184527.689706][15400:15402] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFD DataVersion: 3075628268 + [1690184527.689762][15400:15402] CHIP:TOO: ClusterRevision: 1 disabled: true - label: "Step 3: TH reads from the DUT the FeatureMap attribute." verification: | - Verify that the DUT response contains the FeatureMap attribute and have the following bit set: + ./chip-tool laundrywashermode read feature-map 1 1 - bit 0: SHALL be 1 if and only if LWM.S.F00(DEPONOFF) + On the TH(Chip-tool) Log, Verify featureMap value is 1 If TCCM.S.F00(DEPONOFF) true, Otherwise 0, and below is the sample log provided for the raspi platform: + + [1690184539.350009][15403:15405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFC DataVersion: 3075628268 + [1690184539.350062][15403:15405] CHIP:TOO: FeatureMap: 1 disabled: true - label: "Step 4: TH reads from the DUT the AttributeList attribute." verification: | - Verify that the DUT response contains the AttributeList attribute and have the list of supported attributes: - - The list SHALL include all the mandatory entries: - 0x0000, 0x0001, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd. - - The list MAY include these optional entries: - - 0x0002: SHALL be included if and only if LWM.S.A0002(StartUpMode) - - The list include entries based on feature support: - - - 0x0003 SHALL be included if and only if LWM.S.F00(DEPONOFF) - - - and SHALL NOT be included otherwise. - - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) - + ./chip-tool laundrywashermode read attribute-list 1 1 + + Verify the "AttributeList " should include the mandatory attributes (values 0, 1), + - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and + - list may include optional attribute(value 0x0002), if MOD.S.A0004(StartUpMode) supports, + - list contains feature dependent attribute (values 0x0003), if MOD.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1690184549.210762][15408:15410] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFB DataVersion: 3075628268 + [1690184549.210786][15408:15410] CHIP:TOO: AttributeList: 10 entries + [1690184549.210792][15408:15410] CHIP:TOO: [1]: 0 + [1690184549.210797][15408:15410] CHIP:TOO: [2]: 1 + [1690184549.210802][15408:15410] CHIP:TOO: [3]: 2 + [1690184549.210806][15408:15410] CHIP:TOO: [4]: 3 + [1690184549.210810][15408:15410] CHIP:TOO: [5]: 65528 + [1690184549.210815][15408:15410] CHIP:TOO: [6]: 65529 + [1690184549.210819][15408:15410] CHIP:TOO: [7]: 65530 + [1690184549.210823][15408:15410] CHIP:TOO: [8]: 65531 + [1690184549.210827][15408:15410] CHIP:TOO: [9]: 65532 + [1690184549.210831][15408:15410] CHIP:TOO: [10]: 65533 + disabled: true - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. + - label: "Step 5: TH reads from the DUT the EventList attribute." + verification: | + ./chip-tool laundrywashermode read event-list 1 1 + Verify "EventList" contains a list of supported events, for this cluster the list is emty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690184560.096147][15413:15415] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFA DataVersion: 3075628268 + [1690184560.096165][15413:15415] CHIP:TOO: EventList: 0 entries disabled: true - - label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute." + - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." verification: | - Verify that the DUT response contains the AcceptedCommandList attribute and have the list of Accepted Command: - The list SHALL include all the mandatory entries: + ./chip-tool laundrywashermode read accepted-command-list 1 1 - 0x00 - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) + Verify the "AcceptedCommandList" contains a list of mandatory commands (value 0) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. - - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690184572.184880][15416:15418] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFF9 DataVersion: 3075628268 + [1690184572.184896][15416:15418] CHIP:TOO: AcceptedCommandList: 1 entries + [1690184572.184901][15416:15418] CHIP:TOO: [1]: 0 disabled: true - - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." + - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." verification: | - Verify that the DUT response contains the GeneratedCommandList attribute and have the list of Generated Command: - The list SHALL include all the mandatory entries: - - 0x01 - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) + ./chip-tool laundrywashermode read generated-command-list 1 1 - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. + Verify " GeneratedCommandList" contains a list of mandatory commands (value 1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690184586.309954][15419:15421] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFF8 DataVersion: 3075628268 + [1690184586.310020][15419:15421] CHIP:TOO: GeneratedCommandList: 1 entries + [1690184586.310043][15419:15421] CHIP:TOO: [1]: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml index 411340898b769b..d5ccf5a9d956ca 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml @@ -34,42 +34,90 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: LWM.S.A0000 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has at least one entry - - Verify that each ModeOptionsStruct entry has a unique Mode field value - - Verify that each ModeOptionsStruct entry has a unique Label field value - - Verify that each ModeOptionsStruct entry’s ModeTags field, if not empty, has: - the values of the Value fields that are not larger than 16 bits - - for each Value field: Is the mode tag value a defined common tag value ( Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster derived tag value ( Normal, Heavy, {T_LIGHT}) or in the MfgTags (0x8000 to 0xBFFF) range - - if the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - - - Verify that at least one ModeOptionsStruct entry includes the Normal mode tag - - Save the Mode field values as supported_modes_dut + ./chip-tool laundrywashermode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that list should contain at least one entry + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value + - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 + - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690184598.426478][15422:15424] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 3075628268 + [1690184598.426516][15422:15424] CHIP:TOO: SupportedModes: 4 entries + [1690184598.426540][15422:15424] CHIP:TOO: [1]: { + [1690184598.426545][15422:15424] CHIP:TOO: Label: Normal + [1690184598.426552][15422:15424] CHIP:TOO: Mode: 0 + [1690184598.426558][15422:15424] CHIP:TOO: ModeTags: 1 entries + [1690184598.426565][15422:15424] CHIP:TOO: [1]: { + [1690184598.426569][15422:15424] CHIP:TOO: Value: 16384 + [1690184598.426572][15422:15424] CHIP:TOO: } + [1690184598.426576][15422:15424] CHIP:TOO: } + [1690184598.426585][15422:15424] CHIP:TOO: [2]: { + [1690184598.426589][15422:15424] CHIP:TOO: Label: Delicate + [1690184598.426593][15422:15424] CHIP:TOO: Mode: 1 + [1690184598.426599][15422:15424] CHIP:TOO: ModeTags: 3 entries + [1690184598.426605][15422:15424] CHIP:TOO: [1]: { + [1690184598.426609][15422:15424] CHIP:TOO: Value: 16385 + [1690184598.426612][15422:15424] CHIP:TOO: } + [1690184598.426617][15422:15424] CHIP:TOO: [2]: { + [1690184598.426621][15422:15424] CHIP:TOO: Value: 8 + [1690184598.426624][15422:15424] CHIP:TOO: } + [1690184598.426629][15422:15424] CHIP:TOO: [3]: { + [1690184598.426633][15422:15424] CHIP:TOO: Value: 2 + [1690184598.426637][15422:15424] CHIP:TOO: } + [1690184598.426640][15422:15424] CHIP:TOO: } + [1690184598.426648][15422:15424] CHIP:TOO: [3]: { + [1690184598.426652][15422:15424] CHIP:TOO: Label: Heavy + [1690184598.426655][15422:15424] CHIP:TOO: Mode: 2 + [1690184598.426661][15422:15424] CHIP:TOO: ModeTags: 2 entries + [1690184598.426666][15422:15424] CHIP:TOO: [1]: { + [1690184598.426669][15422:15424] CHIP:TOO: Value: 7 + [1690184598.426672][15422:15424] CHIP:TOO: } + [1690184598.426677][15422:15424] CHIP:TOO: [2]: { + [1690184598.426680][15422:15424] CHIP:TOO: Value: 16386 + [1690184598.426683][15422:15424] CHIP:TOO: } + [1690184598.426687][15422:15424] CHIP:TOO: } + [1690184598.426693][15422:15424] CHIP:TOO: [4]: { + [1690184598.426697][15422:15424] CHIP:TOO: Label: Whites + [1690184598.426700][15422:15424] CHIP:TOO: Mode: 3 + [1690184598.426705][15422:15424] CHIP:TOO: ModeTags: 1 entries + [1690184598.426710][15422:15424] CHIP:TOO: [1]: { + [1690184598.426713][15422:15424] CHIP:TOO: Value: 16387 + [1690184598.426716][15422:15424] CHIP:TOO: } + [1690184598.426720][15422:15424] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool laundrywashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1690184642.211028][15428:15430] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 + [1690184642.211042][15428:15430] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the OnMode attribute." PICS: LWM.S.A0003 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool laundrywashermode read on-mode 1 1 + + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null + + [1690184668.519026][15432:15434] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0003 DataVersion: 3075628268 + [1690184668.519041][15432:15434] CHIP:TOO: OnMode: null disabled: true - label: "Step 5: TH reads from the DUT the StartUpMode attribute." PICS: LWM.S.A0002 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool laundrywashermode read start-up-mode 1 1 + + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null + + [1690184690.235037][15436:15438] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 3075628268 + [1690184690.235048][15436:15438] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml index f980951d223a86..6ae4fce0d5d6f5 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml @@ -34,107 +34,201 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: LWM.S.A0000 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut + ./chip-tool laundrywashermode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690184703.795207][15439:15441] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 3075628268 + [1690184703.795262][15439:15441] CHIP:TOO: SupportedModes: 4 entries + [1690184703.795291][15439:15441] CHIP:TOO: [1]: { + [1690184703.795296][15439:15441] CHIP:TOO: Label: Normal + [1690184703.795309][15439:15441] CHIP:TOO: Mode: 0 + [1690184703.795314][15439:15441] CHIP:TOO: ModeTags: 1 entries + [1690184703.795331][15439:15441] CHIP:TOO: [1]: { + [1690184703.795335][15439:15441] CHIP:TOO: Value: 16384 + [1690184703.795338][15439:15441] CHIP:TOO: } + [1690184703.795342][15439:15441] CHIP:TOO: } + [1690184703.795350][15439:15441] CHIP:TOO: [2]: { + [1690184703.795353][15439:15441] CHIP:TOO: Label: Delicate + [1690184703.795355][15439:15441] CHIP:TOO: Mode: 1 + [1690184703.795360][15439:15441] CHIP:TOO: ModeTags: 3 entries + [1690184703.795364][15439:15441] CHIP:TOO: [1]: { + [1690184703.795366][15439:15441] CHIP:TOO: Value: 16385 + [1690184703.795369][15439:15441] CHIP:TOO: } + [1690184703.795373][15439:15441] CHIP:TOO: [2]: { + [1690184703.795376][15439:15441] CHIP:TOO: Value: 8 + [1690184703.795379][15439:15441] CHIP:TOO: } + [1690184703.795382][15439:15441] CHIP:TOO: [3]: { + [1690184703.795386][15439:15441] CHIP:TOO: Value: 2 + [1690184703.795389][15439:15441] CHIP:TOO: } + [1690184703.795391][15439:15441] CHIP:TOO: } + [1690184703.795397][15439:15441] CHIP:TOO: [3]: { + [1690184703.795399][15439:15441] CHIP:TOO: Label: Heavy + [1690184703.795402][15439:15441] CHIP:TOO: Mode: 2 + [1690184703.795406][15439:15441] CHIP:TOO: ModeTags: 2 entries + [1690184703.795410][15439:15441] CHIP:TOO: [1]: { + [1690184703.795412][15439:15441] CHIP:TOO: Value: 7 + [1690184703.795414][15439:15441] CHIP:TOO: } + [1690184703.795418][15439:15441] CHIP:TOO: [2]: { + [1690184703.795422][15439:15441] CHIP:TOO: Value: 16386 + [1690184703.795424][15439:15441] CHIP:TOO: } + [1690184703.795426][15439:15441] CHIP:TOO: } + [1690184703.795432][15439:15441] CHIP:TOO: [4]: { + [1690184703.795435][15439:15441] CHIP:TOO: Label: Whites + [1690184703.795437][15439:15441] CHIP:TOO: Mode: 3 + [1690184703.795441][15439:15441] CHIP:TOO: ModeTags: 1 entries + [1690184703.795444][15439:15441] CHIP:TOO: [1]: { + [1690184703.795447][15439:15441] CHIP:TOO: Value: 16387 + [1690184703.795449][15439:15441] CHIP:TOO: } + [1690184703.795452][15439:15441] CHIP:TOO: } disabled: true - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 - Save the value as old_current_mode_dut + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th + [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 + [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" PICS: LWM.S.C00.Rsp verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool laundrywashermode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690184772.736083][15449:15451] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 + [1690184772.736098][15449:15451] CHIP:TOO: ChangeToModeResponse: { + [1690184772.736102][15449:15451] CHIP:TOO: status: 0 + [1690184772.736105][15449:15451] CHIP:TOO: } disabled: true - label: - "Step 4: Manually put the device in a state from which it will FAIL to + "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.LWM.MODE_CHANGE_FAIL" + PICS: PIXIT.LWM.CAN_TEST_MODE_FAILURE verification: | - + Manual operation required disabled: true - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 - Save the value as old_current_mode_dut + Verify on TH(chip-tool), Current modes attribute value is an integer value. + - Save the mode values for usage in steps 3 and below is the sample log provided for the raspi platform + + [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 + [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.LWM.MODE_CHANGE_FAIL" - PICS: LWM.S.C00.Rsp + PICS: PIXIT.LWM.CAN_TEST_MODE_FAILURE && LWM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + Note : Please skip this step as SDK is not enabled with this failure response - Verify that the Status field is set to GenericFailure(0x02) or in the MfgCodes (0x80 to 0xBF) range + ./chip-tool laundrywashermode change-to-mode 2 1 1 - Verify that the StatusText field has a length between 1 and 64 + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and below is the sample log provided for the raspi platform: + + [1690270057.274893][31185:31187] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0051 Command=0x0000_0001 + [1690270057.274901][31185:31187] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 + [1690270057.274915][31185:31187] CHIP:TOO: ChangeToModeResponse: { + [1690270057.274921][31185:31187] CHIP:TOO: status: 0 + [1690270057.274924][31185:31187] CHIP:TOO: } disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to old_current_mode_dut + ./chip-tool laundrywashermode read current-mode 1 1 + + Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 + [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 8: Manually put the device in a state from which it will + "Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.LWM.MODE_CHANGE_OK" verification: | - + Manual operation required disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - Save the value as old_current_mode_dut + [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 + [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.LWM.MODE_CHANGE_OK" PICS: LWM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + ./chip-tool laundrywashermode change-to-mode 3 1 1 - Verify that the Status field is set to Success(0x00) + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690185119.954667][15519:15521] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 + [1690185119.954682][15519:15521] CHIP:TOO: ChangeToModeResponse: { + [1690185119.954686][15519:15521] CHIP:TOO: status: 0 + [1690185119.954689][15519:15521] CHIP:TOO: } disabled: true - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to PIXIT.LWM.MODE_CHANGE_OK + ./chip-tool laundrywashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 3 + + [1690185143.611836][15523:15525] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628273 + [1690185143.611850][15523:15525] CHIP:TOO: CurrentMode: 3 disabled: true - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: LWM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + ./chip-tool laundrywashermode change-to-mode 5 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: - Verify that the Status field is set to UnsupportedMode(0x01). + [1690185176.658256][15528:15530] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 + [1690185176.658275][15528:15530] CHIP:TOO: ChangeToModeResponse: { + [1690185176.658280][15528:15530] CHIP:TOO: status: 1 + [1690185176.658284][15528:15530] CHIP:TOO: } disabled: true - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + - label: "Step 14: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to PIXIT.LWM.MODE_CHANGE_OK + ./chip-tool laundrywashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 3 + + [1690185143.611836][15523:15525] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628273 + [1690185143.611850][15523:15525] CHIP:TOO: CurrentMode: 3 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml index 08a2b191a6ec85..7ce1d6da60ce93 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml @@ -24,6 +24,27 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool laundrywashermode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690185319.728749][15566:15568] CHIP:DMG: StatusIB = + [1690185319.728752][15566:15568] CHIP:DMG: { + [1690185319.728755][15566:15568] CHIP:DMG: status = 0x00 (SUCCESS), + [1690185319.728758][15566:15568] CHIP:DMG: }, + disabled: true + + - label: "Precondition" + verification: | + 1. Laundry Washer Mode and OnOff clusters are available on the same endpoint + + 2. The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,31 +55,82 @@ tests: - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: LWM.S.A0003 && LWM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read on-mode 1 1 + + On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - Save the value as on_mode_dut + [1690185340.696395][15570:15572] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0003 DataVersion: 3936986762 + [1690185340.696410][15570:15572] CHIP:TOO: OnMode: 0 disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 && LWM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 - Save the value as old_current_mode_dut + On TH(chip-tool), Verify that CurrentMode attribute is an integer. + Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + NOTE: If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + + [1690185351.764944][15576:15578] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3936986762 + [1690185351.764982][15576:15578] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: LWM.S.A0000 && LWM.S.F00 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th. + ./chip-tool laundrywashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690185380.248193][15579:15581] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 3936986762 + [1690185380.248223][15579:15581] CHIP:TOO: SupportedModes: 4 entries + [1690185380.248237][15579:15581] CHIP:TOO: [1]: { + [1690185380.248240][15579:15581] CHIP:TOO: Label: Normal + [1690185380.248246][15579:15581] CHIP:TOO: Mode: 0 + [1690185380.248250][15579:15581] CHIP:TOO: ModeTags: 1 entries + [1690185380.248255][15579:15581] CHIP:TOO: [1]: { + [1690185380.248258][15579:15581] CHIP:TOO: Value: 16384 + [1690185380.248261][15579:15581] CHIP:TOO: } + [1690185380.248264][15579:15581] CHIP:TOO: } + [1690185380.248271][15579:15581] CHIP:TOO: [2]: { + [1690185380.248273][15579:15581] CHIP:TOO: Label: Delicate + [1690185380.248276][15579:15581] CHIP:TOO: Mode: 1 + [1690185380.248281][15579:15581] CHIP:TOO: ModeTags: 3 entries + [1690185380.248285][15579:15581] CHIP:TOO: [1]: { + [1690185380.248288][15579:15581] CHIP:TOO: Value: 16385 + [1690185380.248290][15579:15581] CHIP:TOO: } + [1690185380.248294][15579:15581] CHIP:TOO: [2]: { + [1690185380.248296][15579:15581] CHIP:TOO: Value: 8 + [1690185380.248299][15579:15581] CHIP:TOO: } + [1690185380.248302][15579:15581] CHIP:TOO: [3]: { + [1690185380.248305][15579:15581] CHIP:TOO: Value: 2 + [1690185380.248307][15579:15581] CHIP:TOO: } + [1690185380.248310][15579:15581] CHIP:TOO: } + [1690185380.248315][15579:15581] CHIP:TOO: [3]: { + [1690185380.248318][15579:15581] CHIP:TOO: Label: Heavy + [1690185380.248320][15579:15581] CHIP:TOO: Mode: 2 + [1690185380.248324][15579:15581] CHIP:TOO: ModeTags: 2 entries + [1690185380.248328][15579:15581] CHIP:TOO: [1]: { + [1690185380.248330][15579:15581] CHIP:TOO: Value: 7 + [1690185380.248333][15579:15581] CHIP:TOO: } + [1690185380.248336][15579:15581] CHIP:TOO: [2]: { + [1690185380.248339][15579:15581] CHIP:TOO: Value: 16386 + [1690185380.248341][15579:15581] CHIP:TOO: } + [1690185380.248344][15579:15581] CHIP:TOO: } + [1690185380.248349][15579:15581] CHIP:TOO: [4]: { + [1690185380.248351][15579:15581] CHIP:TOO: Label: Whites + [1690185380.248354][15579:15581] CHIP:TOO: Mode: 3 + [1690185380.248357][15579:15581] CHIP:TOO: ModeTags: 1 entries + [1690185380.248361][15579:15581] CHIP:TOO: [1]: { + [1690185380.248363][15579:15581] CHIP:TOO: Value: 16387 + [1690185380.248366][15579:15581] CHIP:TOO: } + [1690185380.248368][15579:15581] CHIP:TOO: } disabled: true - label: @@ -66,25 +138,51 @@ tests: to new_mode_th" PICS: LWM.S.C00.Rsp && LWM.S.F00 verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool laundrywashermode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931013.571019][20667:20669] CHIP:DMG: + [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = + [1684931013.571024][20667:20669] CHIP:DMG: { + [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931013.571030][20667:20669] CHIP:DMG: }, + [1684931013.571034][20667:20669] CHIP:DMG: disabled: true - label: "Step 6: TH sends a Off command to the DUT" PICS: OO.S.C00.Rsp && LWM.S.F00 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool onoff off 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = + [1684931101.118659][20709:20711] CHIP:DMG: { + [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931101.118665][20709:20711] CHIP:DMG: }, disabled: true - label: "Step 7: TH sends a On command to the DUT" PICS: OO.S.C01.Rsp && LWM.S.F00 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool onoff on 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = + [1684931217.055517][20729:20731] CHIP:DMG: { + [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931217.055523][20729:20731] CHIP:DMG: }, disabled: true - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 && LWM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - The value is equal to on_mode_dut + [1690185481.653384][15610:15612] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3936986766 + [1690185481.653431][15610:15612] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml index a57017a25562df..2359c29402a4ff 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml @@ -24,6 +24,19 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To Execute the TC-LWM-3.2 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,50 +47,193 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: LWM.S.A0002 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer or null + - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null - Save the value as startup_mode_dut + [1690185689.626227][15652:15654] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 869931348 + [1690185689.626269][15652:15654] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: LWM.S.A0000 + verification: | + ./chip-tool laundrywashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690185724.484514][15658:15660] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 869931348 + [1690185724.484543][15658:15660] CHIP:TOO: SupportedModes: 4 entries + [1690185724.484552][15658:15660] CHIP:TOO: [1]: { + [1690185724.484555][15658:15660] CHIP:TOO: Label: Normal + [1690185724.484561][15658:15660] CHIP:TOO: Mode: 0 + [1690185724.484565][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484570][15658:15660] CHIP:TOO: [1]: { + [1690185724.484573][15658:15660] CHIP:TOO: Value: 16384 + [1690185724.484576][15658:15660] CHIP:TOO: } + [1690185724.484579][15658:15660] CHIP:TOO: } + [1690185724.484585][15658:15660] CHIP:TOO: [2]: { + [1690185724.484588][15658:15660] CHIP:TOO: Label: Delicate + [1690185724.484590][15658:15660] CHIP:TOO: Mode: 1 + [1690185724.484595][15658:15660] CHIP:TOO: ModeTags: 3 entries + [1690185724.484598][15658:15660] CHIP:TOO: [1]: { + [1690185724.484601][15658:15660] CHIP:TOO: Value: 16385 + [1690185724.484603][15658:15660] CHIP:TOO: } + [1690185724.484607][15658:15660] CHIP:TOO: [2]: { + [1690185724.484609][15658:15660] CHIP:TOO: Value: 8 + [1690185724.484612][15658:15660] CHIP:TOO: } + [1690185724.484615][15658:15660] CHIP:TOO: [3]: { + [1690185724.484617][15658:15660] CHIP:TOO: Value: 2 + [1690185724.484620][15658:15660] CHIP:TOO: } + [1690185724.484622][15658:15660] CHIP:TOO: } + [1690185724.484627][15658:15660] CHIP:TOO: [3]: { + [1690185724.484630][15658:15660] CHIP:TOO: Label: Heavy + [1690185724.484632][15658:15660] CHIP:TOO: Mode: 2 + [1690185724.484636][15658:15660] CHIP:TOO: ModeTags: 2 entries + [1690185724.484639][15658:15660] CHIP:TOO: [1]: { + [1690185724.484642][15658:15660] CHIP:TOO: Value: 7 + [1690185724.484644][15658:15660] CHIP:TOO: } + [1690185724.484647][15658:15660] CHIP:TOO: [2]: { + [1690185724.484649][15658:15660] CHIP:TOO: Value: 16386 + [1690185724.484652][15658:15660] CHIP:TOO: } + [1690185724.484654][15658:15660] CHIP:TOO: } + [1690185724.484659][15658:15660] CHIP:TOO: [4]: { + [1690185724.484662][15658:15660] CHIP:TOO: Label: Whites + [1690185724.484664][15658:15660] CHIP:TOO: Mode: 3 + [1690185724.484667][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484670][15658:15660] CHIP:TOO: [1]: { + [1690185724.484673][15658:15660] CHIP:TOO: Value: 16387 + [1690185724.484675][15658:15660] CHIP:TOO: } + [1690185724.484678][15658:15660] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: LWM.S.A0002 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode write start-up-mode 0 1 1 - Save the value as old_current_mode_dut + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + [1690185636.156858][15647:15649] CHIP:DMG: StatusIB = + [1690185636.156870][15647:15649] CHIP:DMG: { + [1690185636.156881][15647:15649] CHIP:DMG: status = 0x00 (SUCCESS), + [1690185636.156892][15647:15649] CHIP:DMG: }, disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: LWM.S.A0000 + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries + ./chip-tool laundrywashermode read current-mode 1 1 - Verify that the list has two or more entries + On TH(chip-tool), Verify CurrentMode attribute value is an integer, + - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: - Save the Mode field values as supported_modes_dut + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th. + [1690185713.364316][15655:15657] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 869931348 + [1690185713.364364][15655:15657] CHIP:TOO: CurrentMode: 0 + disabled: true + + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." + PICS: LWM.S.A0000 + verification: | + ./chip-tool laundrywashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690185724.484514][15658:15660] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 869931348 + [1690185724.484543][15658:15660] CHIP:TOO: SupportedModes: 4 entries + [1690185724.484552][15658:15660] CHIP:TOO: [1]: { + [1690185724.484555][15658:15660] CHIP:TOO: Label: Normal + [1690185724.484561][15658:15660] CHIP:TOO: Mode: 0 + [1690185724.484565][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484570][15658:15660] CHIP:TOO: [1]: { + [1690185724.484573][15658:15660] CHIP:TOO: Value: 16384 + [1690185724.484576][15658:15660] CHIP:TOO: } + [1690185724.484579][15658:15660] CHIP:TOO: } + [1690185724.484585][15658:15660] CHIP:TOO: [2]: { + [1690185724.484588][15658:15660] CHIP:TOO: Label: Delicate + [1690185724.484590][15658:15660] CHIP:TOO: Mode: 1 + [1690185724.484595][15658:15660] CHIP:TOO: ModeTags: 3 entries + [1690185724.484598][15658:15660] CHIP:TOO: [1]: { + [1690185724.484601][15658:15660] CHIP:TOO: Value: 16385 + [1690185724.484603][15658:15660] CHIP:TOO: } + [1690185724.484607][15658:15660] CHIP:TOO: [2]: { + [1690185724.484609][15658:15660] CHIP:TOO: Value: 8 + [1690185724.484612][15658:15660] CHIP:TOO: } + [1690185724.484615][15658:15660] CHIP:TOO: [3]: { + [1690185724.484617][15658:15660] CHIP:TOO: Value: 2 + [1690185724.484620][15658:15660] CHIP:TOO: } + [1690185724.484622][15658:15660] CHIP:TOO: } + [1690185724.484627][15658:15660] CHIP:TOO: [3]: { + [1690185724.484630][15658:15660] CHIP:TOO: Label: Heavy + [1690185724.484632][15658:15660] CHIP:TOO: Mode: 2 + [1690185724.484636][15658:15660] CHIP:TOO: ModeTags: 2 entries + [1690185724.484639][15658:15660] CHIP:TOO: [1]: { + [1690185724.484642][15658:15660] CHIP:TOO: Value: 7 + [1690185724.484644][15658:15660] CHIP:TOO: } + [1690185724.484647][15658:15660] CHIP:TOO: [2]: { + [1690185724.484649][15658:15660] CHIP:TOO: Value: 16386 + [1690185724.484652][15658:15660] CHIP:TOO: } + [1690185724.484654][15658:15660] CHIP:TOO: } + [1690185724.484659][15658:15660] CHIP:TOO: [4]: { + [1690185724.484662][15658:15660] CHIP:TOO: Label: Whites + [1690185724.484664][15658:15660] CHIP:TOO: Mode: 3 + [1690185724.484667][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484670][15658:15660] CHIP:TOO: [1]: { + [1690185724.484673][15658:15660] CHIP:TOO: Value: 16387 + [1690185724.484675][15658:15660] CHIP:TOO: } + [1690185724.484678][15658:15660] CHIP:TOO: } disabled: true - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: LWM.S.C00.Rsp verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool laundrywashermode change-to-mode 1 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690185742.384243][15661:15663] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 + [1690185742.384257][15661:15663] CHIP:TOO: ChangeToModeResponse: { + [1690185742.384264][15661:15663] CHIP:TOO: status: 0 + [1690185742.384267][15661:15663] CHIP:TOO: } + disabled: true + + - label: "Step 8: Physically power cycle the device" + verification: | + Physically power cycle the device disabled: true - - label: "Step 6: Physically power cycle the device" + - label: "Step 9: TH reads from the DUT the StartUpMode attribute." + PICS: LWM.S.A0002 verification: | + ./chip-tool laundrywashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer value + - Save the value as new_start_up_mode_dut and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + [1690185689.626227][15652:15654] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 869931348 + [1690185689.626269][15652:15654] CHIP:TOO: StartUpMode: 0 disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - The value is equal to startup_mode_dut + [1690185777.021610][15671:15673] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 2000229067 + [1690185777.021664][15671:15673] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml index af7a3a19f81f3d..7b50bfd9a06f9b 100644 --- a/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: NDOCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !NDOCONC.S.F00 && !NDOCONC.S.F01 && !NDOCONC.S.F02 && !NDOCONC.S.F03 + && !NDOCONC.S.F04 && !NDOCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F00 + PICS: NDOCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F00 + PICS: " !NDOCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F01 + PICS: NDOCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F01 + PICS: " !NDOCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F02 + PICS: NDOCONC.S.F02 && NDOCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F02 + PICS: " !NDOCONC.S.F02 && !NDOCONC.S.F01 " response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F03 + PICS: NDOCONC.S.F03 && NDOCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F03 + PICS: " !NDOCONC.S.F03 && !NDOCONC.S.F01 " response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F04 + PICS: NDOCONC.S.F04 && NDOCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F04 + PICS: " !NDOCONC.S.F04 && NDOCONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F05 + PICS: NDOCONC.S.F05 && NDOCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F05 + PICS: " !NDOCONC.S.F05 && !NDOCONC.S.F00" response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && NDOCONC.S.A0007 && NDOCONC.S.F00 + PICS: NDOCONC.S.A0007 && NDOCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when NDOCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && !NDOCONC.S.A0007 + PICS: " !NDOCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && NDOCONC.S.F00 + PICS: NDOCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when NDOCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && !NDOCONC.S.F00 + PICS: " !NDOCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && NDOCONC.S.F04 + PICS: NDOCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when NDOCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && !NDOCONC.S.F04 + PICS: " !NDOCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && NDOCONC.S.F05 + PICS: NDOCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: NDOCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && !NDOCONC.S.F05 + PICS: " !NDOCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && NDOCONC.S.F01 + PICS: NDOCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: NDOCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && !NDOCONC.S.F01 + PICS: " !NDOCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: NDOCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: NDOCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml deleted file mode 100644 index 92d62439f7e8f0..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 28.2.2. [TC-OCC-2.2] Attributes with client as DUT - -PICS: - - OCC.C - -config: - nodeId: 0x12344321 - cluster: "Occupancy Sensing" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads from the TH the (0x0000) Occupancy attribute" - PICS: OCC.C.A0000 - wait: "readAttribute" - attribute: "Occupancy" - - - label: "DUT reads from the TH the (0x0001) OccupancySensorType attribute" - PICS: OCC.C.A0001 - wait: "readAttribute" - attribute: "OccupancySensorType" - - - label: - "DUT reads from the TH the (0x0002) OccupancySensorTypeBitmap - attribute" - PICS: OCC.C.A0002 - wait: "readAttribute" - attribute: "OccupancySensorTypeBitmap" - - - label: - "DUT reads from the TH the (0x0010) PIROccupiedToUnoccupiedDelay - optional attribute" - PICS: OCC.C.A0010 - wait: "readAttribute" - attribute: "PIROccupiedToUnoccupiedDelay" - - - label: - "DUT reads from the TH the (0x0011) PIRUnoccupiedToOccupiedDelay - optional attribute" - PICS: OCC.C.A0011 - wait: "readAttribute" - attribute: "PIRUnoccupiedToOccupiedDelay" - - - label: - "DUT reads from the TH the (0x0012) PIRUnoccupiedToOccupiedThreshold - optional attribute" - PICS: OCC.C.A0012 - wait: "readAttribute" - attribute: "PIRUnoccupiedToOccupiedThreshold" - - - label: - "DUT reads from the TH the (0x0020) - UltrasonicOccupiedToUnoccupiedDelay optional attribute" - PICS: OCC.C.A0020 - wait: "readAttribute" - attribute: "UltrasonicOccupiedToUnoccupiedDelay" - - - label: - "DUT reads from the TH the (0x0021) - UltrasonicUnoccupiedToOccupiedDelay optional attribute" - PICS: OCC.C.A0021 - wait: "readAttribute" - attribute: "UltrasonicUnoccupiedToOccupiedDelay" - - - label: - "DUT reads from the TH the (0x0022) - UltrasonicUnoccupiedToOccupiedThreshold optional attribute" - PICS: OCC.C.A0022 - wait: "readAttribute" - attribute: "UltrasonicUnoccupiedToOccupiedThreshold" - - - label: - "DUT reads from the TH the (0x0030) - PhysicalContactOccupiedToUnoccupiedDelay optional attribute" - PICS: OCC.C.A0030 - wait: "readAttribute" - attribute: "PhysicalContactOccupiedToUnoccupiedDelay" - - - label: - "DUT reads from the TH the (0x0031) - PhysicalContactUnoccupiedToOccupiedDelay optional attribute" - PICS: OCC.C.A0031 - wait: "readAttribute" - attribute: "PhysicalContactUnoccupiedToOccupiedDelay" - - - label: - "DUT reads from the TH the (0x0032) - PhysicalContactUnoccupiedToOccupiedThreshold optional attribute" - PICS: OCC.C.A0032 - wait: "readAttribute" - attribute: "PhysicalContactUnoccupiedToOccupiedThreshold" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml index 3417f29ea9fe32..03d37bcd79bff2 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml @@ -22,7 +22,7 @@ PICS: config: nodeId: 0x12344321 cluster: "Occupancy Sensing" - endpoint: 0 + endpoint: 1 tests: #- label: "Wait for the device to be commissioned" diff --git a/src/app/tests/suites/certification/Test_TC_OO_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_OO_3_1_Simulated.yaml deleted file mode 100644 index e57e5b424496a8..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OO_3_1_Simulated.yaml +++ /dev/null @@ -1,374 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 3.3.1. [TC-OO-3.1] Attributes with client as DUT - -PICS: - - OO.C - - OO.C.AM-READ - - OO.C.AO-READ - - OO.C.AM-WRITE - - OO.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "On/Off" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute OnOff" - wait: "readAttribute" - attribute: "OnOff" - - - label: "Read attribute GlobalSceneControl" - wait: "readAttribute" - attribute: "GlobalSceneControl" - - - label: "Read attribute OnTime" - wait: "readAttribute" - attribute: "OnTime" - - - label: "Read attribute OffWaitTime" - wait: "readAttribute" - attribute: "OffWaitTime" - - - label: "Read attribute StartUpOnOff" - wait: "readAttribute" - attribute: "StartUpOnOff" - - - label: "Write attribute OnTime" - wait: "writeAttribute" - attribute: "OnTime" - arguments: - value: - - - label: "Write attribute OffWaitTime" - wait: "writeAttribute" - attribute: "OffWaitTime" - arguments: - value: - - - label: "Write attribute StartUpOnOff" - wait: "writeAttribute" - attribute: "StartUpOnOff" - arguments: - value: - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool onoff read attribute-list 1 1 - - Verify the " attribute-list response" on the TH (all-cluster-minimal-app) log: - - [1676891564.236044][13681:13681] CHIP:DMG: } - [1676891564.236047][13681:13681] CHIP:DMG: - [1676891564.236099][13681:13681] CHIP:DMG: ReportDataMessage = - [1676891564.236103][13681:13681] CHIP:DMG: { - [1676891564.236105][13681:13681] CHIP:DMG: AttributeReportIBs = - [1676891564.236111][13681:13681] CHIP:DMG: [ - [1676891564.236114][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236120][13681:13681] CHIP:DMG: { - [1676891564.236123][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236127][13681:13681] CHIP:DMG: { - [1676891564.236131][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236135][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236139][13681:13681] CHIP:DMG: { - [1676891564.236144][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236148][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236153][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236157][13681:13681] CHIP:DMG: } - [1676891564.236162][13681:13681] CHIP:DMG: - [1676891564.236166][13681:13681] CHIP:DMG: Data = [ - [1676891564.236170][13681:13681] CHIP:DMG: - [1676891564.236175][13681:13681] CHIP:DMG: ], - [1676891564.236179][13681:13681] CHIP:DMG: }, - [1676891564.236184][13681:13681] CHIP:DMG: - [1676891564.236188][13681:13681] CHIP:DMG: }, - [1676891564.236195][13681:13681] CHIP:DMG: - [1676891564.236199][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236205][13681:13681] CHIP:DMG: { - [1676891564.236208][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236212][13681:13681] CHIP:DMG: { - [1676891564.236216][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236220][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236225][13681:13681] CHIP:DMG: { - [1676891564.236229][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236233][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236238][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236243][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236247][13681:13681] CHIP:DMG: } - [1676891564.236252][13681:13681] CHIP:DMG: - [1676891564.236257][13681:13681] CHIP:DMG: Data = 0, - [1676891564.236260][13681:13681] CHIP:DMG: }, - [1676891564.236266][13681:13681] CHIP:DMG: - [1676891564.236269][13681:13681] CHIP:DMG: }, - [1676891564.236277][13681:13681] CHIP:DMG: - [1676891564.236280][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236286][13681:13681] CHIP:DMG: { - [1676891564.236290][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236294][13681:13681] CHIP:DMG: { - [1676891564.236299][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236306][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236314][13681:13681] CHIP:DMG: { - [1676891564.236321][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236330][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236337][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236344][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236348][13681:13681] CHIP:DMG: } - [1676891564.236354][13681:13681] CHIP:DMG: - [1676891564.236358][13681:13681] CHIP:DMG: Data = 65528, - [1676891564.236362][13681:13681] CHIP:DMG: }, - [1676891564.236367][13681:13681] CHIP:DMG: - [1676891564.236372][13681:13681] CHIP:DMG: }, - [1676891564.236380][13681:13681] CHIP:DMG: - [1676891564.236384][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236389][13681:13681] CHIP:DMG: { - [1676891564.236393][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236400][13681:13681] CHIP:DMG: { - [1676891564.236407][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236414][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236421][13681:13681] CHIP:DMG: { - [1676891564.236427][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236433][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236439][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236445][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236450][13681:13681] CHIP:DMG: } - [1676891564.236457][13681:13681] CHIP:DMG: - [1676891564.236463][13681:13681] CHIP:DMG: Data = 65529, - [1676891564.236468][13681:13681] CHIP:DMG: }, - [1676891564.236475][13681:13681] CHIP:DMG: - [1676891564.236480][13681:13681] CHIP:DMG: }, - [1676891564.236491][13681:13681] CHIP:DMG: - [1676891564.236495][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236503][13681:13681] CHIP:DMG: { - [1676891564.236507][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236513][13681:13681] CHIP:DMG: { - [1676891564.236518][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236523][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236529][13681:13681] CHIP:DMG: { - [1676891564.236534][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236540][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236546][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236551][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236557][13681:13681] CHIP:DMG: } - [1676891564.236563][13681:13681] CHIP:DMG: - [1676891564.236569][13681:13681] CHIP:DMG: Data = 65530, - [1676891564.236574][13681:13681] CHIP:DMG: }, - [1676891564.236581][13681:13681] CHIP:DMG: - [1676891564.236586][13681:13681] CHIP:DMG: }, - [1676891564.236596][13681:13681] CHIP:DMG: - [1676891564.236601][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236609][13681:13681] CHIP:DMG: { - [1676891564.236614][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236619][13681:13681] CHIP:DMG: { - [1676891564.236624][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236629][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236635][13681:13681] CHIP:DMG: { - [1676891564.236640][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236646][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236652][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236658][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236663][13681:13681] CHIP:DMG: } - [1676891564.236670][13681:13681] CHIP:DMG: - [1676891564.236675][13681:13681] CHIP:DMG: Data = 65531, - [1676891564.236681][13681:13681] CHIP:DMG: }, - [1676891564.236688][13681:13681] CHIP:DMG: - [1676891564.236693][13681:13681] CHIP:DMG: }, - [1676891564.236706][13681:13681] CHIP:DMG: - [1676891564.236711][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236720][13681:13681] CHIP:DMG: { - [1676891564.236728][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236736][13681:13681] CHIP:DMG: { - [1676891564.236743][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236749][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236757][13681:13681] CHIP:DMG: { - [1676891564.236765][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236772][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236780][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236787][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236793][13681:13681] CHIP:DMG: } - [1676891564.236802][13681:13681] CHIP:DMG: - [1676891564.236810][13681:13681] CHIP:DMG: Data = 65532, - [1676891564.236816][13681:13681] CHIP:DMG: }, - [1676891564.236825][13681:13681] CHIP:DMG: - [1676891564.236832][13681:13681] CHIP:DMG: }, - [1676891564.236846][13681:13681] CHIP:DMG: - [1676891564.236851][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236858][13681:13681] CHIP:DMG: { - [1676891564.236863][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236868][13681:13681] CHIP:DMG: { - [1676891564.236875][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236883][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236890][13681:13681] CHIP:DMG: { - [1676891564.236897][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236903][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236911][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236918][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236926][13681:13681] CHIP:DMG: } - [1676891564.236936][13681:13681] CHIP:DMG: - [1676891564.236942][13681:13681] CHIP:DMG: Data = 65533, - [1676891564.236947][13681:13681] CHIP:DMG: }, - [1676891564.236955][13681:13681] CHIP:DMG: - [1676891564.236959][13681:13681] CHIP:DMG: }, - [1676891564.236967][13681:13681] CHIP:DMG: - [1676891564.236971][13681:13681] CHIP:DMG: ], - [1676891564.236999][13681:13681] CHIP:DMG: - [1676891564.237003][13681:13681] CHIP:DMG: SuppressResponse = true, - [1676891564.237008][13681:13681] CHIP:DMG: InteractionModelRevision = 1 - [1676891564.237012][13681:13681] CHIP:DMG: } - - - - ./chip-tool onoff read feature-map 1 1 - - Verify the " feature-map response" on the TH (all-cluster-minimal-app) log: - - [1666943673.928358][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943673.928360][12769:12769] CHIP:DMG: { - [1666943673.928362][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943673.928367][12769:12769] CHIP:DMG: [ - [1666943673.928369][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943673.928374][12769:12769] CHIP:DMG: { - [1666943673.928376][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943673.928379][12769:12769] CHIP:DMG: { - [1666943673.928382][12769:12769] CHIP:DMG: DataVersion = 0xfcb17157, - [1666943673.928385][12769:12769] CHIP:DMG: AttributePathIB = - [1666943673.928388][12769:12769] CHIP:DMG: { - [1666943673.928392][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943673.928395][12769:12769] CHIP:DMG: Cluster = 0x6, - [1666943673.928398][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666943673.928401][12769:12769] CHIP:DMG: } - [1666943673.928404][12769:12769] CHIP:DMG: - [1666943673.928407][12769:12769] CHIP:DMG: Data = 0, - [1666943673.928410][12769:12769] CHIP:DMG: }, - [1666943673.928413][12769:12769] CHIP:DMG: - [1666943673.928416][12769:12769] CHIP:DMG: }, - [1666943673.928419][12769:12769] CHIP:DMG: - [1666943673.928422][12769:12769] CHIP:DMG: ], - [1666943673.928425][12769:12769] CHIP:DMG: - [1666943673.928428][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943673.928430][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943673.928432][12769:12769] CHIP:DMG: } - - - ./chip-tool onoff read on-off 1 1 - - Verify the " on-off response" on the TH (all-cluster-minimal-app) log: - - [1666943688.655282][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943688.655285][12769:12769] CHIP:DMG: { - [1666943688.655286][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943688.655290][12769:12769] CHIP:DMG: [ - [1666943688.655291][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943688.655294][12769:12769] CHIP:DMG: { - [1666943688.655296][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943688.655299][12769:12769] CHIP:DMG: { - [1666943688.655301][12769:12769] CHIP:DMG: DataVersion = 0xfcb17157, - [1666943688.655303][12769:12769] CHIP:DMG: AttributePathIB = - [1666943688.655305][12769:12769] CHIP:DMG: { - [1666943688.655307][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943688.655309][12769:12769] CHIP:DMG: Cluster = 0x6, - [1666943688.655312][12769:12769] CHIP:DMG: Attribute = 0x0000_0000, - [1666943688.655314][12769:12769] CHIP:DMG: } - [1666943688.655316][12769:12769] CHIP:DMG: - [1666943688.655319][12769:12769] CHIP:DMG: Data = false, - [1666943688.655321][12769:12769] CHIP:DMG: }, - [1666943688.655323][12769:12769] CHIP:DMG: - [1666943688.655325][12769:12769] CHIP:DMG: }, - [1666943688.655328][12769:12769] CHIP:DMG: - [1666943688.655330][12769:12769] CHIP:DMG: ], - [1666943688.655333][12769:12769] CHIP:DMG: - [1666943688.655335][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943688.655336][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943688.655338][12769:12769] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - ./chip-tool onoff read global-scene-control 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool onoff read on-time 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool onoff read off-wait-time 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool onoff read start-up-on-off 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - ./chip-tool onoff write on-time 1 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool onoff write off-wait-time 22 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool onoff write start-up-on-off 2 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml index 576f0c51f504dc..efe99c934acb11 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verifications: | + While verifying below test case we will get 0 and null value for few attributes, as per spec 0 and null value is default for those attributes. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)" diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml index 0eec0cd3ec0763..fb0fc296d816cc 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verifications: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)" diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml index a4fd1a62876684..d0e4cf49ff83b8 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verifications: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)" diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml index 039d0bfbf8556b..7e225c5f789109 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml @@ -32,7 +32,7 @@ tests: - label: "Step 2: Set up a subscription to the OperationalError event" PICS: OPSTATE.S.E00 verification: | - + ./chip-tool operationalstate subscribe operational-error 5 15 1 1 disabled: true - label: @@ -40,15 +40,18 @@ tests: OperationalError event" PICS: OPSTATE.S.E00 verification: | - Receive an Notify event containing an ErrorState struct populated as follows: - An ErrorStateID that shall contain an enum 8. Verify the ErrorStateID is a defined error (NoError(0x00), UnableToStartOrResume(0x01), UnableToCompleteOperation(0x02), CommandInvalidInState(0x03)) or in the range 0x8000 to 0xBFFF. - If the ErrorStateID is in the range 0x8000 to 0xBFFF, then an ErrorStateLabel that is a human readable string. - If the ErrorStateId is not in the range 0x8000 to 0xBFFF then no ErrorStateLabel shall be present. - Optionally an ErrorStateDetails. If present, this shall be a human readable string. + After the subscription interval via the TH (chip-tool) verify: + - reception of an OperationalError Event + - ErrorStateID is a defined error + - If the ErrorStateID is manufacturer specific, inclusion of an ErrorStateLabel, not present otherwise + - Optionally an ErrorStateDetails disabled: true - label: "Step 4: TH reads from the DUT the OperationalState attribute" PICS: OPSTATE.S.A0004 verification: | - Verify that the DUT response contains an enum8 set to Error(0x03). + ./chip-tool operationalstate read operational-state 1 1 + + Via the TH (chip-tool), verify: + - the response has an OperationalStateID field that is set to 0x03 (Error) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml index ea9734d4ef9a4c..3cc04f15d736cf 100644 --- a/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: OZCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !OZCONC.S.F00 && !OZCONC.S.F01 && !OZCONC.S.F02 && !OZCONC.S.F03 && + !OZCONC.S.F04 && !OZCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F00 + PICS: OZCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F00 + PICS: " !OZCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F01 + PICS: OZCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F01 + PICS: " !OZCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F02 + PICS: OZCONC.S.F02 && OZCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F02 + PICS: " !OZCONC.S.F02 && !OZCONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F03 + PICS: OZCONC.S.F03 && OZCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F03 + PICS: " !OZCONC.S.F03 && !OZCONC.S.F01 " response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F04 + PICS: OZCONC.S.F04 && OZCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F04 + PICS: " !OZCONC.S.F04 && !OZCONC.S.F00" response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F05 + PICS: OZCONC.S.F05 && OZCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F05 + PICS: " !OZCONC.S.F05 && !OZCONC.S.F00 " response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && OZCONC.S.A0007 && OZCONC.S.F00 + PICS: OZCONC.S.A0007 && OZCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when OZCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && !OZCONC.S.A0007 + PICS: " !OZCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && OZCONC.S.F00 + PICS: OZCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when OZCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && !OZCONC.S.F00 + PICS: " !OZCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && OZCONC.S.F04 + PICS: OZCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when OZCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && !OZCONC.S.F04 + PICS: " !OZCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && OZCONC.S.F05 + PICS: OZCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: OZCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && !OZCONC.S.F05 + PICS: " !OZCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && OZCONC.S.F01 + PICS: OZCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: OZCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && !OZCONC.S.F01 + PICS: " !OZCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: OZCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: OZCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PCC_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_PCC_3_1_Simulated.yaml deleted file mode 100644 index 3eb8f82c0146ff..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_PCC_3_1_Simulated.yaml +++ /dev/null @@ -1,494 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 15.1.1. [TC-PCC-3.1] Global attributes with server as DUT - -PICS: - - PCC.C - - PCC.C.AM-READ - - PCC.C.AO-READ - - PCC.C.AM-WRITE - - PCC.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Pump Configuration and Control" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - #Read Mandatory attributes - - label: "Read attribute MaxPressure" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "MaxPressure" - - - label: "Read attribute MaxSpeed" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "MaxSpeed" - - - label: "Read attribute MaxFlow" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "MaxFlow" - - - label: "Read attribute EffectiveOperationMode" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "EffectiveOperationMode" - - - label: "Read attribute EffectiveControlMode" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "EffectiveControlMode" - - - label: "Read attribute Capacity" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "Capacity" - - - label: "Read attribute OperationMode" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "OperationMode" - - #Read Optional attributes - - label: "Read attribute MinConstPressure" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MinConstPressure" - - - label: "Read attribute MaxConstPressure" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MaxConstPressure" - - - label: "Read attribute MinCompPressure" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MinCompPressure" - - - label: "Read attribute MaxCompPressure" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MaxCompPressure" - - - label: "Read attribute MinConstSpeed" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MinConstSpeed" - - - label: "Read attribute MaxConstSpeed" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MaxConstSpeed" - - - label: "Read attribute MinConstFlow" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MinConstFlow" - - - label: "Read attribute MaxConstFlow" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MaxConstFlow" - - - label: "Read attribute MinConstTemp" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MinConstTemp" - - - label: "Read attribute MaxConstTemp" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MaxConstTemp" - - - label: "Read attribute PumpStatus" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "PumpStatus" - - - label: "Read attribute Speed" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "Speed" - - - label: "Read attribute LifetimeRunningHours" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "LifetimeRunningHours" - - - label: "Read attribute Power" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "Power" - - - label: "Read attribute LifetimeEnergyConsumed" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "LifetimeEnergyConsumed" - - - label: "Read attribute ControlMode" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "ControlMode" - - #Write attributes - - label: "Write attribute LifetimeRunningHours" - PICS: PCC.C.AO-WRITE - wait: "writeAttribute" - attribute: "LifetimeRunningHours" - arguments: - value: - - - label: "Write attribute LifetimeEnergyConsumed" - PICS: PCC.C.AO-WRITE - wait: "writeAttribute" - attribute: "LifetimeEnergyConsumed" - arguments: - value: - - - label: "Write attribute OperationMode" - PICS: PCC.C.AO-WRITE - wait: "writeAttribute" - attribute: "OperationMode" - arguments: - value: - - - label: "Write attribute ControlMode" - PICS: PCC.C.AO-WRITE - wait: "writeAttribute" - attribute: "ControlMode" - arguments: - value: - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool pumpconfigurationandcontrol read attribute-list 1 1 - - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1660745892.540246][3657:3657] CHIP:IM: Received Read request - [1660745892.540323][3657:3657] CHIP:DMG: ReadRequestMessage = - [1660745892.540346][3657:3657] CHIP:DMG: { - [1660745892.540364][3657:3657] CHIP:DMG: AttributePathIBs = - [1660745892.540401][3657:3657] CHIP:DMG: [ - [1660745892.540422][3657:3657] CHIP:DMG: AttributePathIB = - [1660745892.540452][3657:3657] CHIP:DMG: { - [1660745892.540487][3657:3657] CHIP:DMG: Endpoint = 0x1, - [1660745892.540517][3657:3657] CHIP:DMG: Cluster = 0x200, - [1660745892.540556][3657:3657] CHIP:DMG: Attribute = 0x0000_FFFB, - [1660745892.540582][3657:3657] CHIP:DMG: } - [1660745892.540616][3657:3657] CHIP:DMG: - [1660745892.540638][3657:3657] CHIP:DMG: ], - [1660745892.540673][3657:3657] CHIP:DMG: - [1660745892.540696][3657:3657] CHIP:DMG: isFabricFiltered = true, - [1660745892.540726][3657:3657] CHIP:DMG: InteractionModelRevision = 1 - [1660745892.540747][3657:3657] CHIP:DMG: }, - [1660745892.540821][3657:3657] CHIP:DMG: IM RH moving to [GeneratingReports] - [1660745892.540929][3657:3657] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1660745892.540954][3657:3657] CHIP:DMG: Cluster 200, Attribute fffb is dirty - [1660745892.540982][3657:3657] CHIP:DMG: Reading attribute: Cluster=0x0000_0200 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - - ./chip-tool pumpconfigurationandcontrol read feature-map 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1660745929.334567][3657:3657] CHIP:IM: Received Read request - [1660745929.334641][3657:3657] CHIP:DMG: ReadRequestMessage = - [1660745929.334677][3657:3657] CHIP:DMG: { - [1660745929.334696][3657:3657] CHIP:DMG: AttributePathIBs = - [1660745929.334728][3657:3657] CHIP:DMG: [ - [1660745929.334750][3657:3657] CHIP:DMG: AttributePathIB = - [1660745929.334778][3657:3657] CHIP:DMG: { - [1660745929.334814][3657:3657] CHIP:DMG: Endpoint = 0x1, - [1660745929.334853][3657:3657] CHIP:DMG: Cluster = 0x200, - [1660745929.334884][3657:3657] CHIP:DMG: Attribute = 0x0000_FFFC, - [1660745929.334920][3657:3657] CHIP:DMG: } - [1660745929.334947][3657:3657] CHIP:DMG: - [1660745929.334978][3657:3657] CHIP:DMG: ], - [1660745929.335006][3657:3657] CHIP:DMG: - [1660745929.335037][3657:3657] CHIP:DMG: isFabricFiltered = true, - [1660745929.335059][3657:3657] CHIP:DMG: InteractionModelRevision = 1 - [1660745929.335079][3657:3657] CHIP:DMG: }, - [1660745929.335155][3657:3657] CHIP:DMG: IM RH moving to [GeneratingReports] - [1660745929.335256][3657:3657] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1660745929.335291][3657:3657] CHIP:DMG: Cluster 200, Attribute fffc is dirty - [1660745929.335311][3657:3657] CHIP:DMG: Reading attribute: Cluster=0x0000_0200 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - - - - ./chip-tool pumpconfigurationandcontrol read max-pressure 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651148412.273866][2336:2336] CHIP:IM: Received Read request - [1651148412.273922][2336:2336] CHIP:DMG: ReadRequestMessage = - [1651148412.273950][2336:2336] CHIP:DMG: { - [1651148412.273972][2336:2336] CHIP:DMG: AttributePathIBs = - [1651148412.273999][2336:2336] CHIP:DMG: [ - [1651148412.274024][2336:2336] CHIP:DMG: AttributePathIB = - [1651148412.274063][2336:2336] CHIP:DMG: { - [1651148412.274093][2336:2336] CHIP:DMG: Endpoint = 0x1, - [1651148412.274126][2336:2336] CHIP:DMG: Cluster = 0x200, - [1651148412.274156][2336:2336] CHIP:DMG: Attribute = 0x0000_0000, - [1651148412.274186][2336:2336] CHIP:DMG: } - [1651148412.274216][2336:2336] CHIP:DMG: - [1651148412.274242][2336:2336] CHIP:DMG: ], - [1651148412.274271][2336:2336] CHIP:DMG: - [1651148412.274298][2336:2336] CHIP:DMG: isFabricFiltered = true, - [1651148412.274325][2336:2336] CHIP:DMG: InteractionModelRevision = 1 - [1651148412.274349][2336:2336] CHIP:DMG: }, - [1651148412.274424][2336:2336] CHIP:DMG: IM RH moving to [GeneratingReports] - - ./chip-tool pumpconfigurationandcontrol read max-speed 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651148440.471321][2336:2336] CHIP:IM: Received Read request - [1651148440.471389][2336:2336] CHIP:DMG: ReadRequestMessage = - [1651148440.471416][2336:2336] CHIP:DMG: { - [1651148440.471438][2336:2336] CHIP:DMG: AttributePathIBs = - [1651148440.471481][2336:2336] CHIP:DMG: [ - [1651148440.471507][2336:2336] CHIP:DMG: AttributePathIB = - [1651148440.471546][2336:2336] CHIP:DMG: { - [1651148440.471571][2336:2336] CHIP:DMG: Endpoint = 0x1, - [1651148440.471609][2336:2336] CHIP:DMG: Cluster = 0x200, - [1651148440.471642][2336:2336] CHIP:DMG: Attribute = 0x0000_0001, - [1651148440.471681][2336:2336] CHIP:DMG: } - [1651148440.471719][2336:2336] CHIP:DMG: - [1651148440.471745][2336:2336] CHIP:DMG: ], - [1651148440.471770][2336:2336] CHIP:DMG: - [1651148440.471806][2336:2336] CHIP:DMG: isFabricFiltered = true, - [1651148440.471831][2336:2336] CHIP:DMG: InteractionModelRevision = 1 - [1651148440.471867][2336:2336] CHIP:DMG: }, - [1651148440.471947][2336:2336] CHIP:DMG: IM RH moving to [GeneratingReports] - [1651148440.472042][2336:2336] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - - ./chip-tool pumpconfigurationandcontrol read max-flow 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651148472.518933][2336:2336] CHIP:IM: Received Read request - [1651148472.518993][2336:2336] CHIP:DMG: ReadRequestMessage = - [1651148472.519023][2336:2336] CHIP:DMG: { - [1651148472.519071][2336:2336] CHIP:DMG: AttributePathIBs = - [1651148472.519104][2336:2336] CHIP:DMG: [ - [1651148472.519163][2336:2336] CHIP:DMG: AttributePathIB = - [1651148472.519218][2336:2336] CHIP:DMG: { - [1651148472.519286][2336:2336] CHIP:DMG: Endpoint = 0x1, - [1651148472.519328][2336:2336] CHIP:DMG: Cluster = 0x200, - [1651148472.519364][2336:2336] CHIP:DMG: Attribute = 0x0000_0002, - [1651148472.519400][2336:2336] CHIP:DMG: } - [1651148472.519459][2336:2336] CHIP:DMG: - [1651148472.519521][2336:2336] CHIP:DMG: ], - [1651148472.519555][2336:2336] CHIP:DMG: - [1651148472.519584][2336:2336] CHIP:DMG: isFabricFiltered = true, - [1651148472.519666][2336:2336] CHIP:DMG: InteractionModelRevision = 1 - [1651148472.519695][2336:2336] CHIP:DMG: }, - [1651148472.519802][2336:2336] CHIP:DMG: IM RH moving to [GeneratingReports] - [1651148472.519971][2336:2336] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - - ./chip-tool pumpconfigurationandcontrol read effective-operation-mode 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - - [1651570515.206834][9246:9246] CHIP:IM: Received Read request - [1651570515.206917][9246:9246] CHIP:DMG: ReadRequestMessage = - [1651570515.206966][9246:9246] CHIP:DMG: { - [1651570515.207006][9246:9246] CHIP:DMG: AttributePathIBs = - [1651570515.207053][9246:9246] CHIP:DMG: [ - [1651570515.207098][9246:9246] CHIP:DMG: AttributePathIB = - [1651570515.207154][9246:9246] CHIP:DMG: { - [1651570515.207210][9246:9246] CHIP:DMG: Endpoint = 0x1, - [1651570515.207265][9246:9246] CHIP:DMG: Cluster = 0x200, - [1651570515.207322][9246:9246] CHIP:DMG: Attribute = 0x0000_0011, - [1651570515.207381][9246:9246] CHIP:DMG: } - [1651570515.207436][9246:9246] CHIP:DMG: - [1651570515.207483][9246:9246] CHIP:DMG: ], - [1651570515.207535][9246:9246] CHIP:DMG: - [1651570515.207587][9246:9246] CHIP:DMG: isFabricFiltered = true, - [1651570515.207634][9246:9246] CHIP:DMG: InteractionModelRevision = 1 - [1651570515.207677][9246:9246] CHIP:DMG: } - - ./chip-tool pumpconfigurationandcontrol read effective-control-mode 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651570975.559213][9246:9246] CHIP:IM: Received Read request - [1651570975.559268][9246:9246] CHIP:DMG: ReadRequestMessage = - [1651570975.559295][9246:9246] CHIP:DMG: { - [1651570975.559317][9246:9246] CHIP:DMG: AttributePathIBs = - [1651570975.559343][9246:9246] CHIP:DMG: [ - [1651570975.559367][9246:9246] CHIP:DMG: AttributePathIB = - [1651570975.559400][9246:9246] CHIP:DMG: { - [1651570975.559428][9246:9246] CHIP:DMG: Endpoint = 0x1, - [1651570975.559465][9246:9246] CHIP:DMG: Cluster = 0x200, - [1651570975.559602][9246:9246] CHIP:DMG: Attribute = 0x0000_0012, - [1651570975.559626][9246:9246] CHIP:DMG: } - [1651570975.559655][9246:9246] CHIP:DMG: - [1651570975.559681][9246:9246] CHIP:DMG: ], - [1651570975.559710][9246:9246] CHIP:DMG: - - ./chip-tool pumpconfigurationandcontrol read capacity 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651571009.295069][9246:9246] CHIP:IM: Received Read request - [1651571009.295158][9246:9246] CHIP:DMG: ReadRequestMessage = - [1651571009.295203][9246:9246] CHIP:DMG: { - [1651571009.295244][9246:9246] CHIP:DMG: AttributePathIBs = - [1651571009.295293][9246:9246] CHIP:DMG: [ - [1651571009.295339][9246:9246] CHIP:DMG: AttributePathIB = - [1651571009.295387][9246:9246] CHIP:DMG: { - [1651571009.295438][9246:9246] CHIP:DMG: Endpoint = 0x1, - [1651571009.295493][9246:9246] CHIP:DMG: Cluster = 0x200, - [1651571009.295548][9246:9246] CHIP:DMG: Attribute = 0x0000_0013, - [1651571009.295597][9246:9246] CHIP:DMG: } - [1651571009.295649][9246:9246] CHIP:DMG: - [1651571009.295696][9246:9246] CHIP:DMG: ], - [1651571009.295747][9246:9246] CHIP:DMG: - - ./chip-tool pumpconfigurationandcontrol read operation-mode 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651571334.617100][9337:9337] CHIP:IM: Received Read request - [1651571334.617155][9337:9337] CHIP:DMG: ReadRequestMessage = - [1651571334.617181][9337:9337] CHIP:DMG: { - [1651571334.617213][9337:9337] CHIP:DMG: AttributePathIBs = - [1651571334.617250][9337:9337] CHIP:DMG: [ - [1651571334.617291][9337:9337] CHIP:DMG: AttributePathIB = - [1651571334.617338][9337:9337] CHIP:DMG: { - [1651571334.617368][9337:9337] CHIP:DMG: Endpoint = 0x1, - [1651571334.617404][9337:9337] CHIP:DMG: Cluster = 0x200, - [1651571334.617433][9337:9337] CHIP:DMG: Attribute = 0x0000_0020, - [1651571334.617467][9337:9337] CHIP:DMG: } - [1651571334.617499][9337:9337] CHIP:DMG: - [1651571334.617537][9337:9337] CHIP:DMG: ], - [1651571334.617567][9337:9337] CHIP:DMG: " - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - ./chip-tool pumpconfigurationandcontrol read min-const-pressure 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read max-const-pressure 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read min-comp-pressure 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read max-comp-pressure 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read min-const-speed 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read max-const-speed 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read min-const-flow 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - ./chip-tool pumpconfigurationandcontrol read min-const-flow 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read max-const-flow 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read min-const-temp 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read max-const-temp 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read pump-status 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read speed 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read lifetime-running-hours 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read power 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read lifetime-energy-consumed 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read control-mode 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - ./chip-tool pumpconfigurationandcontrol write control-mode 0 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol write lifetime-running-hours 1 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol write lifetime-energy-consumed 1 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml index 11d21ffafccd24..e514d3e4a5ffc3 100644 --- a/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: PMHCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !PMHCONC.S.F00 && !PMHCONC.S.F01 && !PMHCONC.S.F02 && !PMHCONC.S.F03 + && !PMHCONC.S.F04 && !PMHCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F00 + PICS: PMHCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F00 + PICS: " !PMHCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F01 + PICS: PMHCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F01 + PICS: " !PMHCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F02 + PICS: PMHCONC.S.F02 && PMHCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F02 + PICS: " !PMHCONC.S.F02 && !PMHCONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F03 + PICS: PMHCONC.S.F03 && PMHCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F03 + PICS: " !PMHCONC.S.F03 && !PMHCONC.S.F01 " response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F04 + PICS: PMHCONC.S.F04 && PMHCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F04 + PICS: " !PMHCONC.S.F04 && PMHCONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F05 + PICS: PMHCONC.S.F05 && PMHCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F05 + PICS: " !PMHCONC.S.F05 && !PMHCONC.S.F00" response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && PMHCONC.S.A0007 && PMHCONC.S.F00 + PICS: PMHCONC.S.A0007 && PMHCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when PMHCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && !PMHCONC.S.A0007 + PICS: " !PMHCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && PMHCONC.S.F00 + PICS: PMHCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when PMHCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && !PMHCONC.S.F00 + PICS: " !PMHCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && PMHCONC.S.F04 + PICS: PMHCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when PMHCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && !PMHCONC.S.F04 + PICS: " !PMHCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && PMHCONC.S.F05 + PICS: PMHCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: PMHCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && !PMHCONC.S.F05 + PICS: " !PMHCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && PMHCONC.S.F01 + PICS: PMHCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: PMHCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && !PMHCONC.S.F01 + PICS: " !PMHCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: PMHCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: PMHCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml index 1f453a6665ff74..7e1a627a869fde 100644 --- a/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml @@ -34,7 +34,6 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: PMICONC.S.Afffd response: value: 3 constraints: @@ -44,21 +43,22 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !PMICONC.S.F00 && !PMICONC.S.F01 && !PMICONC.S.F02 && !PMICONC.S.F03 + && !PMICONC.S.F04 && !PMICONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F00 + PICS: PMICONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +69,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F00 + PICS: " !PMICONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +80,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F01 + PICS: PMICONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +91,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F01 + PICS: " !PMICONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +102,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F02 + PICS: PMICONC.S.F02 && PMICONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +113,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F02 + PICS: " !PMICONC.S.F02 && !PMICONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +124,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F03 + PICS: PMICONC.S.F03 && PMICONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +135,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F03 + PICS: " !PMICONC.S.F03 && !PMICONC.S.F01" response: constraints: type: bitmap32 @@ -146,7 +146,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F04 + PICS: PMICONC.S.F04 && PMICONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +157,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F04 + PICS: " !PMICONC.S.F04 && !PMICONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +168,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F05 + PICS: PMICONC.S.F05 && PMICONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +179,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F05 + PICS: " !PMICONC.S.F05 && !PMICONC.S.F00" response: constraints: type: bitmap32 @@ -188,7 +188,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +197,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +206,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && PMICONC.S.A0007 && PMICONC.S.F00 + PICS: PMICONC.S.A0007 && PMICONC.S.F00 response: constraints: type: list @@ -217,7 +217,7 @@ tests: AttributeList when PMICONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && !PMICONC.S.A0007 + PICS: " !PMICONC.S.A0007 " response: constraints: type: list @@ -229,7 +229,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && PMICONC.S.F00 + PICS: PMICONC.S.F00 response: constraints: type: list @@ -241,7 +241,7 @@ tests: AttributeList when PMICONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && !PMICONC.S.F00 + PICS: " !PMICONC.S.F00 " response: constraints: type: list @@ -252,7 +252,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && PMICONC.S.F04 + PICS: PMICONC.S.F04 response: constraints: type: list @@ -263,7 +263,7 @@ tests: excluded from AttributeList when PMICONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && !PMICONC.S.F04 + PICS: " !PMICONC.S.F04 " response: constraints: type: list @@ -274,7 +274,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && PMICONC.S.F05 + PICS: PMICONC.S.F05 response: constraints: type: list @@ -286,7 +286,7 @@ tests: PMICONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && !PMICONC.S.F05 + PICS: " !PMICONC.S.F05 " response: constraints: type: list @@ -297,7 +297,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && PMICONC.S.F01 + PICS: PMICONC.S.F01 response: constraints: type: list @@ -308,7 +308,7 @@ tests: PMICONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && !PMICONC.S.F01 + PICS: " !PMICONC.S.F01 " response: constraints: type: list @@ -317,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +326,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: PMICONC.S.Afff9 response: value: [] constraints: @@ -335,7 +334,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: PMICONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml index cb6e896865502e..6c3ebb0be05870 100644 --- a/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: PMKCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !PMKCONC.S.F00 && !PMKCONC.S.F01 && !PMKCONC.S.F02 && !PMKCONC.S.F03 + && !PMKCONC.S.F04 && !PMKCONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F00 + PICS: PMKCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F00 + PICS: " !PMKCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F01 + PICS: PMKCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F01 + PICS: " !PMKCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F02 + PICS: PMKCONC.S.F02 && PMKCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F02 + PICS: " !PMKCONC.S.F02 && !PMKCONC.S.F01 " response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F03 + PICS: PMKCONC.S.F03 && PMKCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F03 + PICS: " !PMKCONC.S.F03 && !PMKCONC.S.F01" response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F04 + PICS: PMKCONC.S.F04 && PMKCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F04 + PICS: " !PMKCONC.S.F04 && !PMKCONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F05 + PICS: PMKCONC.S.F05 && PMKCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F05 + PICS: " !PMKCONC.S.F05 && !PMKCONC.S.F00" response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && PMKCONC.S.A0007 && PMKCONC.S.F00 + PICS: PMKCONC.S.A0007 && PMKCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when PMKCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && !PMKCONC.S.A0007 + PICS: " !PMKCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && PMKCONC.S.F00 + PICS: PMKCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when PMKCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && !PMKCONC.S.F00 + PICS: " !PMKCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && PMKCONC.S.F04 + PICS: PMKCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when PMKCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && !PMKCONC.S.F04 + PICS: " !PMKCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && PMKCONC.S.F05 + PICS: PMKCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: PMKCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && !PMKCONC.S.F05 + PICS: " !PMKCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && PMKCONC.S.F01 + PICS: PMKCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: PMKCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && !PMKCONC.S.F01 + PICS: " !PMKCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: PMKCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: PMKCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PRS_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_PRS_3_1_Simulated.yaml deleted file mode 100644 index 776359626600fa..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_PRS_3_1_Simulated.yaml +++ /dev/null @@ -1,264 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 34.3.1. [TC-PRS-3.1] Attributes with Client as DUT - -PICS: - - PRS.C - - PRS.C.AM-READ - - PRS.C.AO-READ - - PRS.C.AM-WRITE - - PRS.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Pressure Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: MeasuredValue" - PICS: PRS.C.AM-READ - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute: MinMeasuredValue" - PICS: PRS.C.AM-READ - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute: MaxMeasuredValue" - PICS: PRS.C.AM-READ - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute: Tolerance" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "Tolerance" - - - label: "Read attribute: ScaledValue" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "ScaledValue" - - - label: "Read attribute: MinScaledValue" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "MinScaledValue" - - - label: "Read attribute: MaxScaledValue" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "MaxScaledValue" - - - label: "Read attribute: ScaledTolerance" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "ScaledTolerance" - - - label: "Read attribute: Scale" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "Scale" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again." - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally - - ./chip-tool pressuremeasurement read feature-map 1 1 - - verify the " feature-map response" on the TH (all-cluster-minimal-app) log: - - [1678873303.474810][348369:348369] CHIP:EM: Handling via exchange: 59017r, Delegate: 0x55713c07aca8 - [1678873303.474829][348369:348369] CHIP:IM: Received Read request - [1678873303.474872][348369:348369] CHIP:DMG: ReadRequestMessage = - [1678873303.474880][348369:348369] CHIP:DMG: { - [1678873303.474885][348369:348369] CHIP:DMG: AttributePathIBs = - [1678873303.474894][348369:348369] CHIP:DMG: [ - [1678873303.474900][348369:348369] CHIP:DMG: AttributePathIB = - [1678873303.474908][348369:348369] CHIP:DMG: { - [1678873303.474915][348369:348369] CHIP:DMG: Endpoint = 0x1, - [1678873303.474922][348369:348369] CHIP:DMG: Cluster = 0x403, - [1678873303.474930][348369:348369] CHIP:DMG: Attribute = 0x0000_FFFC, - [1678873303.474936][348369:348369] CHIP:DMG: } - [1678873303.474944][348369:348369] CHIP:DMG: - [1678873303.474950][348369:348369] CHIP:DMG: ], - [1678873303.474959][348369:348369] CHIP:DMG: - [1678873303.474966][348369:348369] CHIP:DMG: isFabricFiltered = true, - [1678873303.474972][348369:348369] CHIP:DMG: InteractionModelRevision = 1 - [1678873303.474978][348369:348369] CHIP:DMG: }, - [1678873303.475012][348369:348369] CHIP:DMG: IM RH moving to [GeneratingReports] - [1678873303.475045][348369:348369] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1678873303.475054][348369:348369] CHIP:DMG: Cluster 403, Attribute fffc is dirty - - ./chip-tool pressuremeasurement read attribute-list 1 1 - - verify the " attribute-list response" on the TH (all-cluster-minimal-app) log: - - [1659606175.282588][7312:7312] CHIP:EM: Handling via exchange: 12368r, Delegate: 0xaaaaad2c4f68 - [1659606175.282635][7312:7312] CHIP:IM: Received Read request - [1659606175.282718][7312:7312] CHIP:DMG: ReadRequestMessage = - [1659606175.282746][7312:7312] CHIP:DMG: { - [1659606175.282768][7312:7312] CHIP:DMG: AttributePathIBs = - [1659606175.282794][7312:7312] CHIP:DMG: [ - [1659606175.282818][7312:7312] CHIP:DMG: AttributePathIB = - [1659606175.282846][7312:7312] CHIP:DMG: { - [1659606175.282874][7312:7312] CHIP:DMG: Endpoint = 0x1, - [1659606175.282910][7312:7312] CHIP:DMG: Cluster = 0x403, - [1659606175.282946][7312:7312] CHIP:DMG: Attribute = 0x0000_FFFB, - [1659606175.282975][7312:7312] CHIP:DMG: } - [1659606175.283004][7312:7312] CHIP:DMG: - [1659606175.283029][7312:7312] CHIP:DMG: ], - [1659606175.283056][7312:7312] CHIP:DMG: - [1659606175.283083][7312:7312] CHIP:DMG: isFabricFiltered = true, - [1659606175.283108][7312:7312] CHIP:DMG: InteractionModelRevision = 1 - [1659606175.283132][7312:7312] CHIP:DMG: }, - [1659606175.283211][7312:7312] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659606175.283312][7312:7312] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659606175.283343][7312:7312] CHIP:DMG: Cluster 403, Attribute fffb is dirty - [1659606175.283364][7312:7312] CHIP:DMG: Reading attribute: Cluster=0x0000_0403 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - - - - - ./chip-tool pressuremeasurement read measured-value 1 1 - - verify the " measured-value response" on the TH (all-cluster-minimal-app) log: - - [1653992317.047323][2347:2347] CHIP:IM: Received Read request - [1653992317.047382][2347:2347] CHIP:DMG: ReadRequestMessage = - [1653992317.047457][2347:2347] CHIP:DMG: { - [1653992317.047480][2347:2347] CHIP:DMG: AttributePathIBs = - [1653992317.047507][2347:2347] CHIP:DMG: [ - [1653992317.047531][2347:2347] CHIP:DMG: AttributePathIB = - [1653992317.047563][2347:2347] CHIP:DMG: { - [1653992317.047592][2347:2347] CHIP:DMG: Endpoint = 0x1, - [1653992317.047657][2347:2347] CHIP:DMG: Cluster = 0x403, - [1653992317.047695][2347:2347] CHIP:DMG: Attribute = 0x0000_0000, - [1653992317.047725][2347:2347] CHIP:DMG: } - [1653992317.047774][2347:2347] CHIP:DMG: - [1653992317.047803][2347:2347] CHIP:DMG: ], - [1653992317.047831][2347:2347] CHIP:DMG: - [1653992317.047859][2347:2347] CHIP:DMG: isFabricFiltered = true, - [1653992317.047884][2347:2347] CHIP:DMG: InteractionModelRevision = 1 - [1653992317.047908][2347:2347] CHIP:DMG: }, - [1653992317.047995][2347:2347] CHIP:DMG: IM RH moving to [GeneratingReports] - - ./chip-tool pressuremeasurement read min-measured-value 1 1 - - verify the " min-measured-value response" on the TH (all-cluster-minimal-app) log: - - [1653992385.759474][2347:2347] CHIP:IM: Received Read request - [1653992385.759533][2347:2347] CHIP:DMG: ReadRequestMessage = - [1653992385.759561][2347:2347] CHIP:DMG: { - [1653992385.759584][2347:2347] CHIP:DMG: AttributePathIBs = - [1653992385.759618][2347:2347] CHIP:DMG: [ - [1653992385.759647][2347:2347] CHIP:DMG: AttributePathIB = - [1653992385.759678][2347:2347] CHIP:DMG: { - [1653992385.759745][2347:2347] CHIP:DMG: Endpoint = 0x1, - [1653992385.759781][2347:2347] CHIP:DMG: Cluster = 0x403, - [1653992385.759859][2347:2347] CHIP:DMG: Attribute = 0x0000_0001, - [1653992385.759918][2347:2347] CHIP:DMG: } - [1653992385.759971][2347:2347] CHIP:DMG: - [1653992385.760000][2347:2347] CHIP:DMG: ], - [1653992385.760049][2347:2347] CHIP:DMG: - [1653992385.760100][2347:2347] CHIP:DMG: isFabricFiltered = true, - [1653992385.760125][2347:2347] CHIP:DMG: InteractionModelRevision = 1 - [1653992385.760168][2347:2347] CHIP:DMG: }, - - - ./chip-tool pressuremeasurement read max-measured-value 1 1 - - verify the " max-measured-value response" on the TH (all-cluster-minimal-app) log: - - [1653992415.580348][2347:2347] CHIP:IM: Received Read request - [1653992415.580414][2347:2347] CHIP:DMG: ReadRequestMessage = - [1653992415.580442][2347:2347] CHIP:DMG: { - [1653992415.580473][2347:2347] CHIP:DMG: AttributePathIBs = - [1653992415.580501][2347:2347] CHIP:DMG: [ - [1653992415.580534][2347:2347] CHIP:DMG: AttributePathIB = - [1653992415.580563][2347:2347] CHIP:DMG: { - [1653992415.580602][2347:2347] CHIP:DMG: Endpoint = 0x1, - [1653992415.580674][2347:2347] CHIP:DMG: Cluster = 0x403, - [1653992415.580713][2347:2347] CHIP:DMG: Attribute = 0x0000_0002, - [1653992415.580746][2347:2347] CHIP:DMG: } - [1653992415.580786][2347:2347] CHIP:DMG: - [1653992415.580812][2347:2347] CHIP:DMG: ], - [1653992415.580852][2347:2347] CHIP:DMG: - [1653992415.580879][2347:2347] CHIP:DMG: isFabricFiltered = true, - [1653992415.580913][2347:2347] CHIP:DMG: InteractionModelRevision = 1 - [1653992415.580936][2347:2347] CHIP:DMG: }," - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - TH all-clusters-minimal-app does not support optional attributes, if implemted we will get "General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" as output when we read following attributes. - - - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally - - ./chip-tool pressuremeasurement read tolerance 1 1 - ./chip-tool pressuremeasurement read scaled-value 1 1 - ./chip-tool pressuremeasurement read min-scaled-value 1 1 - ./chip-tool pressuremeasurement read max-scaled-value 1 1 - ./chip-tool pressuremeasurement read scaled-tolerance 1 1 - ./chip-tool pressuremeasurement read scale 1 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && PRS.C.AO-READ - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml index 87c749fe3fc8c7..d64c29714436f8 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# 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. @@ -13,14 +13,10 @@ # 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: 62.3.1. [TC-PS-3.1] Attributes with client as DUT +name: 63.2.3. [TC-PS-3.1] Endpoint composition and EndpointList PICS: - - PS.C - - PS.C.AM-READ - - PS.C.AO-READ - - PS.C.AM-WRITE - - PS.C.AO-WRITE + - PS.S config: nodeId: 0x12344321 @@ -28,678 +24,62 @@ config: endpoint: 0 tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: - "Step 1: DUT reads all supported mandatory attributes from TH one at a - time in a manufacturer specific order" - PICS: PS.C.AM-READ - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool powersource read status 1 1 - Verify that TH recieves "status" attribute with value 0 on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318196.431501][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318196.431509][108731:108731] CHIP:DMG: { - [1686318196.431516][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318196.431531][108731:108731] CHIP:DMG: [ - [1686318196.431538][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318196.431552][108731:108731] CHIP:DMG: { - [1686318196.431560][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318196.431570][108731:108731] CHIP:DMG: { - [1686318196.431580][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318196.431590][108731:108731] CHIP:DMG: AttributePathIB = - [1686318196.431600][108731:108731] CHIP:DMG: { - [1686318196.431611][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318196.431621][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318196.431632][108731:108731] CHIP:DMG: Attribute = 0x0000_0000, - [1686318196.431641][108731:108731] CHIP:DMG: } - [1686318196.431653][108731:108731] CHIP:DMG: - [1686318196.431664][108731:108731] CHIP:DMG: Data = 0, - [1686318196.431672][108731:108731] CHIP:DMG: }, - [1686318196.431685][108731:108731] CHIP:DMG: - [1686318196.431693][108731:108731] CHIP:DMG: }, - [1686318196.431707][108731:108731] CHIP:DMG: - [1686318196.431713][108731:108731] CHIP:DMG: ], - [1686318196.431728][108731:108731] CHIP:DMG: - [1686318196.431736][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318196.431745][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318196.431752][108731:108731] CHIP:DMG: } - [1686318196.431761][108731:108731] CHIP:DMG: - [1686318196.431820][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318196.431829][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - ./chip-tool powersource read order 1 1 - Verify that TH recieves "order" attribute with value 2 on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318245.206127][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318245.206130][108731:108731] CHIP:DMG: { - [1686318245.206132][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318245.206137][108731:108731] CHIP:DMG: [ - [1686318245.206139][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318245.206145][108731:108731] CHIP:DMG: { - [1686318245.206147][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318245.206151][108731:108731] CHIP:DMG: { - [1686318245.206154][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318245.206157][108731:108731] CHIP:DMG: AttributePathIB = - [1686318245.206160][108731:108731] CHIP:DMG: { - [1686318245.206164][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318245.206167][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318245.206172][108731:108731] CHIP:DMG: Attribute = 0x0000_0001, - [1686318245.206175][108731:108731] CHIP:DMG: } - [1686318245.206178][108731:108731] CHIP:DMG: - [1686318245.206182][108731:108731] CHIP:DMG: Data = 2, - [1686318245.206185][108731:108731] CHIP:DMG: }, - [1686318245.206189][108731:108731] CHIP:DMG: - [1686318245.206192][108731:108731] CHIP:DMG: }, - [1686318245.206196][108731:108731] CHIP:DMG: - [1686318245.206199][108731:108731] CHIP:DMG: ], - [1686318245.206203][108731:108731] CHIP:DMG: - [1686318245.206206][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318245.206209][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318245.206211][108731:108731] CHIP:DMG: } - [1686318245.206214][108731:108731] CHIP:DMG: - [1686318245.206239][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318245.206243][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - - ./chip-tool powersource read description 1 1 - Verify that TH recieves "description" attribute with value B2 on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318263.400126][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318263.400128][108731:108731] CHIP:DMG: { - [1686318263.400129][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318263.400133][108731:108731] CHIP:DMG: [ - [1686318263.400134][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318263.400137][108731:108731] CHIP:DMG: { - [1686318263.400139][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318263.400142][108731:108731] CHIP:DMG: { - [1686318263.400144][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318263.400146][108731:108731] CHIP:DMG: AttributePathIB = - [1686318263.400148][108731:108731] CHIP:DMG: { - [1686318263.400150][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318263.400153][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318263.400155][108731:108731] CHIP:DMG: Attribute = 0x0000_0002, - [1686318263.400157][108731:108731] CHIP:DMG: } - [1686318263.400159][108731:108731] CHIP:DMG: - [1686318263.400162][108731:108731] CHIP:DMG: Data = "B2" (2 chars), - [1686318263.400164][108731:108731] CHIP:DMG: }, - [1686318263.400167][108731:108731] CHIP:DMG: - [1686318263.400169][108731:108731] CHIP:DMG: }, - [1686318263.400172][108731:108731] CHIP:DMG: - [1686318263.400173][108731:108731] CHIP:DMG: ], - [1686318263.400176][108731:108731] CHIP:DMG: - [1686318263.400178][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318263.400180][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318263.400182][108731:108731] CHIP:DMG: } - [1686318263.400183][108731:108731] CHIP:DMG: - [1686318263.400206][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318263.400209][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - ./chip-tool powersource read bat-charge-level 1 1 - Verify that TH recieves "bat-charge-level" attribute with value 0 on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318283.452914][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318283.452916][108731:108731] CHIP:DMG: { - [1686318283.452918][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318283.452921][108731:108731] CHIP:DMG: [ - [1686318283.452923][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318283.452926][108731:108731] CHIP:DMG: { - [1686318283.452928][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318283.452930][108731:108731] CHIP:DMG: { - [1686318283.452932][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318283.452934][108731:108731] CHIP:DMG: AttributePathIB = - [1686318283.452936][108731:108731] CHIP:DMG: { - [1686318283.452939][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318283.452941][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318283.452943][108731:108731] CHIP:DMG: Attribute = 0x0000_000E, - [1686318283.452945][108731:108731] CHIP:DMG: } - [1686318283.452948][108731:108731] CHIP:DMG: - [1686318283.452950][108731:108731] CHIP:DMG: Data = 0, - [1686318283.452952][108731:108731] CHIP:DMG: }, - [1686318283.452955][108731:108731] CHIP:DMG: - [1686318283.452957][108731:108731] CHIP:DMG: }, - [1686318283.452959][108731:108731] CHIP:DMG: - [1686318283.452961][108731:108731] CHIP:DMG: ], - [1686318283.452964][108731:108731] CHIP:DMG: - [1686318283.452966][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318283.452968][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318283.452969][108731:108731] CHIP:DMG: } - [1686318283.452971][108731:108731] CHIP:DMG: - [1686318283.452997][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318283.452999][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - ./chip-tool powersource read bat-replacement-needed 1 1 - Verify that TH recieves "bat-replacement-needed" attribute with value false on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318298.844920][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318298.844922][108731:108731] CHIP:DMG: { - [1686318298.844924][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318298.844927][108731:108731] CHIP:DMG: [ - [1686318298.844929][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318298.844932][108731:108731] CHIP:DMG: { - [1686318298.844934][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318298.844936][108731:108731] CHIP:DMG: { - [1686318298.844938][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318298.844940][108731:108731] CHIP:DMG: AttributePathIB = - [1686318298.844942][108731:108731] CHIP:DMG: { - [1686318298.844945][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318298.844947][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318298.844949][108731:108731] CHIP:DMG: Attribute = 0x0000_000F, - [1686318298.844951][108731:108731] CHIP:DMG: } - [1686318298.844954][108731:108731] CHIP:DMG: - [1686318298.844957][108731:108731] CHIP:DMG: Data = false, - [1686318298.844958][108731:108731] CHIP:DMG: }, - [1686318298.844961][108731:108731] CHIP:DMG: - [1686318298.844963][108731:108731] CHIP:DMG: }, - [1686318298.844966][108731:108731] CHIP:DMG: - [1686318298.844967][108731:108731] CHIP:DMG: ], - [1686318298.844970][108731:108731] CHIP:DMG: - [1686318298.844972][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318298.844974][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318298.844975][108731:108731] CHIP:DMG: } - [1686318298.844977][108731:108731] CHIP:DMG: - [1686318298.845011][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318298.845014][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686318298.845016][108731:108731] CHIP:DMG: IM RH moving to [AwaitingDestruction] - - - - ./chip-tool powersource read bat-replaceability 1 1 - Verify that TH recieves "bat-replaceability" attribute with value 0 on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318315.534100][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318315.534102][108731:108731] CHIP:DMG: { - [1686318315.534104][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318315.534107][108731:108731] CHIP:DMG: [ - [1686318315.534108][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318315.534112][108731:108731] CHIP:DMG: { - [1686318315.534113][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318315.534116][108731:108731] CHIP:DMG: { - [1686318315.534118][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318315.534120][108731:108731] CHIP:DMG: AttributePathIB = - [1686318315.534122][108731:108731] CHIP:DMG: { - [1686318315.534124][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318315.534126][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318315.534129][108731:108731] CHIP:DMG: Attribute = 0x0000_0010, - [1686318315.534131][108731:108731] CHIP:DMG: } - [1686318315.534133][108731:108731] CHIP:DMG: - [1686318315.534136][108731:108731] CHIP:DMG: Data = 0, - [1686318315.534138][108731:108731] CHIP:DMG: }, - [1686318315.534141][108731:108731] CHIP:DMG: - [1686318315.534142][108731:108731] CHIP:DMG: }, - [1686318315.534145][108731:108731] CHIP:DMG: - [1686318315.534147][108731:108731] CHIP:DMG: ], - [1686318315.534150][108731:108731] CHIP:DMG: - [1686318315.534152][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318315.534153][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318315.534155][108731:108731] CHIP:DMG: } - [1686318315.534157][108731:108731] CHIP:DMG: - [1686318315.534179][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318315.534181][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - disabled: true - - - label: - "Step 2: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: PS.C.AO-READ - verification: | - OPTIONAL ATTRIBUTES ARE NOT IMPLEMENTED IN SDK, If Implemented we will get the expected outcome that is value of below attributes as per Spec - - - ./chip-tool powersource read wired-assessed-input-voltage 1 1 - - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - ./chip-tool powersource read wired-assessed-input-frequency 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read wired-current-type 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read wired-assessed-current 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read wired-nominal-voltage 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read wired-maximum-current 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read wired-present 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read active-wired-faults 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-voltage 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-percent-remaining 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-time-remaining 1 1 - - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-present 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read active-bat-faults 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-replacement-description 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-common-designation 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-ansidesignation 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-iecdesignation 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-approved-chemistry 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-capacity 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - ./chip-tool powersource read bat-quantity 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-charge-state 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-time-to-full-charge 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-functional-while-charging 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-charging-current 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read active-bat-charge-faults 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - disabled: true - - label: - "Step 3: DUT writes a suitable value to all supported mandatory - attributes on the TH one at a time in a manufacturer specific order" - PICS: PS.C.AM-WRITE + "Step 1: TH performs a wildcard read of all attributes and endpoints" verification: | - This cluster doesn't have any writable attributes + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF disabled: true - label: - "Step 4: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: PS.C.AO-WRITE + "Step 2: For each power source cluster with a non-empty EndpointsList + attribute, verify that the endpoint exists on the device; also verify + that the EndpointsList attribute includes the endpoint on which the + cluster is located" verification: | - This cluster doesn't have any writable attributes + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + + [1690195509.133521][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_000F DataVersion: 2929707991 + [1690195509.133523][44004:44006] CHIP:TOO: BatReplacementNeeded: FALSE + [1690195509.133531][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_0010 DataVersion: 2929707991 + [1690195509.133534][44004:44006] CHIP:TOO: BatReplaceability: 0 + [1690195509.133549][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_001F DataVersion: 2929707991 + [1690195509.133556][44004:44006] CHIP:TOO: EndpointList: 0 entries + [1690195509.133558][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFC DataVersion: 2929707991 + [1690195509.133560][44004:44006] CHIP:TOO: FeatureMap: 2 + + [1690195509.203569][44004:44006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_0010 DataVersion: 1378119001 + [1690195509.203572][44004:44006] CHIP:TOO: BatReplaceability: 0 + [1690195509.203587][44004:44006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_001F DataVersion: 1378119001 + [1690195509.203592][44004:44006] CHIP:TOO: EndpointList: 0 entries + [1690195509.203595][44004:44006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_FFFC DataVersion: 1378119001 + [1690195509.203597][44004:44006] CHIP:TOO: FeatureMap: 2 + + + [1690195509.133531][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_0010 DataVersion: 2929707991 + [1690195509.133534][44004:44006] CHIP:TOO: BatReplaceability: 0 + [1690195509.133549][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_001F DataVersion: 2929707991 + [1690195509.133556][44004:44006] CHIP:TOO: EndpointList: 0 entries + [1690195509.133558][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFC DataVersion: 2929707991 + [1690195509.133560][44004:44006] CHIP:TOO: FeatureMap: 2 disabled: true - label: - "Step 5: Configure TH such that it implements mandatory and none of - the optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again" + "Step 3: For each power source cluster on an endpoint with the Bridged + Node device type, ensure the EndpointList in the Power Source cluster + includes all the endpoints listed in the PartsList of the Descriptor + cluster as well as its own endpoint id." verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool powersource read feature-map 1 1 - Verify that TH recieves "featuremap" attribute with value 0 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - [1686319169.359277][108977:108977] CHIP:DMG: ReportDataMessage = - [1686319169.359279][108977:108977] CHIP:DMG: { - [1686319169.359280][108977:108977] CHIP:DMG: AttributeReportIBs = - [1686319169.359283][108977:108977] CHIP:DMG: [ - [1686319169.359285][108977:108977] CHIP:DMG: AttributeReportIB = - [1686319169.359288][108977:108977] CHIP:DMG: { - [1686319169.359290][108977:108977] CHIP:DMG: AttributeDataIB = - [1686319169.359292][108977:108977] CHIP:DMG: { - [1686319169.359295][108977:108977] CHIP:DMG: DataVersion = 0xb60028fe, - [1686319169.359297][108977:108977] CHIP:DMG: AttributePathIB = - [1686319169.359299][108977:108977] CHIP:DMG: { - [1686319169.359301][108977:108977] CHIP:DMG: Endpoint = 0x1, - [1686319169.359303][108977:108977] CHIP:DMG: Cluster = 0x2f, - [1686319169.359306][108977:108977] CHIP:DMG: Attribute = 0x0000_FFFC, - [1686319169.359308][108977:108977] CHIP:DMG: } - [1686319169.359310][108977:108977] CHIP:DMG: - [1686319169.359313][108977:108977] CHIP:DMG: Data = 0, - [1686319169.359315][108977:108977] CHIP:DMG: }, - [1686319169.359318][108977:108977] CHIP:DMG: - [1686319169.359319][108977:108977] CHIP:DMG: }, - [1686319169.359322][108977:108977] CHIP:DMG: - [1686319169.359324][108977:108977] CHIP:DMG: ], - [1686319169.359327][108977:108977] CHIP:DMG: - [1686319169.359329][108977:108977] CHIP:DMG: SuppressResponse = true, - [1686319169.359331][108977:108977] CHIP:DMG: InteractionModelRevision = 1 - [1686319169.359332][108977:108977] CHIP:DMG: } - [1686319169.359334][108977:108977] CHIP:DMG: - [1686319169.359357][108977:108977] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686319169.359360][108977:108977] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - ./chip-tool powersource read attribute-list 1 1 - Verify that TH recieves "attribute list" attribute with value 0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - [1686319262.503993][108977:108977] CHIP:DMG: ReportDataMessage = - [1686319262.503995][108977:108977] CHIP:DMG: { - [1686319262.503996][108977:108977] CHIP:DMG: AttributeReportIBs = - [1686319262.504001][108977:108977] CHIP:DMG: [ - [1686319262.504003][108977:108977] CHIP:DMG: AttributeReportIB = - [1686319262.504006][108977:108977] CHIP:DMG: { - [1686319262.504009][108977:108977] CHIP:DMG: AttributeDataIB = - [1686319262.504011][108977:108977] CHIP:DMG: { - [1686319262.504013][108977:108977] CHIP:DMG: DataVersion = 0xb60028fe, - [1686319262.504015][108977:108977] CHIP:DMG: AttributePathIB = - [1686319262.504017][108977:108977] CHIP:DMG: { - [1686319262.504019][108977:108977] CHIP:DMG: Endpoint = 0x1, - [1686319262.504022][108977:108977] CHIP:DMG: Cluster = 0x2f, - [1686319262.504024][108977:108977] CHIP:DMG: Attribute = 0x0000_FFFB, - [1686319262.504026][108977:108977] CHIP:DMG: } - [1686319262.504028][108977:108977] CHIP:DMG: - [1686319262.504031][108977:108977] CHIP:DMG: Data = [ - [1686319262.504036][108977:108977] CHIP:DMG: 0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533, - [1686319262.504038][108977:108977] CHIP:DMG: ], - [1686319262.504040][108977:108977] CHIP:DMG: }, - [1686319262.504043][108977:108977] CHIP:DMG: - [1686319262.504045][108977:108977] CHIP:DMG: }, - [1686319262.504049][108977:108977] CHIP:DMG: - [1686319262.504050][108977:108977] CHIP:DMG: ], - [1686319262.504054][108977:108977] CHIP:DMG: - [1686319262.504056][108977:108977] CHIP:DMG: SuppressResponse = true, - [1686319262.504058][108977:108977] CHIP:DMG: InteractionModelRevision = 1 - [1686319262.504060][108977:108977] CHIP:DMG: } - [1686319262.504061][108977:108977] CHIP:DMG: - [1686319262.504089][108977:108977] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686319262.504091][108977:108977] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - ./chip-tool powersource read status 1 1 - Verify that TH recieves "status" attribute with value 0 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - - [1686318196.431501][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318196.431509][108731:108731] CHIP:DMG: { - [1686318196.431516][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318196.431531][108731:108731] CHIP:DMG: [ - [1686318196.431538][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318196.431552][108731:108731] CHIP:DMG: { - [1686318196.431560][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318196.431570][108731:108731] CHIP:DMG: { - [1686318196.431580][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318196.431590][108731:108731] CHIP:DMG: AttributePathIB = - [1686318196.431600][108731:108731] CHIP:DMG: { - [1686318196.431611][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318196.431621][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318196.431632][108731:108731] CHIP:DMG: Attribute = 0x0000_0000, - [1686318196.431641][108731:108731] CHIP:DMG: } - [1686318196.431653][108731:108731] CHIP:DMG: - [1686318196.431664][108731:108731] CHIP:DMG: Data = 0, - [1686318196.431672][108731:108731] CHIP:DMG: }, - [1686318196.431685][108731:108731] CHIP:DMG: - [1686318196.431693][108731:108731] CHIP:DMG: }, - [1686318196.431707][108731:108731] CHIP:DMG: - [1686318196.431713][108731:108731] CHIP:DMG: ], - [1686318196.431728][108731:108731] CHIP:DMG: - [1686318196.431736][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318196.431745][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318196.431752][108731:108731] CHIP:DMG: } - [1686318196.431761][108731:108731] CHIP:DMG: - [1686318196.431820][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318196.431829][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - ./chip-tool powersource read order 1 1 - Verify that TH recieves "order" attribute with value 2 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - - [1686318245.206127][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318245.206130][108731:108731] CHIP:DMG: { - [1686318245.206132][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318245.206137][108731:108731] CHIP:DMG: [ - [1686318245.206139][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318245.206145][108731:108731] CHIP:DMG: { - [1686318245.206147][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318245.206151][108731:108731] CHIP:DMG: { - [1686318245.206154][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318245.206157][108731:108731] CHIP:DMG: AttributePathIB = - [1686318245.206160][108731:108731] CHIP:DMG: { - [1686318245.206164][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318245.206167][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318245.206172][108731:108731] CHIP:DMG: Attribute = 0x0000_0001, - [1686318245.206175][108731:108731] CHIP:DMG: } - [1686318245.206178][108731:108731] CHIP:DMG: - [1686318245.206182][108731:108731] CHIP:DMG: Data = 2, - [1686318245.206185][108731:108731] CHIP:DMG: }, - [1686318245.206189][108731:108731] CHIP:DMG: - [1686318245.206192][108731:108731] CHIP:DMG: }, - [1686318245.206196][108731:108731] CHIP:DMG: - [1686318245.206199][108731:108731] CHIP:DMG: ], - [1686318245.206203][108731:108731] CHIP:DMG: - [1686318245.206206][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318245.206209][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318245.206211][108731:108731] CHIP:DMG: } - [1686318245.206214][108731:108731] CHIP:DMG: - [1686318245.206239][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318245.206243][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - - ./chip-tool powersource read description 1 1 - Verify that TH recieves "description" attribute with value B2 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - [1686318263.400126][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318263.400128][108731:108731] CHIP:DMG: { - [1686318263.400129][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318263.400133][108731:108731] CHIP:DMG: [ - [1686318263.400134][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318263.400137][108731:108731] CHIP:DMG: { - [1686318263.400139][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318263.400142][108731:108731] CHIP:DMG: { - [1686318263.400144][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318263.400146][108731:108731] CHIP:DMG: AttributePathIB = - [1686318263.400148][108731:108731] CHIP:DMG: { - [1686318263.400150][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318263.400153][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318263.400155][108731:108731] CHIP:DMG: Attribute = 0x0000_0002, - [1686318263.400157][108731:108731] CHIP:DMG: } - [1686318263.400159][108731:108731] CHIP:DMG: - [1686318263.400162][108731:108731] CHIP:DMG: Data = "B2" (2 chars), - [1686318263.400164][108731:108731] CHIP:DMG: }, - [1686318263.400167][108731:108731] CHIP:DMG: - [1686318263.400169][108731:108731] CHIP:DMG: }, - [1686318263.400172][108731:108731] CHIP:DMG: - [1686318263.400173][108731:108731] CHIP:DMG: ], - [1686318263.400176][108731:108731] CHIP:DMG: - [1686318263.400178][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318263.400180][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318263.400182][108731:108731] CHIP:DMG: } - [1686318263.400183][108731:108731] CHIP:DMG: - [1686318263.400206][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318263.400209][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - ./chip-tool powersource read bat-charge-level 1 1 - Verify that TH recieves "bat-charge-level" attribute with value 0 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - - [1686318283.452914][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318283.452916][108731:108731] CHIP:DMG: { - [1686318283.452918][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318283.452921][108731:108731] CHIP:DMG: [ - [1686318283.452923][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318283.452926][108731:108731] CHIP:DMG: { - [1686318283.452928][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318283.452930][108731:108731] CHIP:DMG: { - [1686318283.452932][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318283.452934][108731:108731] CHIP:DMG: AttributePathIB = - [1686318283.452936][108731:108731] CHIP:DMG: { - [1686318283.452939][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318283.452941][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318283.452943][108731:108731] CHIP:DMG: Attribute = 0x0000_000E, - [1686318283.452945][108731:108731] CHIP:DMG: } - [1686318283.452948][108731:108731] CHIP:DMG: - [1686318283.452950][108731:108731] CHIP:DMG: Data = 0, - [1686318283.452952][108731:108731] CHIP:DMG: }, - [1686318283.452955][108731:108731] CHIP:DMG: - [1686318283.452957][108731:108731] CHIP:DMG: }, - [1686318283.452959][108731:108731] CHIP:DMG: - [1686318283.452961][108731:108731] CHIP:DMG: ], - [1686318283.452964][108731:108731] CHIP:DMG: - [1686318283.452966][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318283.452968][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318283.452969][108731:108731] CHIP:DMG: } - [1686318283.452971][108731:108731] CHIP:DMG: - [1686318283.452997][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318283.452999][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - ./chip-tool powersource read bat-replacement-needed 1 1 - Verify that TH recieves "bat-replacement-needed" attribute with value false on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - - [1686318298.844920][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318298.844922][108731:108731] CHIP:DMG: { - [1686318298.844924][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318298.844927][108731:108731] CHIP:DMG: [ - [1686318298.844929][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318298.844932][108731:108731] CHIP:DMG: { - [1686318298.844934][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318298.844936][108731:108731] CHIP:DMG: { - [1686318298.844938][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318298.844940][108731:108731] CHIP:DMG: AttributePathIB = - [1686318298.844942][108731:108731] CHIP:DMG: { - [1686318298.844945][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318298.844947][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318298.844949][108731:108731] CHIP:DMG: Attribute = 0x0000_000F, - [1686318298.844951][108731:108731] CHIP:DMG: } - [1686318298.844954][108731:108731] CHIP:DMG: - [1686318298.844957][108731:108731] CHIP:DMG: Data = false, - [1686318298.844958][108731:108731] CHIP:DMG: }, - [1686318298.844961][108731:108731] CHIP:DMG: - [1686318298.844963][108731:108731] CHIP:DMG: }, - [1686318298.844966][108731:108731] CHIP:DMG: - [1686318298.844967][108731:108731] CHIP:DMG: ], - [1686318298.844970][108731:108731] CHIP:DMG: - [1686318298.844972][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318298.844974][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318298.844975][108731:108731] CHIP:DMG: } - [1686318298.844977][108731:108731] CHIP:DMG: - [1686318298.845011][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318298.845014][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686318298.845016][108731:108731] CHIP:DMG: IM RH moving to [AwaitingDestruction] - - - - ./chip-tool powersource read bat-replaceability 1 1 - Verify that TH recieves "bat-replaceability" attribute with value 0 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - - [1686318315.534100][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318315.534102][108731:108731] CHIP:DMG: { - [1686318315.534104][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318315.534107][108731:108731] CHIP:DMG: [ - [1686318315.534108][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318315.534112][108731:108731] CHIP:DMG: { - [1686318315.534113][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318315.534116][108731:108731] CHIP:DMG: { - [1686318315.534118][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318315.534120][108731:108731] CHIP:DMG: AttributePathIB = - [1686318315.534122][108731:108731] CHIP:DMG: { - [1686318315.534124][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318315.534126][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318315.534129][108731:108731] CHIP:DMG: Attribute = 0x0000_0010, - [1686318315.534131][108731:108731] CHIP:DMG: } - [1686318315.534133][108731:108731] CHIP:DMG: - [1686318315.534136][108731:108731] CHIP:DMG: Data = 0, - [1686318315.534138][108731:108731] CHIP:DMG: }, - [1686318315.534141][108731:108731] CHIP:DMG: - [1686318315.534142][108731:108731] CHIP:DMG: }, - [1686318315.534145][108731:108731] CHIP:DMG: - [1686318315.534147][108731:108731] CHIP:DMG: ], - [1686318315.534150][108731:108731] CHIP:DMG: - [1686318315.534152][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318315.534153][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318315.534155][108731:108731] CHIP:DMG: } - [1686318315.534157][108731:108731] CHIP:DMG: - [1686318315.534179][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318315.534181][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages disabled: true - label: - "Step 6: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: PS.C.AO-READ + "Step 4: For each power source cluster on an endpoint that is a child + endpoint of an endpoint with a Bridged Node device type, ensure the + EndpointList in the Power Source cluster contains a list with one + entry that lists its own endpoint id" verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - Verify TH(all-clusters-minimal-app) receives the read command, and responds that this attribute is not available and also DUT is aware that the optional attributes are not available, and does not issue read requests for the attributes which it did read in step 2 - - - ./chip-tool powersource read bat-charge-level 1 1 - - on TH all-clusters-minimal-app verify status response as UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - ./chip-tool powersource read bat-replacement-needed 1 1 - - on TH all-clusters-minimal-app verify status response as UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - ./chip-tool powersource read bat-replaceability 1 1 - - on TH all-clusters-minimal-app verify status response as UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - disabled: true - - - label: - "Step 7: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: PS.C.AO-WRITE - verification: | - This cluster doesn't have any writable attributes disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml deleted file mode 100644 index e098e12f326d93..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml +++ /dev/null @@ -1,399 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 10.3.1. [TC-RH-3.1] Attributes with Client as DUT - -PICS: - - RH.C - - RH.C.AM-READ - - RH.C.AO-READ - - RH.C.AM-WRITE - - RH.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Relative Humidity Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute MeasuredValue" - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute MinMeasuredValue" - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute MaxMeasuredValue" - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute Tolerance" - wait: "readAttribute" - attribute: "Tolerance" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - ./chip-tool relativehumiditymeasurement read feature-map 1 1 - - verify TH recieves "feature-map response" on the TH (all-cluster-minimal-app) log: - - [1666943749.218050][12769:12769] CHIP:DMG: - [1666943749.218060][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943749.218062][12769:12769] CHIP:DMG: { - [1666943749.218064][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943749.218067][12769:12769] CHIP:DMG: [ - [1666943749.218069][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943749.218074][12769:12769] CHIP:DMG: { - [1666943749.218076][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943749.218078][12769:12769] CHIP:DMG: { - [1666943749.218081][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943749.218083][12769:12769] CHIP:DMG: AttributePathIB = - [1666943749.218086][12769:12769] CHIP:DMG: { - [1666943749.218088][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943749.218091][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943749.218093][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666943749.218095][12769:12769] CHIP:DMG: } - [1666943749.218098][12769:12769] CHIP:DMG: - [1666943749.218101][12769:12769] CHIP:DMG: Data = 0, - [1666943749.218103][12769:12769] CHIP:DMG: }, - [1666943749.218106][12769:12769] CHIP:DMG: - [1666943749.218108][12769:12769] CHIP:DMG: }, - [1666943749.218112][12769:12769] CHIP:DMG: - [1666943749.218114][12769:12769] CHIP:DMG: ], - [1666943749.218117][12769:12769] CHIP:DMG: - - - ./chip-tool relativehumiditymeasurement read attribute-list 1 1 - - verify TH recieves "attribute-list response" on the TH (all-cluster-minimal-app) log: - - [1666943792.254338][12769:12769] CHIP:DMG: - [1666943792.254369][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943792.254372][12769:12769] CHIP:DMG: { - [1666943792.254374][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943792.254378][12769:12769] CHIP:DMG: [ - [1666943792.254381][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254385][12769:12769] CHIP:DMG: { - [1666943792.254388][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254392][12769:12769] CHIP:DMG: { - [1666943792.254395][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254397][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254399][12769:12769] CHIP:DMG: { - [1666943792.254402][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254404][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254406][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254409][12769:12769] CHIP:DMG: } - [1666943792.254411][12769:12769] CHIP:DMG: - [1666943792.254414][12769:12769] CHIP:DMG: Data = [ - [1666943792.254418][12769:12769] CHIP:DMG: - [1666943792.254422][12769:12769] CHIP:DMG: ], - [1666943792.254424][12769:12769] CHIP:DMG: }, - [1666943792.254427][12769:12769] CHIP:DMG: - [1666943792.254430][12769:12769] CHIP:DMG: }, - [1666943792.254435][12769:12769] CHIP:DMG: - [1666943792.254437][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254441][12769:12769] CHIP:DMG: { - [1666943792.254443][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254446][12769:12769] CHIP:DMG: { - [1666943792.254449][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254453][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254456][12769:12769] CHIP:DMG: { - [1666943792.254459][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254463][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254465][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254470][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254473][12769:12769] CHIP:DMG: } - [1666943792.254477][12769:12769] CHIP:DMG: - [1666943792.254480][12769:12769] CHIP:DMG: Data = 0, - [1666943792.254483][12769:12769] CHIP:DMG: }, - [1666943792.254487][12769:12769] CHIP:DMG: - [1666943792.254489][12769:12769] CHIP:DMG: }, - [1666943792.254495][12769:12769] CHIP:DMG: - [1666943792.254497][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254501][12769:12769] CHIP:DMG: { - [1666943792.254504][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254506][12769:12769] CHIP:DMG: { - [1666943792.254509][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254513][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254516][12769:12769] CHIP:DMG: { - [1666943792.254519][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254522][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254525][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254527][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254530][12769:12769] CHIP:DMG: } - [1666943792.254534][12769:12769] CHIP:DMG: - [1666943792.254538][12769:12769] CHIP:DMG: Data = 1, - [1666943792.254540][12769:12769] CHIP:DMG: }, - [1666943792.254544][12769:12769] CHIP:DMG: - [1666943792.254546][12769:12769] CHIP:DMG: }, - [1666943792.254551][12769:12769] CHIP:DMG: - [1666943792.254553][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254557][12769:12769] CHIP:DMG: { - [1666943792.254559][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254562][12769:12769] CHIP:DMG: { - [1666943792.254565][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254569][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254571][12769:12769] CHIP:DMG: { - [1666943792.254573][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254576][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254578][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254580][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254582][12769:12769] CHIP:DMG: } - [1666943792.254586][12769:12769] CHIP:DMG: - [1666943792.254589][12769:12769] CHIP:DMG: Data = 2, - [1666943792.254592][12769:12769] CHIP:DMG: }, - [1666943792.254596][12769:12769] CHIP:DMG: - [1666943792.254598][12769:12769] CHIP:DMG: }, - [1666943792.254604][12769:12769] CHIP:DMG: - [1666943792.254606][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254610][12769:12769] CHIP:DMG: { - [1666943792.254612][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254615][12769:12769] CHIP:DMG: { - [1666943792.254618][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254621][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254624][12769:12769] CHIP:DMG: { - [1666943792.254627][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254630][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254633][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254635][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254638][12769:12769] CHIP:DMG: } - [1666943792.254642][12769:12769] CHIP:DMG: - [1666943792.254645][12769:12769] CHIP:DMG: Data = 65528, - [1666943792.254647][12769:12769] CHIP:DMG: }, - [1666943792.254651][12769:12769] CHIP:DMG: - [1666943792.254653][12769:12769] CHIP:DMG: }, - [1666943792.254658][12769:12769] CHIP:DMG: - [1666943792.254660][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254664][12769:12769] CHIP:DMG: { - [1666943792.254666][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254669][12769:12769] CHIP:DMG: { - [1666943792.254672][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254674][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254677][12769:12769] CHIP:DMG: { - [1666943792.254680][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254683][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254686][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254689][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254691][12769:12769] CHIP:DMG: } - [1666943792.254695][12769:12769] CHIP:DMG: - [1666943792.254698][12769:12769] CHIP:DMG: Data = 65529, - [1666943792.254700][12769:12769] CHIP:DMG: }, - [1666943792.254704][12769:12769] CHIP:DMG: - [1666943792.254707][12769:12769] CHIP:DMG: }, - [1666943792.254712][12769:12769] CHIP:DMG: - [1666943792.254714][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254718][12769:12769] CHIP:DMG: { - [1666943792.254720][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254723][12769:12769] CHIP:DMG: { - [1666943792.254726][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254729][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254732][12769:12769] CHIP:DMG: { - [1666943792.254735][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254738][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254740][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254743][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254746][12769:12769] CHIP:DMG: } - [1666943792.254750][12769:12769] CHIP:DMG: - [1666943792.254753][12769:12769] CHIP:DMG: Data = 65531, - [1666943792.254756][12769:12769] CHIP:DMG: }, - [1666943792.254759][12769:12769] CHIP:DMG: - [1666943792.254762][12769:12769] CHIP:DMG: }, - [1666943792.254767][12769:12769] CHIP:DMG: - [1666943792.254769][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254773][12769:12769] CHIP:DMG: { - [1666943792.254775][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254778][12769:12769] CHIP:DMG: { - [1666943792.254780][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254783][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254786][12769:12769] CHIP:DMG: { - [1666943792.254789][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254792][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254797][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254799][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254802][12769:12769] CHIP:DMG: } - [1666943792.254804][12769:12769] CHIP:DMG: - [1666943792.254807][12769:12769] CHIP:DMG: Data = 65532, - [1666943792.254809][12769:12769] CHIP:DMG: }, - [1666943792.254811][12769:12769] CHIP:DMG: - [1666943792.254813][12769:12769] CHIP:DMG: }, - [1666943792.254820][12769:12769] CHIP:DMG: - [1666943792.254822][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254826][12769:12769] CHIP:DMG: { - [1666943792.254828][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254831][12769:12769] CHIP:DMG: { - [1666943792.254833][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254835][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254837][12769:12769] CHIP:DMG: { - [1666943792.254842][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254845][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254849][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254851][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254853][12769:12769] CHIP:DMG: } - [1666943792.254856][12769:12769] CHIP:DMG: - [1666943792.254859][12769:12769] CHIP:DMG: Data = 65533, - [1666943792.254861][12769:12769] CHIP:DMG: }, - [1666943792.254865][12769:12769] CHIP:DMG: - [1666943792.254867][12769:12769] CHIP:DMG: }, - [1666943792.254872][12769:12769] CHIP:DMG: - [1666943792.254874][12769:12769] CHIP:DMG: ], - [1666943792.254884][12769:12769] CHIP:DMG: - [1666943792.254886][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943792.254889][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943792.254891][12769:12769] CHIP:DMG: } - [1666943792.254894][12769:12769] CHIP:DMG: - - ./chip-tool relativehumiditymeasurement read measured-value 1 1 - - verify TH recieves "measured-value response" on the TH (all-cluster-minimal-app) log: - [1666943851.649935][12769:12769] CHIP:DMG: - [1666943851.649947][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943851.649950][12769:12769] CHIP:DMG: { - [1666943851.649952][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943851.649956][12769:12769] CHIP:DMG: [ - [1666943851.649958][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943851.649962][12769:12769] CHIP:DMG: { - [1666943851.649965][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943851.649967][12769:12769] CHIP:DMG: { - [1666943851.649970][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943851.649973][12769:12769] CHIP:DMG: AttributePathIB = - [1666943851.649975][12769:12769] CHIP:DMG: { - [1666943851.649978][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943851.649981][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943851.649984][12769:12769] CHIP:DMG: Attribute = 0x0000_0000, - [1666943851.649987][12769:12769] CHIP:DMG: } - [1666943851.649990][12769:12769] CHIP:DMG: - [1666943851.649994][12769:12769] CHIP:DMG: Data = 0, - [1666943851.649997][12769:12769] CHIP:DMG: }, - [1666943851.650001][12769:12769] CHIP:DMG: - [1666943851.650003][12769:12769] CHIP:DMG: }, - [1666943851.650007][12769:12769] CHIP:DMG: - [1666943851.650009][12769:12769] CHIP:DMG: ], - [1666943851.650013][12769:12769] CHIP:DMG: - [1666943851.650015][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943851.650017][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool relativehumiditymeasurement read min-measured-value 1 1 - - verify TH recieves "min-measured-value response" on the TH (all-cluster-minimal-app) log: - - 1651147834.075387][2336:2336] CHIP:IM: Received Read request - - [1666943887.048829][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943887.048832][12769:12769] CHIP:DMG: { - [1666943887.048835][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943887.048840][12769:12769] CHIP:DMG: [ - [1666943887.048842][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943887.048846][12769:12769] CHIP:DMG: { - [1666943887.048848][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943887.048851][12769:12769] CHIP:DMG: { - [1666943887.048853][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943887.048855][12769:12769] CHIP:DMG: AttributePathIB = - [1666943887.048857][12769:12769] CHIP:DMG: { - [1666943887.048859][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943887.048862][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943887.048865][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, - [1666943887.048868][12769:12769] CHIP:DMG: } - [1666943887.048871][12769:12769] CHIP:DMG: - [1666943887.048874][12769:12769] CHIP:DMG: Data = 0, - [1666943887.048877][12769:12769] CHIP:DMG: }, - [1666943887.048881][12769:12769] CHIP:DMG: - [1666943887.048883][12769:12769] CHIP:DMG: }, - [1666943887.048887][12769:12769] CHIP:DMG: - [1666943887.048889][12769:12769] CHIP:DMG: ], - [1666943887.048893][12769:12769] CHIP:DMG: - [1666943887.048894][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943887.048897][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - - - ./chip-tool relativehumiditymeasurement read max-measured-value 1 1 - - verify TH recieves "max-measured-value response" on the TH (all-cluster-minimal-app) log: - - [1666943902.417737][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943902.417740][12769:12769] CHIP:DMG: { - [1666943902.417742][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943902.417747][12769:12769] CHIP:DMG: [ - [1666943902.417749][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943902.417755][12769:12769] CHIP:DMG: { - [1666943902.417758][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943902.417761][12769:12769] CHIP:DMG: { - [1666943902.417764][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943902.417767][12769:12769] CHIP:DMG: AttributePathIB = - [1666943902.417771][12769:12769] CHIP:DMG: { - [1666943902.417774][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943902.417777][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943902.417781][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, - [1666943902.417784][12769:12769] CHIP:DMG: } - [1666943902.417788][12769:12769] CHIP:DMG: - [1666943902.417791][12769:12769] CHIP:DMG: Data = 10000, - [1666943902.417794][12769:12769] CHIP:DMG: }, - [1666943902.417798][12769:12769] CHIP:DMG: - [1666943902.417801][12769:12769] CHIP:DMG: }, - [1666943902.417805][12769:12769] CHIP:DMG: - [1666943902.417808][12769:12769] CHIP:DMG: ], - [1666943902.417812][12769:12769] CHIP:DMG: - [1666943902.417815][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943902.417819][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - TH all-clusters-minimal-app does not support optional attributes - - ./chip-tool relativehumiditymeasurement read tolerance 1 1 - - status = 0x86 (UNSUPPORTED_ATTRIBUTE), - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml index ce361a6c946e16..87ff6e151b4ef5 100644 --- a/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: RNCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !RNCONC.S.F00 && !RNCONC.S.F01 && !RNCONC.S.F02 && !RNCONC.S.F03 && + !RNCONC.S.F04 && !RNCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F00 + PICS: RNCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F00 + PICS: " !RNCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F01 + PICS: RNCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F01 + PICS: " !RNCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F02 + PICS: RNCONC.S.F02 && RNCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F02 + PICS: " !RNCONC.S.F02 && !RNCONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F03 + PICS: RNCONC.S.F03 && RNCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F03 + PICS: " !RNCONC.S.F03 && !RNCONC.S.F01" response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F04 + PICS: RNCONC.S.F04 && RNCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F04 + PICS: " !RNCONC.S.F04 && RNCONC.S.F00" response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F05 + PICS: RNCONC.S.F05 && RNCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F05 + PICS: " !RNCONC.S.F05 && !RNCONC.S.F00 " response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && RNCONC.S.A0007 && RNCONC.S.F00 + PICS: RNCONC.S.A0007 && RNCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when RNCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && !RNCONC.S.A0007 + PICS: " !RNCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && RNCONC.S.F00 + PICS: RNCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when RNCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && !RNCONC.S.F00 + PICS: " !RNCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && RNCONC.S.F04 + PICS: RNCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when RNCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && !RNCONC.S.F04 + PICS: " !RNCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && RNCONC.S.F05 + PICS: RNCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: RNCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && !RNCONC.S.F05 + PICS: " !RNCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && RNCONC.S.F01 + PICS: RNCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: RNCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && !RNCONC.S.F01 + PICS: " !RNCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: RNCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: RNCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml index d9d98f55d8cfd6..2d10dafd07ee91 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,75 +39,78 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: RVCCLEANM.S.A0000 verification: | - ./chip-tool rvcleanm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: - - [1654595167.600241][14362:14367] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595167.600345][14362:14367] CHIP:TOO: SupportedModes: 3 entries - [1654595167.600403][14362:14367] CHIP:TOO: [1]: { - [1654595167.600430][14362:14367] CHIP:TOO: Label: Black - [1654595167.600466][14362:14367] CHIP:TOO: Mode: 0 - [1654595167.600495][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.600564][14362:14367] CHIP:TOO: [1]: { - [1654595167.600589][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.600612][14362:14367] CHIP:TOO: Value: 0 - [1654595167.600637][14362:14367] CHIP:TOO: } - [1654595167.600662][14362:14367] CHIP:TOO: } - [1654595167.600695][14362:14367] CHIP:TOO: [2]: { - [1654595167.600719][14362:14367] CHIP:TOO: Label: Cappuccino - [1654595167.600742][14362:14367] CHIP:TOO: Mode: 4 - [1654595167.600768][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.600796][14362:14367] CHIP:TOO: [1]: { - [1654595167.600820][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.600842][14362:14367] CHIP:TOO: Value: 0 - [1654595167.600865][14362:14367] CHIP:TOO: } - [1654595167.600889][14362:14367] CHIP:TOO: } - [1654595167.600921][14362:14367] CHIP:TOO: [3]: { - [1654595167.600945][14362:14367] CHIP:TOO: Label: Espresso - [1654595167.600968][14362:14367] CHIP:TOO: Mode: 7 - [1654595167.600993][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.601022][14362:14367] CHIP:TOO: [1]: { - [1654595167.601046][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.601068][14362:14367] CHIP:TOO: Value: 0 - [1654595167.601091][14362:14367] CHIP:TOO: } - [1654595167.601115][14362:14367] CHIP:TOO: } + ./chip-tool rvccleanmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that list should contain at least one entry + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value + - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 + - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690182376.583167][14996:14998] CHIP:DMG: } + [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 + [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries + [1690182376.583301][14996:14998] CHIP:TOO: [1]: { + [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum + [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 + [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583316][14996:14998] CHIP:TOO: [1]: { + [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 + [1690182376.583322][14996:14998] CHIP:TOO: } + [1690182376.583325][14996:14998] CHIP:TOO: } + [1690182376.583331][14996:14998] CHIP:TOO: [2]: { + [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash + [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 + [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583344][14996:14998] CHIP:TOO: [1]: { + [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 + [1690182376.583349][14996:14998] CHIP:TOO: } + [1690182376.583352][14996:14998] CHIP:TOO: } + [1690182376.583357][14996:14998] CHIP:TOO: [3]: { + [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean + [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 + [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries + [1690182376.583369][14996:14998] CHIP:TOO: [1]: { + [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 + [1690182376.583375][14996:14998] CHIP:TOO: } + [1690182376.583378][14996:14998] CHIP:TOO: [2]: { + [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 + [1690182376.583383][14996:14998] CHIP:TOO: } + [1690182376.583385][14996:14998] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | - ./chip-tool rvcleanm read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut and below is the sample log provided for the raspi platform: + ./chip-tool rvccleanmode read current-mode 1 1 - [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 + [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 + [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the OnMode attribute." PICS: RVCCLEANM.S.A0003 verification: | - ./chip-tool rvcleanm read on-mode 1 1 + ./chip-tool rvccleanmode read on-mode 1 1 - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null - - [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 - - [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null + [1690182436.721527][15012:15014] CHIP:DMG: } + [1690182436.721673][15012:15014] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3145953005 + [1690182436.721723][15012:15014] CHIP:TOO: OnMode: null disabled: true - label: "Step 5: TH reads from the DUT the StartUpMode attribute." PICS: RVCCLEANM.S.A0002 verification: | - ./chip-tool rvcleanm read start-up-mode 1 1 - - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: - + ./chip-tool rvccleanmode read start-up-mode 1 1 - [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null - [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 + [1690182475.587786][15022:15024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3145953005 + [1690182475.587797][15022:15024] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml index 1925f2b89c4066..4d0da130791b6c 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml @@ -34,143 +34,208 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: RVCCLEANM.S.A0000 verification: | - ./chip-tool rvcleanm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: - - [1685018204.991818][16390:16392] CHIP:DMG: } - [1685018204.992182][16390:16392] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3673378954 - [1685018204.992279][16390:16392] CHIP:TOO: SupportedModes: 3 entries - [1685018204.992320][16390:16392] CHIP:TOO: [1]: { - [1685018204.992331][16390:16392] CHIP:TOO: Label: Black - [1685018204.992350][16390:16392] CHIP:TOO: Mode: 0 - [1685018204.992376][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992408][16390:16392] CHIP:TOO: [1]: { - [1685018204.992420][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992430][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992440][16390:16392] CHIP:TOO: } - [1685018204.992452][16390:16392] CHIP:TOO: } - [1685018204.992482][16390:16392] CHIP:TOO: [2]: { - [1685018204.992492][16390:16392] CHIP:TOO: Label: Cappuccino - [1685018204.992504][16390:16392] CHIP:TOO: Mode: 4 - [1685018204.992525][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992547][16390:16392] CHIP:TOO: [1]: { - [1685018204.992558][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992567][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992578][16390:16392] CHIP:TOO: } - [1685018204.992588][16390:16392] CHIP:TOO: } - [1685018204.992610][16390:16392] CHIP:TOO: [3]: { - [1685018204.992619][16390:16392] CHIP:TOO: Label: Espresso - [1685018204.992628][16390:16392] CHIP:TOO: Mode: 7 - [1685018204.992641][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992657][16390:16392] CHIP:TOO: [1]: { - [1685018204.992666][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992678][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992687][16390:16392] CHIP:TOO: } - [1685018204.992695][16390:16392] CHIP:TOO: } + ./chip-tool rvccleanmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 + [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries + [1690182376.583301][14996:14998] CHIP:TOO: [1]: { + [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum + [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 + [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583316][14996:14998] CHIP:TOO: [1]: { + [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 + [1690182376.583322][14996:14998] CHIP:TOO: } + [1690182376.583325][14996:14998] CHIP:TOO: } + [1690182376.583331][14996:14998] CHIP:TOO: [2]: { + [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash + [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 + [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583344][14996:14998] CHIP:TOO: [1]: { + [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 + [1690182376.583349][14996:14998] CHIP:TOO: } + [1690182376.583352][14996:14998] CHIP:TOO: } + [1690182376.583357][14996:14998] CHIP:TOO: [3]: { + [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean + [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 + [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries + [1690182376.583369][14996:14998] CHIP:TOO: [1]: { + [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 + [1690182376.583375][14996:14998] CHIP:TOO: } + [1690182376.583378][14996:14998] CHIP:TOO: [2]: { + [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 + [1690182376.583383][14996:14998] CHIP:TOO: } + [1690182376.583385][14996:14998] CHIP:TOO: } disabled: true - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | - ./chip-tool rvcleanm read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - save tha value as old_current_mode_dut - - select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th - - select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + ./chip-tool rvccleanmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 + [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set - to old_current_mode_dut [Petru] note that currently this constraint is - not in the spec. The unapproved proposal is here: - https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/7096 - Until that's approved, please skip this step." + "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set + to old_current_mode_dut" PICS: RVCCLEANM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + ./chip-tool rvccleanmode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690182553.733326][15036:15038] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690182553.733341][15036:15038] CHIP:TOO: ChangeToModeResponse: { + [1690182553.733348][15036:15038] CHIP:TOO: status: 0 + [1690182553.733351][15036:15038] CHIP:TOO: } disabled: true - label: - "Step 4: Manually put the device in a state from which it will FAIL to + "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" + PICS: PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE verification: | - + Manual operation required disabled: true - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | + ./chip-tool rvccleanmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 + [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" - PICS: RVCCLEANM.S.C00.Rsp + PICS: PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE && RVCCLEANM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + First change the mode to cleaning after that try to change the mode to any other modes (Vaccum, Deep clean, Wash ) + + ./chip-tool rvcrunmode change-to-mode 1 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690262143.410054][28190:28192] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690262143.410070][28190:28192] CHIP:TOO: ChangeToModeResponse: { + [1690262143.410076][28190:28192] CHIP:TOO: status: 0 + [1690262143.410079][28190:28192] CHIP:TOO: } + + ./chip-tool rvccleanmode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and StatusText field has a length between 1 and 64, below is the sample log provided for the raspi platform: + + [1690262155.519185][28202:28204] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690262155.519202][28202:28204] CHIP:TOO: ChangeToModeResponse: { + [1690262155.519206][28202:28204] CHIP:TOO: status: 64 + [1690262155.519210][28202:28204] CHIP:TOO: statusText: Cannot change the cleaning mode during a clean + [1690262155.519213][28202:28204] CHIP:TOO: } disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvccleanmode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 + [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 8: Manually put the device in a state from which it will + "Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.RVCCLEANM.MODE_CHANGE_OK" verification: | - + Manual operation required disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | + ./chip-tool rvccleanmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 + [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.RVCCLEANM.MODE_CHANGE_OK" PICS: RVCCLEANM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + Change to mode is not allowed from cleaning to any other mode(Vaccum, Deep clean, Wash ), Please switch the mode to idle and then try to change to other modes + + ./chip-tool rvcrunmode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690262367.604437][28315:28317] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690262367.604496][28315:28317] CHIP:TOO: ChangeToModeResponse: { + [1690262367.604517][28315:28317] CHIP:TOO: status: 0 + [1690262367.604529][28315:28317] CHIP:TOO: } + + + ./chip-tool rvccleanmode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690262376.067598][28323:28325] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690262376.067612][28323:28325] CHIP:TOO: ChangeToModeResponse: { + [1690262376.067618][28323:28325] CHIP:TOO: status: 0 + [1690262376.067621][28323:28325] CHIP:TOO: } disabled: true - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | + ./chip-tool rvccleanmode read current-mode 1 1 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 + + [1690262464.326501][28342:28344] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 2064453499 + [1690262464.326542][28342:28344] CHIP:TOO: CurrentMode: 2 disabled: true - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: RVCCLEANM.S.C00.Rsp verification: | + ./chip-tool rvccleanmode change-to-mode 4 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: + [1690262496.596029][28351:28353] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690262496.596080][28351:28353] CHIP:TOO: ChangeToModeResponse: { + [1690262496.596117][28351:28353] CHIP:TOO: status: 1 + [1690262496.596120][28351:28353] CHIP:TOO: } disabled: true - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + - label: "Step 14: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | + ./chip-tool rvccleanmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 + [1690262464.326501][28342:28344] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 2064453499 + [1690262464.326542][28342:28344] CHIP:TOO: CurrentMode: 2 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml index 2a4df6ad202721..9806f6dd8b9fe6 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,63 +39,69 @@ tests: - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm read on-mode 1 1 + ./chip-tool rvccleanmode read on-mode 1 1 - On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 - [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 + [1690183202.686514][15123:15125] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3145953012 + [1690183202.686550][15123:15125] CHIP:TOO: OnMode: 0 disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvccleanmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute is an integer. + Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 + [1690183300.914668][15159:15161] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 4196861832 + [1690183300.914716][15159:15161] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: RVCCLEANM.S.A0000 && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } + ./chip-tool rvccleanmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690182376.583167][14996:14998] CHIP:DMG: } + [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 + [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries + [1690182376.583301][14996:14998] CHIP:TOO: [1]: { + [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum + [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 + [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583316][14996:14998] CHIP:TOO: [1]: { + [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 + [1690182376.583322][14996:14998] CHIP:TOO: } + [1690182376.583325][14996:14998] CHIP:TOO: } + [1690182376.583331][14996:14998] CHIP:TOO: [2]: { + [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash + [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 + [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583344][14996:14998] CHIP:TOO: [1]: { + [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 + [1690182376.583349][14996:14998] CHIP:TOO: } + [1690182376.583352][14996:14998] CHIP:TOO: } + [1690182376.583357][14996:14998] CHIP:TOO: [3]: { + [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean + [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 + [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries + [1690182376.583369][14996:14998] CHIP:TOO: [1]: { + [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 + [1690182376.583375][14996:14998] CHIP:TOO: } + [1690182376.583378][14996:14998] CHIP:TOO: [2]: { + [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 + [1690182376.583383][14996:14998] CHIP:TOO: } + [1690182376.583385][14996:14998] CHIP:TOO: } disabled: true - label: @@ -98,16 +109,14 @@ tests: to new_mode_th" PICS: RVCCLEANM.S.C00.Rsp && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm change-to-mode 7 1 1 + ./chip-tool rvccleanmode change-to-mode 1 1 1 - On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: + 1690183395.641002][15168:15170] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690183395.641020][15168:15170] CHIP:TOO: ChangeToModeResponse: { + [1690183395.641025][15168:15170] CHIP:TOO: status: 0 + [1690183395.641028][15168:15170] CHIP:TOO: } disabled: true - label: "Step 6: TH sends a Off command to the DUT" @@ -139,10 +148,10 @@ tests: - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvccleanmode read current-mode 1 1 - On TH(chip-tool),verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 0 + [1690183444.048684][15184:15186] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 4196861834 + [1690183444.048697][15184:15186] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml index 0861a1f2117d57..5e5b97cf0cd5a0 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,96 +39,165 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: RVCCLEANM.S.A0002 verification: | - ./chip-tool rvcleanm read start-up-mode 1 1 + ./chip-tool rvccleanmode read start-up-mode 1 1 - On TH(chip-tool), Verify StartUpMode attribute value is an integer. save the valueas startup_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify StartUpMode attribute value is an integer value or null + - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null - [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 - [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 + NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + + [1690545840.189340][3104:3106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3338736524 + [1690545840.189408][3104:3106] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: RVCCLEANM.S.A0000 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvccleanmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690183637.107558][15230:15232] CHIP:TOO: SupportedModes: 3 entries + [1690183637.107597][15230:15232] CHIP:TOO: [1]: { + [1690183637.107608][15230:15232] CHIP:TOO: Label: Vacuum + [1690183637.107618][15230:15232] CHIP:TOO: Mode: 0 + [1690183637.107633][15230:15232] CHIP:TOO: ModeTags: 1 entries + [1690183637.107651][15230:15232] CHIP:TOO: [1]: { + [1690183637.107662][15230:15232] CHIP:TOO: Value: 16385 + [1690183637.107670][15230:15232] CHIP:TOO: } + [1690183637.107679][15230:15232] CHIP:TOO: } + [1690183637.107700][15230:15232] CHIP:TOO: [2]: { + [1690183637.107708][15230:15232] CHIP:TOO: Label: Wash + [1690183637.107718][15230:15232] CHIP:TOO: Mode: 1 + [1690183637.107730][15230:15232] CHIP:TOO: ModeTags: 1 entries + [1690183637.107744][15230:15232] CHIP:TOO: [1]: { + [1690183637.107753][15230:15232] CHIP:TOO: Value: 16386 + [1690183637.107765][15230:15232] CHIP:TOO: } + [1690183637.107774][15230:15232] CHIP:TOO: } + [1690183637.107793][15230:15232] CHIP:TOO: [3]: { + [1690183637.107801][15230:15232] CHIP:TOO: Label: Deep clean + [1690183637.107811][15230:15232] CHIP:TOO: Mode: 2 + [1690183637.107823][15230:15232] CHIP:TOO: ModeTags: 2 entries + [1690183637.107837][15230:15232] CHIP:TOO: [1]: { + [1690183637.107846][15230:15232] CHIP:TOO: Value: 7 + [1690183637.107856][15230:15232] CHIP:TOO: } + [1690183637.107885][15230:15232] CHIP:TOO: [2]: { + [1690183637.107888][15230:15232] CHIP:TOO: Value: 16384 + [1690183637.107890][15230:15232] CHIP:TOO: } + [1690183637.107894][15230:15232] CHIP:TOO: } + disabled: true - On TH(chip-tool), Verify CurrentMode attribute value is integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: RVCCLEANM.S.A0002 + verification: | + ./chip-tool rvccleanmode write start-up-mode 0 1 1 - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + [1690183561.346360][15209:15211] CHIP:DMG: StatusIB = + [1690183561.346364][15209:15211] CHIP:DMG: { + [1690183561.346367][15209:15211] CHIP:DMG: status = 0x00 (SUCCESS), + [1690183561.346369][15209:15211] CHIP:DMG: }, + disabled: true - If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + PICS: RVCCLEANM.S.A0001 + verification: | + ./chip-tool rvccleanmode read current-mode 1 1 + + On TH(chip-tool), Verify CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 + + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. + + [1690183605.342520][15217:15219] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3992778259 + [1690183605.342539][15217:15219] CHIP:TOO: CurrentMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: RVCCLEANM.S.A0000 verification: | - ./chip-tool rvcleanm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } + ./chip-tool rvccleanmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th., below is the sample log provided for the raspi platform: + + [1690183637.107558][15230:15232] CHIP:TOO: SupportedModes: 3 entries + [1690183637.107597][15230:15232] CHIP:TOO: [1]: { + [1690183637.107608][15230:15232] CHIP:TOO: Label: Vacuum + [1690183637.107618][15230:15232] CHIP:TOO: Mode: 0 + [1690183637.107633][15230:15232] CHIP:TOO: ModeTags: 1 entries + [1690183637.107651][15230:15232] CHIP:TOO: [1]: { + [1690183637.107662][15230:15232] CHIP:TOO: Value: 16385 + [1690183637.107670][15230:15232] CHIP:TOO: } + [1690183637.107679][15230:15232] CHIP:TOO: } + [1690183637.107700][15230:15232] CHIP:TOO: [2]: { + [1690183637.107708][15230:15232] CHIP:TOO: Label: Wash + [1690183637.107718][15230:15232] CHIP:TOO: Mode: 1 + [1690183637.107730][15230:15232] CHIP:TOO: ModeTags: 1 entries + [1690183637.107744][15230:15232] CHIP:TOO: [1]: { + [1690183637.107753][15230:15232] CHIP:TOO: Value: 16386 + [1690183637.107765][15230:15232] CHIP:TOO: } + [1690183637.107774][15230:15232] CHIP:TOO: } + [1690183637.107793][15230:15232] CHIP:TOO: [3]: { + [1690183637.107801][15230:15232] CHIP:TOO: Label: Deep clean + [1690183637.107811][15230:15232] CHIP:TOO: Mode: 2 + [1690183637.107823][15230:15232] CHIP:TOO: ModeTags: 2 entries + [1690183637.107837][15230:15232] CHIP:TOO: [1]: { + [1690183637.107846][15230:15232] CHIP:TOO: Value: 7 + [1690183637.107856][15230:15232] CHIP:TOO: } + [1690183637.107885][15230:15232] CHIP:TOO: [2]: { + [1690183637.107888][15230:15232] CHIP:TOO: Value: 16384 + [1690183637.107890][15230:15232] CHIP:TOO: } + [1690183637.107894][15230:15232] CHIP:TOO: } disabled: true - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: RVCCLEANM.S.C00.Rsp verification: | - ./chip-tool rvcleanm change-to-mode 4 1 1 - + ./chip-tool rvccleanmode change-to-mode 1 1 1 - On TH(chip-tool) , Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931419.768138][20792:20794] CHIP:DMG: StatusIB = - [1684931419.768143][20792:20794] CHIP:DMG: { - [1684931419.768148][20792:20794] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931419.768152][20792:20794] CHIP:DMG: }, + [1690183675.346665][15234:15236] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690183675.346731][15234:15236] CHIP:TOO: ChangeToModeResponse: { + [1690183675.346753][15234:15236] CHIP:TOO: status: 0 + [1690183675.346768][15234:15236] CHIP:TOO: } disabled: true - - label: "Step 6: Physically power cycle the device" + - label: "Step 8: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 9: TH reads from the DUT the StartUpMode attribute." + PICS: RVCCLEANM.S.A0002 + verification: | + ./chip-tool rvccleanmode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer + - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + + [1690545840.189340][3104:3106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3338736524 + [1690545840.189408][3104:3106] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvccleanmode read current-mode 1 1 - on TH(chip-tool), Verify that CurrentMode attribute value is same as value recorded in step 1 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + [1690347752.080278][43423:43425] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 1382495026 + [1690347752.080330][43423:43425] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml index 72998922dae970..642926e317d53c 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml @@ -26,6 +26,24 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + + - label: "Note" + verification: | + To Execute the TC-RVCCLEANM-3.3 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -36,118 +54,171 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: RVCCLEANM.S.A0002 verification: | - ./chip-tool rvcleanm read start-up-mode 1 1 + ./chip-tool rvcrunmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer or Null + - Save the value as startup_mode_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is null + + NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + + [1690546417.725863][3168:3170] CHIP:DMG: } + [1690546417.726042][3168:3170] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 3746592465 + [1690546417.726109][3168:3170] CHIP:TOO: StartUpMode: null + disabled: true + + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: RVCCLEANM.S.A0000 + verification: | + ./chip-tool rvccleanmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690184020.818299][15321:15323] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3807724300 + [1690184020.818324][15321:15323] CHIP:TOO: SupportedModes: 3 entries + [1690184020.818332][15321:15323] CHIP:TOO: [1]: { + [1690184020.818336][15321:15323] CHIP:TOO: Label: Vacuum + [1690184020.818341][15321:15323] CHIP:TOO: Mode: 0 + [1690184020.818345][15321:15323] CHIP:TOO: ModeTags: 1 entries + [1690184020.818351][15321:15323] CHIP:TOO: [1]: { + [1690184020.818354][15321:15323] CHIP:TOO: Value: 16385 + [1690184020.818357][15321:15323] CHIP:TOO: } + [1690184020.818360][15321:15323] CHIP:TOO: } + [1690184020.818365][15321:15323] CHIP:TOO: [2]: { + [1690184020.818368][15321:15323] CHIP:TOO: Label: Wash + [1690184020.818370][15321:15323] CHIP:TOO: Mode: 1 + [1690184020.818372][15321:15323] CHIP:TOO: ModeTags: 1 entries + [1690184020.818376][15321:15323] CHIP:TOO: [1]: { + [1690184020.818379][15321:15323] CHIP:TOO: Value: 16386 + [1690184020.818381][15321:15323] CHIP:TOO: } + [1690184020.818384][15321:15323] CHIP:TOO: } + [1690184020.818389][15321:15323] CHIP:TOO: [3]: { + [1690184020.818392][15321:15323] CHIP:TOO: Label: Deep clean + [1690184020.818394][15321:15323] CHIP:TOO: Mode: 2 + [1690184020.818398][15321:15323] CHIP:TOO: ModeTags: 2 entries + [1690184020.818402][15321:15323] CHIP:TOO: [1]: { + [1690184020.818404][15321:15323] CHIP:TOO: Value: 7 + [1690184020.818407][15321:15323] CHIP:TOO: } + [1690184020.818410][15321:15323] CHIP:TOO: [2]: { + [1690184020.818412][15321:15323] CHIP:TOO: Value: 16384 + [1690184020.818415][15321:15323] CHIP:TOO: } + [1690184020.818418][15321:15323] CHIP:TOO: } + disabled: true - On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: RVCCLEANM.S.A0002 + verification: | + ./chip-tool rvcrunmode write start-up-mode 0 1 1 + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 + 1690183885.227143][15298:15300] CHIP:DMG: StatusIB = + [1690183885.227148][15298:15300] CHIP:DMG: { + [1690183885.227152][15298:15300] CHIP:DMG: status = 0x00 (SUCCESS), + [1690183885.227156][15298:15300] CHIP:DMG: }, disabled: true - - label: "Step 3: TH reads from the DUT the OnMode attribute." - PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.A0002 + - label: "Step 5: TH reads from the DUT the OnMode attribute." + PICS: RVCCLEANM.S.A0000 && RVCCLEANM.S.A0002 verification: | - ./chip-tool rvcleanm read on-mode 1 1 + Set onmode to any integer value because as default it value has null. + + ./chip-tool rvccleanmode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690184081.114871][15327:15329] CHIP:DMG: StatusIB = + [1690184081.114874][15327:15329] CHIP:DMG: { + [1690184081.114877][15327:15329] CHIP:DMG: status = 0x00 (SUCCESS), + [1690184081.114879][15327:15329] CHIP:DMG: }, + [1690184081.114883][15327:15329] CHIP:DMG: + + ./chip-tool rvccleanmode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as old_on_mode_dut, below is the sample log provided for the raspi platform, here OnMode attribute value is 0 + NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. Else proceed to step 8. - [1654780979.979743][61542:61547] CHIP:DMG: } - [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 + [1690184107.425807][15339:15341] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3807724302 + [1690184107.425849][15339:15341] CHIP:TOO: OnMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: RVCCLEANM.S.A0000 && RVCCLEANM.S.A0002 verification: | - NOTE: - If the StartUpMode and OnMode attributes have the same value, proceed to step 4, Otherwise proceed to step 6. - - ./chip-tool rvcleanm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1685020074.437287][16950:16952] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3898153349 - [1685020074.437313][16950:16952] CHIP:TOO: SupportedModes: 3 entries - [1685020074.437620][16950:16952] CHIP:TOO: [1]: { - [1685020074.437632][16950:16952] CHIP:TOO: Label: Black - [1685020074.437635][16950:16952] CHIP:TOO: Mode: 0 - [1685020074.437823][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437834][16950:16952] CHIP:TOO: [1]: { - [1685020074.437838][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437841][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437843][16950:16952] CHIP:TOO: } - [1685020074.437846][16950:16952] CHIP:TOO: } - [1685020074.437852][16950:16952] CHIP:TOO: [2]: { - [1685020074.437854][16950:16952] CHIP:TOO: Label: Cappuccino - [1685020074.437857][16950:16952] CHIP:TOO: Mode: 4 - [1685020074.437861][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437865][16950:16952] CHIP:TOO: [1]: { - [1685020074.437868][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437870][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437873][16950:16952] CHIP:TOO: } - [1685020074.437876][16950:16952] CHIP:TOO: } - [1685020074.437881][16950:16952] CHIP:TOO: [3]: { - [1685020074.437883][16950:16952] CHIP:TOO: Label: Espresso - [1685020074.437885][16950:16952] CHIP:TOO: Mode: 7 - [1685020074.437889][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437892][16950:16952] CHIP:TOO: [1]: { - [1685020074.437895][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437897][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437900][16950:16952] CHIP:TOO: } - [1685020074.437902][16950:16952] CHIP:TOO: } + ./chip-tool rvccleanmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690184020.818299][15321:15323] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3807724300 + [1690184020.818324][15321:15323] CHIP:TOO: SupportedModes: 3 entries + [1690184020.818332][15321:15323] CHIP:TOO: [1]: { + [1690184020.818336][15321:15323] CHIP:TOO: Label: Vacuum + [1690184020.818341][15321:15323] CHIP:TOO: Mode: 0 + [1690184020.818345][15321:15323] CHIP:TOO: ModeTags: 1 entries + [1690184020.818351][15321:15323] CHIP:TOO: [1]: { + [1690184020.818354][15321:15323] CHIP:TOO: Value: 16385 + [1690184020.818357][15321:15323] CHIP:TOO: } + [1690184020.818360][15321:15323] CHIP:TOO: } + [1690184020.818365][15321:15323] CHIP:TOO: [2]: { + [1690184020.818368][15321:15323] CHIP:TOO: Label: Wash + [1690184020.818370][15321:15323] CHIP:TOO: Mode: 1 + [1690184020.818372][15321:15323] CHIP:TOO: ModeTags: 1 entries + [1690184020.818376][15321:15323] CHIP:TOO: [1]: { + [1690184020.818379][15321:15323] CHIP:TOO: Value: 16386 + [1690184020.818381][15321:15323] CHIP:TOO: } + [1690184020.818384][15321:15323] CHIP:TOO: } + [1690184020.818389][15321:15323] CHIP:TOO: [3]: { + [1690184020.818392][15321:15323] CHIP:TOO: Label: Deep clean + [1690184020.818394][15321:15323] CHIP:TOO: Mode: 2 + [1690184020.818398][15321:15323] CHIP:TOO: ModeTags: 2 entries + [1690184020.818402][15321:15323] CHIP:TOO: [1]: { + [1690184020.818404][15321:15323] CHIP:TOO: Value: 7 + [1690184020.818407][15321:15323] CHIP:TOO: } + [1690184020.818410][15321:15323] CHIP:TOO: [2]: { + [1690184020.818412][15321:15323] CHIP:TOO: Value: 16384 + [1690184020.818415][15321:15323] CHIP:TOO: } + [1690184020.818418][15321:15323] CHIP:TOO: } disabled: true - label: - "Step 5: TH writes to the DUT the OnMode attribute with the + "Step 7: TH writes to the DUT the OnMode attribute with the new_mode_th value" PICS: RVCCLEANM.S.A0003 verification: | - ./chip-tool rvcleanm write on-mode 7 1 1 + ./chip-tool rvccleanmode write on-mode 1 1 1 On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = - [1651099941884] [84269:7567211] CHIP: [DMG] [ - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, - [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, - [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, - [1651099941887] [84269:7567211] CHIP: [DMG] } - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] ], - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 - [1651099941887] [84269:7567211] CHIP: [DMG] } + [1690184081.114871][15327:15329] CHIP:DMG: StatusIB = + [1690184081.114874][15327:15329] CHIP:DMG: { + [1690184081.114877][15327:15329] CHIP:DMG: status = 0x00 (SUCCESS), + [1690184081.114879][15327:15329] CHIP:DMG: }, + [1690184081.114883][15327:15329] CHIP:DMG: disabled: true - - label: "Step 6: TH reads from the DUT the OnMode attribute." - PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.F00 + - label: "Step 8: TH reads from the DUT the OnMode attribute." + PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm read on-mode 1 1 + ./chip-tool rvccleanmode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer value + - Save the value as new_on_mode_dut and is equal to new_mode_th, below is the sample log provided for the raspi platform, Here OnMode attribute value is 1 - } - [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 + [1690184107.425807][15339:15341] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3807724302 + [1690184107.425849][15339:15341] CHIP:TOO: OnMode: 1 disabled: true - label: - "Step 7: TH writes to the DUT the StartUpOnOff attribute with the + "Step 9: TH writes to the DUT the StartUpOnOff attribute with the value 1." PICS: OO.S.A4003 verification: | @@ -181,20 +252,30 @@ tests: [1651101661960] [90832:7598169] CHIP: [DMG] } disabled: true - - label: "Step 8: Physically power cycle the device" + - label: "Step 10: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 + - label: "Step 11: TH reads from the DUT the StartUpMode attribute." + PICS: RVCCLEANM.S.A0002 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvcrunmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is 0 + [1690546417.725863][3168:3170] CHIP:DMG: } + [1690546417.726042][3168:3170] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 3746592465 + [1690546417.726109][3168:3170] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." + PICS: RVCCLEANM.S.A0001 + verification: | + ./chip-tool rvccleanmode read current-mode 1 1 - On TH(chip-tool),Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_on_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - } - [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 + [1690551030.852196][219235:219237] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 2491081179 + [1690551030.852224][219235:219237] CHIP:TOO: CurrentMode: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml index d0091a46667466..a18554e6955246 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml @@ -19,7 +19,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Rvc Operational State" + cluster: "RVC Operational State" endpoint: 1 tests: @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision attribute from the DUT" - PICS: RVCOPSTATE.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -41,7 +40,6 @@ tests: type: int16u - label: "Step 3: TH reads the FeatureMap attribute from the DUT" - PICS: RVCOPSTATE.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -50,7 +48,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads the AttributeList attribute from the DUT" - PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -60,7 +58,7 @@ tests: [0, 1, 3, 4, 5, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: TH reads the AttributeList attribute from the DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -71,7 +69,7 @@ tests: - label: "Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT" - PICS: RVCOPSTATE.S.A0002 && RVCOPSTATE.S.Afffb + PICS: RVCOPSTATE.S.A0002 command: "readAttribute" attribute: "AttributeList" response: @@ -80,7 +78,7 @@ tests: contains: [2] - label: "Step 5a: TH reads from the DUT the EventList attribute." - PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -91,7 +89,7 @@ tests: - label: "Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList." - PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01 && RVCOPSTATE.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01 command: "readAttribute" attribute: "EventList" response: @@ -99,35 +97,35 @@ tests: type: list contains: [0x01] - - label: "Step 6a: Read the optional command(Start) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C02.Rsp && RVCOPSTATE.S.Afff9 + - label: "Step 6a: Read the optional command(Pause) in AcceptedCommandList" + PICS: RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C03.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [1, 2] + contains: [0, 3] - label: "Step 6b: Read the optional command(Stop) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C01.Rsp && RVCOPSTATE.S.Afff9 + PICS: RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [1] + contains: [1, 2] - - label: "Step 6c: Read the optional command(Pause) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C00.Rsp && RVCOPSTATE.S.Afff9 + - label: "Step 6c: Read the optional command(Start) in AcceptedCommandList" + PICS: RVCOPSTATE.S.C02.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 3] + contains: [2] - label: "Step 6d: Read the optional command(Resume) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C03.Rsp && RVCOPSTATE.S.Afff9 + PICS: RVCOPSTATE.S.C03.Rsp || RVCOPSTATE.S.C00.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -137,8 +135,8 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" PICS: - RVCOPSTATE.S.Afff8 && (RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || - RVCOPSTATE.S.C02.Rsp || RVCOPSTATE.S.C03.Rsp) + " RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp + || RVCOPSTATE.S.C03.Rsp " command: "readAttribute" attribute: "GeneratedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml index a07df119487273..75fb98f6ff69b1 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,75 +39,73 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: RVCRUNM.S.A0000 verification: | - ./chip-tool rvcrunm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: - - [1654595167.600241][14362:14367] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595167.600345][14362:14367] CHIP:TOO: SupportedModes: 3 entries - [1654595167.600403][14362:14367] CHIP:TOO: [1]: { - [1654595167.600430][14362:14367] CHIP:TOO: Label: Black - [1654595167.600466][14362:14367] CHIP:TOO: Mode: 0 - [1654595167.600495][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.600564][14362:14367] CHIP:TOO: [1]: { - [1654595167.600589][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.600612][14362:14367] CHIP:TOO: Value: 0 - [1654595167.600637][14362:14367] CHIP:TOO: } - [1654595167.600662][14362:14367] CHIP:TOO: } - [1654595167.600695][14362:14367] CHIP:TOO: [2]: { - [1654595167.600719][14362:14367] CHIP:TOO: Label: Cappuccino - [1654595167.600742][14362:14367] CHIP:TOO: Mode: 4 - [1654595167.600768][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.600796][14362:14367] CHIP:TOO: [1]: { - [1654595167.600820][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.600842][14362:14367] CHIP:TOO: Value: 0 - [1654595167.600865][14362:14367] CHIP:TOO: } - [1654595167.600889][14362:14367] CHIP:TOO: } - [1654595167.600921][14362:14367] CHIP:TOO: [3]: { - [1654595167.600945][14362:14367] CHIP:TOO: Label: Espresso - [1654595167.600968][14362:14367] CHIP:TOO: Mode: 7 - [1654595167.600993][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.601022][14362:14367] CHIP:TOO: [1]: { - [1654595167.601046][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.601068][14362:14367] CHIP:TOO: Value: 0 - [1654595167.601091][14362:14367] CHIP:TOO: } - [1654595167.601115][14362:14367] CHIP:TOO: } + ./chip-tool rvcrunmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that list should contain at least one entry + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value + - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 + - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690177496.793840][6284:6286] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 551764487 + [1690177496.794090][6284:6286] CHIP:TOO: SupportedModes: 3 entries + [1690177496.794285][6284:6286] CHIP:TOO: [1]: { + [1690177496.794343][6284:6286] CHIP:TOO: Label: Idle + [1690177496.794396][6284:6286] CHIP:TOO: Mode: 0 + [1690177496.794457][6284:6286] CHIP:TOO: ModeTags: 1 entries + [1690177496.794573][6284:6286] CHIP:TOO: [1]: { + [1690177496.794631][6284:6286] CHIP:TOO: Value: 16384 + [1690177496.794682][6284:6286] CHIP:TOO: } + [1690177496.794737][6284:6286] CHIP:TOO: } + [1690177496.794809][6284:6286] CHIP:TOO: [2]: { + [1690177496.794861][6284:6286] CHIP:TOO: Label: Cleaning + [1690177496.794910][6284:6286] CHIP:TOO: Mode: 1 + [1690177496.794967][6284:6286] CHIP:TOO: ModeTags: 1 entries + [1690177496.795031][6284:6286] CHIP:TOO: [1]: { + [1690177496.795085][6284:6286] CHIP:TOO: Value: 16385 + [1690177496.795135][6284:6286] CHIP:TOO: } + [1690177496.795186][6284:6286] CHIP:TOO: } + [1690177496.795257][6284:6286] CHIP:TOO: [3]: { + [1690177496.795309][6284:6286] CHIP:TOO: Label: Mapping + [1690177496.795358][6284:6286] CHIP:TOO: Mode: 2 + [1690177496.795415][6284:6286] CHIP:TOO: ModeTags: 1 entries + [1690177496.795478][6284:6286] CHIP:TOO: [1]: { + [1690177496.795531][6284:6286] CHIP:TOO: Value: 16384 + [1690177496.795581][6284:6286] CHIP:TOO: } + [1690177496.795632][6284:6286] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | - ./chip-tool rvcrunm read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut and below is the sample log provided for the raspi platform: + ./chip-tool rvcrunmode read current-mode 1 1 - [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 + [1690177606.359517][6295:6297] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 551764487 + [1690177606.359639][6295:6297] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 verification: | - ./chip-tool rvcrunm read on-mode 1 1 + ./chip-tool rvcrunmode read on-mode 1 1 - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null), below is the sample log provided for the raspi platform, Here OnMode attribute value is Null - - [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 - - [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null + [1690177656.364979][6304:6306] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 551764487 + [1690177656.365109][6304:6306] CHIP:TOO: OnMode: null disabled: true - label: "Step 5: TH reads from the DUT the StartUpMode attribute." PICS: RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read start-up-mode 1 1 - - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: - + ./chip-tool rvcrunmode read start-up-mode 1 1 - [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null - [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 + [1690177698.954736][6311:6313] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 551764487 + [1690177698.954865][6311:6313] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml index 9bee2e3539087c..02ecb4f0a3d981 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml @@ -34,143 +34,182 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: RVCRUNM.S.A0000 verification: | - ./chip-tool rvcrunm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: - - [1685018204.991818][16390:16392] CHIP:DMG: } - [1685018204.992182][16390:16392] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3673378954 - [1685018204.992279][16390:16392] CHIP:TOO: SupportedModes: 3 entries - [1685018204.992320][16390:16392] CHIP:TOO: [1]: { - [1685018204.992331][16390:16392] CHIP:TOO: Label: Black - [1685018204.992350][16390:16392] CHIP:TOO: Mode: 0 - [1685018204.992376][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992408][16390:16392] CHIP:TOO: [1]: { - [1685018204.992420][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992430][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992440][16390:16392] CHIP:TOO: } - [1685018204.992452][16390:16392] CHIP:TOO: } - [1685018204.992482][16390:16392] CHIP:TOO: [2]: { - [1685018204.992492][16390:16392] CHIP:TOO: Label: Cappuccino - [1685018204.992504][16390:16392] CHIP:TOO: Mode: 4 - [1685018204.992525][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992547][16390:16392] CHIP:TOO: [1]: { - [1685018204.992558][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992567][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992578][16390:16392] CHIP:TOO: } - [1685018204.992588][16390:16392] CHIP:TOO: } - [1685018204.992610][16390:16392] CHIP:TOO: [3]: { - [1685018204.992619][16390:16392] CHIP:TOO: Label: Espresso - [1685018204.992628][16390:16392] CHIP:TOO: Mode: 7 - [1685018204.992641][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992657][16390:16392] CHIP:TOO: [1]: { - [1685018204.992666][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992678][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992687][16390:16392] CHIP:TOO: } - [1685018204.992695][16390:16392] CHIP:TOO: } + ./chip-tool rvcrunmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690177742.429087][6315:6317] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 551764487 + [1690177742.429341][6315:6317] CHIP:TOO: SupportedModes: 3 entries + [1690177742.429483][6315:6317] CHIP:TOO: [1]: { + [1690177742.429540][6315:6317] CHIP:TOO: Label: Idle + [1690177742.429595][6315:6317] CHIP:TOO: Mode: 0 + [1690177742.429658][6315:6317] CHIP:TOO: ModeTags: 1 entries + [1690177742.429732][6315:6317] CHIP:TOO: [1]: { + [1690177742.429791][6315:6317] CHIP:TOO: Value: 16384 + [1690177742.429842][6315:6317] CHIP:TOO: } + [1690177742.429892][6315:6317] CHIP:TOO: } + [1690177742.429967][6315:6317] CHIP:TOO: [2]: { + [1690177742.430020][6315:6317] CHIP:TOO: Label: Cleaning + [1690177742.430070][6315:6317] CHIP:TOO: Mode: 1 + [1690177742.430188][6315:6317] CHIP:TOO: ModeTags: 1 entries + [1690177742.430263][6315:6317] CHIP:TOO: [1]: { + [1690177742.430320][6315:6317] CHIP:TOO: Value: 16385 + [1690177742.430374][6315:6317] CHIP:TOO: } + [1690177742.430427][6315:6317] CHIP:TOO: } + [1690177742.430501][6315:6317] CHIP:TOO: [3]: { + [1690177742.430555][6315:6317] CHIP:TOO: Label: Mapping + [1690177742.430605][6315:6317] CHIP:TOO: Mode: 2 + [1690177742.430664][6315:6317] CHIP:TOO: ModeTags: 1 entries + [1690177742.430729][6315:6317] CHIP:TOO: [1]: { + [1690177742.430784][6315:6317] CHIP:TOO: Value: 16384 + [1690177742.430901][6315:6317] CHIP:TOO: } + [1690177742.430966][6315:6317] CHIP:TOO: } disabled: true - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | - ./chip-tool rvcrunm read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - save tha value as old_current_mode_dut - - select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th - - select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + ./chip-tool rvcrunmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1690177776.069002][6321:6323] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 551764487 + [1690177776.069137][6321:6323] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set - to old_current_mode_dut [Petru] note that currently this constraint is - not in the spec. The unapproved proposal is here: - https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/7096 - Until that's approved, please skip this step." + "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set + to old_current_mode_dut" PICS: RVCRUNM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + ./chip-tool rvcrunmode change-to-mode 1 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690177967.451381][6333:6335] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690177967.451491][6333:6335] CHIP:TOO: ChangeToModeResponse: { + [1690177967.451542][6333:6335] CHIP:TOO: status: 0 + [1690177967.451590][6333:6335] CHIP:TOO: } disabled: true - label: - "Step 4: Manually put the device in a state from which it will FAIL to - transition to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" + "Step 5: Manually put the device in a state from which it will FAIL to + transition to PIXIT.RVCRUNM.MODE_CHANGE_FAIL" + PICS: PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE verification: | - + Manual operation required disabled: true - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | + ./chip-tool rvcrunmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 + [1690202974.725219][18214:18216] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2507484088 + [1690202974.725506][18214:18216] CHIP:TOO: CurrentMode: 1 disabled: true - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" - PICS: RVCRUNM.S.C00.Rsp + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set + to PIXIT.RVCRUNM.MODE_CHANGE_FAIL" + PICS: PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE && RVCRUNM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + ./chip-tool rvcrunmode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and StatusText field has a length between 1 and 64, below is the sample log provided for the raspi platform: + + [1690178461.944185][6368:6370] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690178461.944369][6368:6370] CHIP:TOO: ChangeToModeResponse: { + [1690178461.944457][6368:6370] CHIP:TOO: status: 2 + [1690178461.944517][6368:6370] CHIP:TOO: statusText: Change to the mapping mode is only allowed from idle + [1690178461.944578][6368:6370] CHIP:TOO: } disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + [1690203073.106487][18256:18258] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915104 + [1690203073.106525][18256:18258] CHIP:TOO: CurrentMode: 1 disabled: true - label: - "Step 8: Manually put the device in a state from which it will - SUCCESSFULLY transition to PIXIT.RVCCLEANM.MODE_CHANGE_OK" + "Step 9: Manually put the device in a state from which it will + SUCCESSFULLY transition to PIXIT.RVCRUNM.MODE_CHANGE_OK" verification: | - + Manual operation required disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | + ./chip-tool rvcrunmode read current-mode 1 1 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 + + [1690203090.571985][18263:18265] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915104 + [1690203090.571996][18263:18265] CHIP:TOO: CurrentMode: 1 disabled: true - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCCLEANM.MODE_CHANGE_OK" + "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set + to PIXIT.RVCRUNM.MODE_CHANGE_OK" PICS: RVCRUNM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + ./chip-tool rvcrunmode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690178355.021382][6358:6360] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690178355.021533][6358:6360] CHIP:TOO: ChangeToModeResponse: { + [1690178355.021692][6358:6360] CHIP:TOO: status: 0 + [1690178355.021750][6358:6360] CHIP:TOO: } disabled: true - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | + ./chip-tool rvcrunmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690203144.862081][18275:18277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915105 + [1690203144.862121][18275:18277] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: RVCRUNM.S.C00.Rsp verification: | + ./chip-tool rvcrunmode change-to-mode 5 1 1 + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: + + [1690178736.566529][6381:6383] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690178736.566677][6381:6383] CHIP:TOO: ChangeToModeResponse: { + [1690178736.566761][6381:6383] CHIP:TOO: status: 1 + [1690178736.566816][6381:6383] CHIP:TOO: } disabled: true - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + - label: "Step 14: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | + ./chip-tool rvcrunmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690203158.762178][18282:18284] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915105 + [1690203158.762194][18282:18284] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml index e39f50f1870ba6..5279d6c054270a 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml @@ -24,6 +24,27 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. RVC Run Mode and OnOff clusters are available on the same endpoint + + 2. The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + disabled: true + + - label: "Note" + verification: | + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool rvcrunmode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690178870.051558][6396:6398] CHIP:DMG: StatusIB = + [1690178870.051652][6396:6398] CHIP:DMG: { + [1690178870.051727][6396:6398] CHIP:DMG: status = 0x00 (SUCCESS), + [1690178870.051799][6396:6398] CHIP:DMG: }, + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,63 +55,65 @@ tests: - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm read on-mode 1 1 + ./chip-tool rvcrunmode read on-mode 1 1 - On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 - [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 + [1690265382.010747][30073:30075] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 172461204 + [1690265382.010769][30073:30075] CHIP:TOO: OnMode: 0 disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute is an integer. + Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 + [1690179152.516820][6454:6456] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2795852718 + [1690179152.516952][6454:6456] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: RVCRUNM.S.A0000 && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } + ./chip-tool rvcrunmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690179211.761627][6462:6464] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 2795852718 + [1690179211.761873][6462:6464] CHIP:TOO: SupportedModes: 3 entries + [1690179211.762019][6462:6464] CHIP:TOO: [1]: { + [1690179211.762079][6462:6464] CHIP:TOO: Label: Idle + [1690179211.762131][6462:6464] CHIP:TOO: Mode: 0 + [1690179211.762193][6462:6464] CHIP:TOO: ModeTags: 1 entries + [1690179211.762265][6462:6464] CHIP:TOO: [1]: { + [1690179211.762324][6462:6464] CHIP:TOO: Value: 16384 + [1690179211.762376][6462:6464] CHIP:TOO: } + [1690179211.762429][6462:6464] CHIP:TOO: } + [1690179211.762502][6462:6464] CHIP:TOO: [2]: { + [1690179211.762555][6462:6464] CHIP:TOO: Label: Cleaning + [1690179211.762605][6462:6464] CHIP:TOO: Mode: 1 + [1690179211.762664][6462:6464] CHIP:TOO: ModeTags: 1 entries + [1690179211.762729][6462:6464] CHIP:TOO: [1]: { + [1690179211.762785][6462:6464] CHIP:TOO: Value: 16385 + [1690179211.762843][6462:6464] CHIP:TOO: } + [1690179211.762892][6462:6464] CHIP:TOO: } + [1690179211.762966][6462:6464] CHIP:TOO: [3]: { + [1690179211.763019][6462:6464] CHIP:TOO: Label: Mapping + [1690179211.763069][6462:6464] CHIP:TOO: Mode: 2 + [1690179211.763127][6462:6464] CHIP:TOO: ModeTags: 1 entries + [1690179211.763193][6462:6464] CHIP:TOO: [1]: { + [1690179211.763248][6462:6464] CHIP:TOO: Value: 16384 + [1690179211.763299][6462:6464] CHIP:TOO: } + [1690179211.763351][6462:6464] CHIP:TOO: } disabled: true - label: @@ -98,16 +121,14 @@ tests: to new_mode_th" PICS: RVCRUNM.S.C00.Rsp && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm change-to-mode 7 1 1 + ./chip-tool rvcrunmode change-to-mode 1 1 1 - On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: + [1690179263.329118][6471:6473] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690179263.329338][6471:6473] CHIP:TOO: ChangeToModeResponse: { + [1690179263.329435][6471:6473] CHIP:TOO: status: 0 + [1690179263.329489][6471:6473] CHIP:TOO: } disabled: true - label: "Step 6: TH sends a Off command to the DUT" @@ -139,10 +160,10 @@ tests: - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode read current-mode 1 1 - On TH(chip-tool),verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 0 + [1690179336.313000][6489:6491] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2795852720 + [1690179336.313132][6489:6491] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml index 962f9c02e50dbe..47f0fdfb340d75 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml @@ -24,6 +24,24 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + + - label: "Note" + verification: | + To Execute the TC-RVCRUNM-3.2 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,96 +52,165 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read start-up-mode 1 1 + ./chip-tool rvcrunmode read start-up-mode 1 1 - On TH(chip-tool), Verify StartUpMode attribute value is an integer. save the valueas startup_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify StartUpMode attribute value is an integer. + - Save the value as startup_mode_dut + - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + and below is the sample log provided for the raspi platform: + - Here StartUpMode value is null proced to step3 - [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 - [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 + [1690543468.611591][2895:2897] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 2245114918 + [1690543468.611648][2895:2897] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: RVCRUNM.S.A0000 + verification: | + ./chip-tool rvcrunmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690179857.830697][14130:14132] CHIP:DMG: } + [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 + [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries + [1690179857.831069][14130:14132] CHIP:TOO: [1]: { + [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle + [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 + [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831090][14130:14132] CHIP:TOO: [1]: { + [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831096][14130:14132] CHIP:TOO: } + [1690179857.831099][14130:14132] CHIP:TOO: } + [1690179857.831104][14130:14132] CHIP:TOO: [2]: { + [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning + [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 + [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831115][14130:14132] CHIP:TOO: [1]: { + [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 + [1690179857.831121][14130:14132] CHIP:TOO: } + [1690179857.831124][14130:14132] CHIP:TOO: } + [1690179857.831128][14130:14132] CHIP:TOO: [3]: { + [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping + [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 + [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831138][14130:14132] CHIP:TOO: [1]: { + [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831143][14130:14132] CHIP:TOO: } + [1690179857.831146][14130:14132] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode write start-up-mode 0 1 1 - On TH(chip-tool), Verify CurrentMode attribute value is integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690179737.189558][14110:14112] CHIP:DMG: StatusIB = + [1690179737.189576][14110:14112] CHIP:DMG: { + [1690179737.189592][14110:14112] CHIP:DMG: status = 0x00 (SUCCESS), + [1690179737.189607][14110:14112] CHIP:DMG: }, + disabled: true + + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + PICS: RVCRUNM.S.A0001 + verification: | + ./chip-tool rvcrunmode read current-mode 1 1 - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + [1690180034.919766][14170:14172] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 1228902958 + [1690180034.919778][14170:14172] CHIP:TOO: CurrentMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: RVCRUNM.S.A0000 verification: | - ./chip-tool rvcrunm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } + ./chip-tool rvcrunmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690179857.830697][14130:14132] CHIP:DMG: } + [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 + [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries + [1690179857.831069][14130:14132] CHIP:TOO: [1]: { + [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle + [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 + [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831090][14130:14132] CHIP:TOO: [1]: { + [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831096][14130:14132] CHIP:TOO: } + [1690179857.831099][14130:14132] CHIP:TOO: } + [1690179857.831104][14130:14132] CHIP:TOO: [2]: { + [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning + [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 + [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831115][14130:14132] CHIP:TOO: [1]: { + [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 + [1690179857.831121][14130:14132] CHIP:TOO: } + [1690179857.831124][14130:14132] CHIP:TOO: } + [1690179857.831128][14130:14132] CHIP:TOO: [3]: { + [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping + [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 + [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831138][14130:14132] CHIP:TOO: [1]: { + [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831143][14130:14132] CHIP:TOO: } + [1690179857.831146][14130:14132] CHIP:TOO: } disabled: true - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: RVCRUNM.S.C00.Rsp verification: | - ./chip-tool rvcrunm change-to-mode 4 1 1 + ./chip-tool rvcrunmode change-to-mode 1 1 1 + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - On TH(chip-tool) , Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931419.768138][20792:20794] CHIP:DMG: StatusIB = - [1684931419.768143][20792:20794] CHIP:DMG: { - [1684931419.768148][20792:20794] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931419.768152][20792:20794] CHIP:DMG: }, + [1690179905.782387][14141:14143] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690179905.782401][14141:14143] CHIP:TOO: ChangeToModeResponse: { + [1690179905.782405][14141:14143] CHIP:TOO: status: 0 + [1690179905.782408][14141:14143] CHIP:TOO: } disabled: true - - label: "Step 6: Physically power cycle the device" + - label: "Step 8: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 9: TH reads from the DUT the StartUpMode attribute." + PICS: RVCRUNM.S.A0002 + verification: | + ./chip-tool rvcrunmode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer. + - Save the value as new_start_up_mode_dut and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform: + - Here StartUpMode value is 0 + + [1690544350.025546][2955:2957] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 3877802510 + [1690544350.025630][2955:2957] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode read current-mode 1 1 - on TH(chip-tool), Verify that CurrentMode attribute value is same as value recorded in step 1 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + [1690180034.919766][14170:14172] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 1228902958 + [1690180034.919778][14170:14172] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml index 8f8df3e8e1ce51..ef3fd5d593e056 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml @@ -26,6 +26,24 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + + - label: "Note" + verification: | + To Execute the TC-RVCRUNM-3.3 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -36,118 +54,163 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read start-up-mode 1 1 + ./chip-tool rvcrunmode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer or null + - Save the value as startup_mode_dut + - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + and below is the sample log provided for the raspi platform: + - Here StartUpMode value is null proced to step3 + + [1690543468.611591][2895:2897] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 2245114918 + [1690543468.611648][2895:2897] CHIP:TOO: StartUpMode: null + disabled: true + + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: RVCRUNM.S.A0000 + verification: | + ./chip-tool rvcrunmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th., below is the sample log provided for the raspi platform: + + [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 + [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries + [1690179857.831069][14130:14132] CHIP:TOO: [1]: { + [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle + [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 + [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831090][14130:14132] CHIP:TOO: [1]: { + [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831096][14130:14132] CHIP:TOO: } + [1690179857.831099][14130:14132] CHIP:TOO: } + [1690179857.831104][14130:14132] CHIP:TOO: [2]: { + [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning + [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 + [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831115][14130:14132] CHIP:TOO: [1]: { + [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 + [1690179857.831121][14130:14132] CHIP:TOO: } + [1690179857.831124][14130:14132] CHIP:TOO: } + [1690179857.831128][14130:14132] CHIP:TOO: [3]: { + [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping + [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 + [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831138][14130:14132] CHIP:TOO: [1]: { + [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831143][14130:14132] CHIP:TOO: } + [1690179857.831146][14130:14132] CHIP:TOO: } + disabled: true - On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: RVCRUNM.S.A0002 + verification: | + ./chip-tool rvcrunmode write start-up-mode 0 1 1 + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 + [1690179737.189558][14110:14112] CHIP:DMG: StatusIB = + [1690179737.189576][14110:14112] CHIP:DMG: { + [1690179737.189592][14110:14112] CHIP:DMG: status = 0x00 (SUCCESS), + [1690179737.189607][14110:14112] CHIP:DMG: }, disabled: true - - label: "Step 3: TH reads from the DUT the OnMode attribute." + - label: "Step 5: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 && RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read on-mode 1 1 + Set onmode to any integer value because as default it value has null. + + ./chip-tool rvcrunmode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690180177.665893][14211:14213] CHIP:DMG: StatusIB = + [1690180177.665905][14211:14213] CHIP:DMG: { + [1690180177.665917][14211:14213] CHIP:DMG: status = 0x00 (SUCCESS), + [1690180177.665927][14211:14213] CHIP:DMG: }, + + ./chip-tool rvcrunmode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as old_on_mode_dut , below is the sample log provided for the raspi platform, OnMode attribute value is 0 + NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 4. Else proceed to step 6. - [1654780979.979743][61542:61547] CHIP:DMG: } - [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 + [1690544833.540939][2984:2986] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 3877802512 + [1690544833.541032][2984:2986] CHIP:TOO: OnMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: RVCRUNM.S.A0000 && RVCRUNM.S.A0002 verification: | - NOTE: - If the StartUpMode and OnMode attributes have the same value, proceed to step 4, Otherwise proceed to step 6. - - ./chip-tool rvcrunm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1685020074.437287][16950:16952] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3898153349 - [1685020074.437313][16950:16952] CHIP:TOO: SupportedModes: 3 entries - [1685020074.437620][16950:16952] CHIP:TOO: [1]: { - [1685020074.437632][16950:16952] CHIP:TOO: Label: Black - [1685020074.437635][16950:16952] CHIP:TOO: Mode: 0 - [1685020074.437823][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437834][16950:16952] CHIP:TOO: [1]: { - [1685020074.437838][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437841][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437843][16950:16952] CHIP:TOO: } - [1685020074.437846][16950:16952] CHIP:TOO: } - [1685020074.437852][16950:16952] CHIP:TOO: [2]: { - [1685020074.437854][16950:16952] CHIP:TOO: Label: Cappuccino - [1685020074.437857][16950:16952] CHIP:TOO: Mode: 4 - [1685020074.437861][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437865][16950:16952] CHIP:TOO: [1]: { - [1685020074.437868][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437870][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437873][16950:16952] CHIP:TOO: } - [1685020074.437876][16950:16952] CHIP:TOO: } - [1685020074.437881][16950:16952] CHIP:TOO: [3]: { - [1685020074.437883][16950:16952] CHIP:TOO: Label: Espresso - [1685020074.437885][16950:16952] CHIP:TOO: Mode: 7 - [1685020074.437889][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437892][16950:16952] CHIP:TOO: [1]: { - [1685020074.437895][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437897][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437900][16950:16952] CHIP:TOO: } - [1685020074.437902][16950:16952] CHIP:TOO: } + ./chip-tool rvcrunmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 + [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries + [1690179857.831069][14130:14132] CHIP:TOO: [1]: { + [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle + [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 + [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831090][14130:14132] CHIP:TOO: [1]: { + [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831096][14130:14132] CHIP:TOO: } + [1690179857.831099][14130:14132] CHIP:TOO: } + [1690179857.831104][14130:14132] CHIP:TOO: [2]: { + [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning + [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 + [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831115][14130:14132] CHIP:TOO: [1]: { + [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 + [1690179857.831121][14130:14132] CHIP:TOO: } + [1690179857.831124][14130:14132] CHIP:TOO: } + [1690179857.831128][14130:14132] CHIP:TOO: [3]: { + [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping + [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 + [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831138][14130:14132] CHIP:TOO: [1]: { + [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831143][14130:14132] CHIP:TOO: } + [1690179857.831146][14130:14132] CHIP:TOO: } disabled: true - label: - "Step 5: TH writes to the DUT the OnMode attribute with the + "Step 7: TH writes to the DUT the OnMode attribute with the new_mode_th value" PICS: RVCRUNM.S.A0003 verification: | - ./chip-tool rvcrunm write on-mode 7 1 1 + ./chip-tool rvcrunmode write on-mode 1 1 1 On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = - [1651099941884] [84269:7567211] CHIP: [DMG] [ - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, - [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, - [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, - [1651099941887] [84269:7567211] CHIP: [DMG] } - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] ], - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 - [1651099941887] [84269:7567211] CHIP: [DMG] } + [1690180177.665893][14211:14213] CHIP:DMG: StatusIB = + [1690180177.665905][14211:14213] CHIP:DMG: { + [1690180177.665917][14211:14213] CHIP:DMG: status = 0x00 (SUCCESS), + [1690180177.665927][14211:14213] CHIP:DMG: }, disabled: true - - label: "Step 6: TH reads from the DUT the OnMode attribute." + - label: "Step 8: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm read on-mode 1 1 + ./chip-tool rvcrunmode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as new_on_mode_dut and is equal to new_mode_th, below is the sample log provided for the raspi platform, OnMode attribute value is 1 - } - [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 + [1690544833.540939][2984:2986] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 3877802512 + [1690544833.541032][2984:2986] CHIP:TOO: OnMode: 1 disabled: true - label: - "Step 7: TH writes to the DUT the StartUpOnOff attribute with the + "Step 9: TH writes to the DUT the StartUpOnOff attribute with the value 1." PICS: OO.S.A4003 verification: | @@ -155,46 +218,35 @@ tests: On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651101661959] [90832:7598169] CHIP: [DMG] WriteResponseMessage = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIBs = - [1651101661959] [90832:7598169] CHIP: [DMG] [ - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIB = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] AttributePathIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] Endpoint = 0x1, - [1651101661960] [90832:7598169] CHIP: [DMG] Cluster = 0x6, - [1651101661960] [90832:7598169] CHIP: [DMG] Attribute = 0x0000_4003, - [1651101661960] [90832:7598169] CHIP: [DMG] } - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] StatusIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] ], - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 - [1651101661960] [90832:7598169] CHIP: [DMG] } + [1690180270.884152][14228:14230] CHIP:DMG: { + [1690180270.884156][14228:14230] CHIP:DMG: status = 0x00 (SUCCESS), + [1690180270.884158][14228:14230] CHIP:DMG: }, disabled: true - - label: "Step 8: Physically power cycle the device" + - label: "Step 10: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 + - label: "Step 11: TH reads from the DUT the StartUpMode attribute." + PICS: RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode read start-up-mode 1 1 + On TH(chip-tool), Verify StartUpMode attribute value is an integer and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + + [1690543468.611591][2895:2897] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 2245114918 + [1690543468.611648][2895:2897] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." + PICS: RVCRUNM.S.A0001 + verification: | + ./chip-tool rvcrunmode read current-mode 1 1 - On TH(chip-tool),Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer and is equal to new_on_mode_dut, below is the sample log provided for the raspi platform, CurrentMode attribute value is 1 - } - [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 + [1690545265.495445][3004:3006] CHIP:DMG: } + [1690545265.495612][3004:3006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 3877802512 + [1690545265.495679][3004:3006] CHIP:TOO: CurrentMode: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_3.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_3.yaml index 9d915ebea90e86..edcc8d93abeed1 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_3.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# 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. @@ -13,7 +13,7 @@ # 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: 18.1.3. [TC-SC-5.3] Sending a group message - DUT to TH +name: 26.3.5. [TC-SC-5.3] Sending a group message - DUT to TH PICS: - MCORE.ROLE.COMMISSIONER @@ -35,55 +35,140 @@ tests: DUT and TH are commissioned. DUT supports Groups Cluster + + Execute the below mentioned command to put TH(Reference app) into a commissionable state in RPI platform, Pls use equivalent command on the respective platform + ./chip-all-clusters-app --trace_decode 1 + + Once TH reach the commissionable state pls send below mentioned command on DUT(chip-tool) in RPI platform. Pls use equivalent command on the respective platform + + ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 + + Verify the commissioning completed with success on DUT(Chip-tool) + + [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success disabled: true - - label: "TH should have the ACL entry with the AuthMode as Group by DUT" + - label: + "Step 1a: TH should have the ACL entry with the AuthMode as Group by + DUT" verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [259], "targets": null }]' 1 0 + Verify ACL WrireRequestMessage on TH(Reference app)log: + + [1687333786.479229][13848:13848] CHIP:DMG: WriteRequestMessage = + [1687333786.479247][13848:13848] CHIP:DMG: { + [1687333786.479257][13848:13848] CHIP:DMG: suppressResponse = false, + [1687333786.479269][13848:13848] CHIP:DMG: timedRequest = false, + [1687333786.479279][13848:13848] CHIP:DMG: AttributeDataIBs = + [1687333786.479298][13848:13848] CHIP:DMG: [ + [1687333786.479308][13848:13848] CHIP:DMG: AttributeDataIB = + [1687333786.479321][13848:13848] CHIP:DMG: { + [1687333786.479331][13848:13848] CHIP:DMG: AttributePathIB = + [1687333786.479342][13848:13848] CHIP:DMG: { + [1687333786.479355][13848:13848] CHIP:DMG: Endpoint = 0x0, + [1687333786.479367][13848:13848] CHIP:DMG: Cluster = 0x1f, + [1687333786.479379][13848:13848] CHIP:DMG: Attribute = 0x0000_0000, + [1687333786.479390][13848:13848] CHIP:DMG: } + [1687333786.479407][13848:13848] CHIP:DMG: + [1687333786.479419][13848:13848] CHIP:DMG: Data = [ + [1687333786.479432][13848:13848] CHIP:DMG: + [1687333786.479444][13848:13848] CHIP:DMG: ], + [1687333786.479454][13848:13848] CHIP:DMG: }, + [1687333786.479481][13848:13848] CHIP:DMG: + [1687333786.479491][13848:13848] CHIP:DMG: AttributeDataIB = + [1687333786.479501][13848:13848] CHIP:DMG: { + [1687333786.479513][13848:13848] CHIP:DMG: AttributePathIB = + [1687333786.479528][13848:13848] CHIP:DMG: { + [1687333786.479540][13848:13848] CHIP:DMG: Endpoint = 0x0, + [1687333786.479551][13848:13848] CHIP:DMG: Cluster = 0x1f, + [1687333786.479562][13848:13848] CHIP:DMG: Attribute = 0x0000_0000, + [1687333786.479576][13848:13848] CHIP:DMG: ListIndex = Null, + [1687333786.479586][13848:13848] CHIP:DMG: } + [1687333786.479599][13848:13848] CHIP:DMG: + [1687333786.479609][13848:13848] CHIP:DMG: Data = + [1687333786.479620][13848:13848] CHIP:DMG: { + [1687333786.479635][13848:13848] CHIP:DMG: 0x1 = 5, + [1687333786.479649][13848:13848] CHIP:DMG: 0x2 = 2, + [1687333786.479659][13848:13848] CHIP:DMG: 0x3 = [ + [1687333786.479674][13848:13848] CHIP:DMG: 112233, + [1687333786.479685][13848:13848] CHIP:DMG: ], + [1687333786.479698][13848:13848] CHIP:DMG: 0x4 = NULL + [1687333786.479709][13848:13848] CHIP:DMG: }, + [1687333786.479718][13848:13848] CHIP:DMG: }, + [1687333786.479750][13848:13848] CHIP:DMG: + [1687333786.479760][13848:13848] CHIP:DMG: AttributeDataIB = + [1687333786.479772][13848:13848] CHIP:DMG: { + [1687333786.479781][13848:13848] CHIP:DMG: AttributePathIB = + [1687333786.479793][13848:13848] CHIP:DMG: { + [1687333786.479803][13848:13848] CHIP:DMG: Endpoint = 0x0, + [1687333786.479815][13848:13848] CHIP:DMG: Cluster = 0x1f, + [1687333786.479829][13848:13848] CHIP:DMG: Attribute = 0x0000_0000, + [1687333786.479841][13848:13848] CHIP:DMG: ListIndex = Null, + [1687333786.479851][13848:13848] CHIP:DMG: } + [1687333786.479866][13848:13848] CHIP:DMG: + [1687333786.479876][13848:13848] CHIP:DMG: Data = + [1687333786.479889][13848:13848] CHIP:DMG: { + [1687333786.479901][13848:13848] CHIP:DMG: 0x1 = 4, + [1687333786.479913][13848:13848] CHIP:DMG: 0x2 = 3, + [1687333786.479929][13848:13848] CHIP:DMG: 0x3 = [ + [1687333786.479951][13848:13848] CHIP:DMG: 259, + [1687333786.479966][13848:13848] CHIP:DMG: ], + [1687333786.479978][13848:13848] CHIP:DMG: 0x4 = NULL + [1687333786.479991][13848:13848] CHIP:DMG: }, + [1687333786.480001][13848:13848] CHIP:DMG: }, + [1687333786.480020][13848:13848] CHIP:DMG: + [1687333786.480033][13848:13848] CHIP:DMG: ], + [1687333786.480071][13848:13848] CHIP:DMG: + [1687333786.480081][13848:13848] CHIP:DMG: moreChunkedMessages = false, + [1687333786.480092][13848:13848] CHIP:DMG: InteractionModelRevision = 1 + [1687333786.480101][13848:13848] CHIP:DMG: }, + + ./chip-tool accesscontrol read acl 1 0 - Verify that ACL entry with the AuthMode as Group is present on TH(Reference app)log: - - [1684162707.651064][28541:28543] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1331379855 - [1684162707.651080][28541:28543] CHIP:TOO: ACL: 2 entries - [1684162707.651089][28541:28543] CHIP:TOO: [1]: { - [1684162707.651095][28541:28543] CHIP:TOO: Privilege: 5 - [1684162707.651097][28541:28543] CHIP:TOO: AuthMode: 2 - [1684162707.651100][28541:28543] CHIP:TOO: Subjects: 1 entries - [1684162707.651103][28541:28543] CHIP:TOO: [1]: 112233 - [1684162707.651105][28541:28543] CHIP:TOO: Targets: null - [1684162707.651107][28541:28543] CHIP:TOO: FabricIndex: 1 - [1684162707.651109][28541:28543] CHIP:TOO: } - [1684162707.651113][28541:28543] CHIP:TOO: [2]: { - [1684162707.651115][28541:28543] CHIP:TOO: Privilege: 4 - [1684162707.651117][28541:28543] CHIP:TOO: AuthMode: 3 - [1684162707.651119][28541:28543] CHIP:TOO: Subjects: 1 entries - [1684162707.651122][28541:28543] CHIP:TOO: [1]: 259 - [1684162707.651124][28541:28543] CHIP:TOO: Targets: null - [1684162707.651126][28541:28543] CHIP:TOO: FabricIndex: 1 - [1684162707.651128][28541:28543] CHIP:TOO: } + Verify that ACL command on TH(Reference app)log: + + [1687333789.552788][13848:13848] CHIP:IM: Received Read request + [1687333789.552798][13848:13848] CHIP:DMG: ReadRequestMessage = + [1687333789.552801][13848:13848] CHIP:DMG: { + [1687333789.552803][13848:13848] CHIP:DMG: AttributePathIBs = + [1687333789.552807][13848:13848] CHIP:DMG: [ + [1687333789.552809][13848:13848] CHIP:DMG: AttributePathIB = + [1687333789.552812][13848:13848] CHIP:DMG: { + [1687333789.552815][13848:13848] CHIP:DMG: Endpoint = 0x0, + [1687333789.552818][13848:13848] CHIP:DMG: Cluster = 0x1f, + [1687333789.552821][13848:13848] CHIP:DMG: Attribute = 0x0000_0000, + [1687333789.552824][13848:13848] CHIP:DMG: } + [1687333789.552827][13848:13848] CHIP:DMG: + [1687333789.552830][13848:13848] CHIP:DMG: ], + [1687333789.552833][13848:13848] CHIP:DMG: + [1687333789.552836][13848:13848] CHIP:DMG: isFabricFiltered = true, + [1687333789.552839][13848:13848] CHIP:DMG: InteractionModelRevision = 1 + [1687333789.552841][13848:13848] CHIP:DMG: }, disabled: true - label: - "DUT generates fabric-unique GroupID, GroupName, random key, EpochKey0 - and GroupKeySetID. Save the GroupID as GroupID_1, GroupName as - GroupName_1 and GroupSetID" - PICS: GRPKEY.C.C00.Tx + "Step 1b: DUT generates fabric-unique GroupID, GroupName, random key, + EpochKey0 and GroupKeySetID. Save the GroupID as GroupID_1, GroupName + as GroupName_1 and GroupSetID_1" verification: | GroupKeySetID = 419 GroupID_1 = 259 GroupName_1 = "grp1" + EpochKey0 = d0d1d2d3d4d5d6d7d8d9dadbdcdddedf + EpochKey1 = d1d1d2d3d4d5d6d7d8d9dadbdcdddedf + EpochKey2 = d2d1d2d3d4d5d6d7d8d9dadbdcdddedf disabled: true - label: - "DUT sends KeySetWrite command to GroupKeyManagement cluster to TH on - EP0" + "Step 2: DUT sends KeySetWrite command to GroupKeyManagement cluster + to TH on EP0" PICS: GRPKEY.C.C00.Tx verification: | ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 419,"groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 - Verify that KeySetWrite with Group Set ID as 419 is present on TH(Reference app)log: + Verify that KeySetWrite command on TH(Reference app)log: [1684162878.418032][28333:28333] CHIP:DMG: { [1684162878.418034][28333:28333] CHIP:DMG: suppressResponse = false, @@ -131,13 +216,14 @@ tests: disabled: true - label: - "DUT binds GroupId with GroupKeySetID in the GroupKeyMap attribute - list on GroupKeyManagement cluster" + "Step 3: DUT binds GroupId with GroupKeySetID in the GroupKeyMap + attribute list on GroupKeyManagement cluster" PICS: GRPKEY.C.A0000 verification: | ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 259, "groupKeySetID": 419, "fabricIndex": 1},{"groupId": 257, "groupKeySetID": 419, "fabricIndex": 1}]' 1 0 Verify that group-key-map attribute with GroupID_1 as 259, GroupID_2 as 257 and Group Set ID as 419 is present on TH(Reference app)log: + [1684166126.545563][29258:29258] CHIP:DMG: WriteRequestMessage = [1684166126.545565][29258:29258] CHIP:DMG: { [1684166126.545567][29258:29258] CHIP:DMG: suppressResponse = false, @@ -201,47 +287,49 @@ tests: disabled: true - label: - "DUT sends AddGroup Command to DUT on EP0 with the the following - settings GroupID: GroupID_1 GroupName: GroupName_1" + "Step 4: DUT sends AddGroup Command to DUT on EP0 with the the + following settings GroupID: GroupID_1 GroupName: GroupName_1" PICS: G.C.C00.Tx verification: | + Note: + GroupID_1 = 259 + GroupName_1 = "grp1" + ./chip-tool groups add-group 259 'grp1' 1 1 Verify that AddGroup command with GroupID as 259 and group name as "grp1" is present on TH(Reference app)log: - [1684166282.551829][29258:29258] CHIP:DMG: InvokeRequestMessage = - [1684166282.551837][29258:29258] CHIP:DMG: { - [1684166282.551844][29258:29258] CHIP:DMG: suppressResponse = false, - [1684166282.551853][29258:29258] CHIP:DMG: timedRequest = false, - [1684166282.551859][29258:29258] CHIP:DMG: InvokeRequests = - [1684166282.551872][29258:29258] CHIP:DMG: [ - [1684166282.551879][29258:29258] CHIP:DMG: CommandDataIB = - [1684166282.551887][29258:29258] CHIP:DMG: { - [1684166282.551894][29258:29258] CHIP:DMG: CommandPathIB = - [1684166282.551903][29258:29258] CHIP:DMG: { - [1684166282.551912][29258:29258] CHIP:DMG: EndpointId = 0x1, - [1684166282.551920][29258:29258] CHIP:DMG: ClusterId = 0x4, - [1684166282.551928][29258:29258] CHIP:DMG: CommandId = 0x0, - [1684166282.551935][29258:29258] CHIP:DMG: }, - [1684166282.551944][29258:29258] CHIP:DMG: - [1684166282.551951][29258:29258] CHIP:DMG: CommandFields = - [1684166282.551960][29258:29258] CHIP:DMG: { - [1684166282.551970][29258:29258] CHIP:DMG: 0x0 = 259, - [1684166282.551980][29258:29258] CHIP:DMG: 0x1 = "grp1" (4 chars), - [1684166282.551989][29258:29258] CHIP:DMG: }, - [1684166282.551996][29258:29258] CHIP:DMG: }, - [1684166282.552007][29258:29258] CHIP:DMG: - [1684166282.552013][29258:29258] CHIP:DMG: ], - [1684166282.552024][29258:29258] CHIP:DMG: - [1684166282.552032][29258:29258] CHIP:DMG: InteractionModelRevision = 1 - [1684166282.552038][29258:29258] CHIP:DMG: }, - [1684166282.552074][29258:29258] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0004 e=1 p=m - [1684166282.552089][29258:29258] CHIP:DMG: AccessControl: allowed - [1684166282.552100][29258:29258] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0004 Command=0x0000_0000 + + [1689748064.426996][2588:2588] CHIP:DMG: InvokeRequestMessage = + [1689748064.427031][2588:2588] CHIP:DMG: { + [1689748064.427054][2588:2588] CHIP:DMG: suppressResponse = false, + [1689748064.427081][2588:2588] CHIP:DMG: timedRequest = false, + [1689748064.427105][2588:2588] CHIP:DMG: InvokeRequests = + [1689748064.427137][2588:2588] CHIP:DMG: [ + [1689748064.427162][2588:2588] CHIP:DMG: CommandDataIB = + [1689748064.427194][2588:2588] CHIP:DMG: { + [1689748064.427225][2588:2588] CHIP:DMG: CommandPathIB = + [1689748064.427257][2588:2588] CHIP:DMG: { + [1689748064.427288][2588:2588] CHIP:DMG: EndpointId = 0x0, + [1689748064.427321][2588:2588] CHIP:DMG: ClusterId = 0x4, + [1689748064.427354][2588:2588] CHIP:DMG: CommandId = 0x0, + [1689748064.427384][2588:2588] CHIP:DMG: }, + [1689748064.427415][2588:2588] CHIP:DMG: + [1689748064.427443][2588:2588] CHIP:DMG: CommandFields = + [1689748064.427473][2588:2588] CHIP:DMG: { + [1689748064.427504][2588:2588] CHIP:DMG: 0x0 = 259, + [1689748064.427539][2588:2588] CHIP:DMG: 0x1 = "grp1" (4 chars), + [1689748064.427571][2588:2588] CHIP:DMG: }, + [1689748064.427600][2588:2588] CHIP:DMG: }, + [1689748064.427632][2588:2588] CHIP:DMG: + [1689748064.427656][2588:2588] CHIP:DMG: ], + [1689748064.427686][2588:2588] CHIP:DMG: + [1689748064.427710][2588:2588] CHIP:DMG: InteractionModelRevision = 1 + [1689748064.427733][2588:2588] CHIP:DMG: }, disabled: true - label: - "DUT generates fabric-unique GroupID, GroupName. Save the GroupID as - GroupID_2, GroupName as GroupName_2" + "Step 5: DUT generates fabric-unique GroupID, GroupName. Save the + GroupID as GroupID_2, GroupName as GroupName_2" verification: | refer to log in step 3 GroupID_2 = 257 @@ -249,9 +337,10 @@ tests: disabled: true - label: - "DUT sends a AddGroup Command to the Groups cluster with the GroupID - field set to GroupID_2 and the GroupName set to an GroupName_2. The - command is sent as a group command using GroupID_1" + "Step 6: DUT sends a AddGroup Command to the Groups cluster with the + GroupID field set to GroupID_2 and the GroupName set to an + GroupName_2. The command is sent as a group command using GroupID_1" + PICS: G.C.C00.Tx verification: | ./chip-tool groups add-group 257 'grp2' 0xffffffffffff0103 0 @@ -286,7 +375,7 @@ tests: [1686319509.379870][8834:8834] CHIP:DMG: }, [1686319509.379881][8834:8834] CHIP:DMG: Rec - Verify the Destination Node ID matches the GroupID_1 On TH(all-cluster-app) log: + Verify the Destination Node ID matches the GroupID_1 On TH(Reference app) log: [1689748128.875980][2588:2588] CHIP:DMG: Received group command for Group=259 Cluster=0x0000_0004 Command=0x0000_0000 [1689748128.876384][2588:2588] CHIP:DMG: Processing group command for Endpoint=0 Cluster=0x0000_0004 Command=0x0000_0000 @@ -299,7 +388,7 @@ tests: [1684167429.421010][29723:29723] CHIP:IN: Joining Multicast Group with address UDP:[ff35:40:fd00::100:101]:5540 [1684167429.421129][29723:29723] CHIP:IN: Joined multicast group on interface wlp0s20f3 - Verify the DSIZ flag is set to Group On TH(all-cluster-app) log: + Verify the DSIZ flag is set to Group On TH(Reference app) log: (Here in below log the value recived is 0X04 = 0100 (decimal) - Here the bit 2 is enabled then DSIZ flag is set to group) [1686317564.742205][7679:7679] CHIP:DMG: Header Flags = diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_3_1_Simulated.yaml deleted file mode 100644 index 8d46d80a8de956..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_3_1_Simulated.yaml +++ /dev/null @@ -1,369 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 74.3.1. [TC-SWTCH-3.1] Global attributes with client as DUT - -PICS: - - SWTCH.C - - SWTCH.C.AM-READ - - SWTCH.C.AO-READ - - SWTCH.C.AM-WRITE - - SWTCH.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Switch" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read NumberOfPositions attribute" - PICS: SWTCH.C.AM-READ - wait: "readAttribute" - attribute: "NumberOfPositions" - - - label: "Read CurrentPosition attribute" - PICS: SWTCH.C.AM-READ - wait: "readAttribute" - attribute: "CurrentPosition" - - - label: "Read MultiPressMax attribute" - PICS: SWTCH.C.AO-READ - wait: "readAttribute" - attribute: "MultiPressMax" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again." - verification: | - ./chip-tool switch read feature-map 1 1 - - Verify TH receives FeatureMap attribute response on the TH(all-clusters-minimal-app) Log: - - [1666943977.583820][12769:12769] CHIP:DMG: - [1666943977.583832][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943977.583834][12769:12769] CHIP:DMG: { - [1666943977.583837][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943977.583842][12769:12769] CHIP:DMG: [ - [1666943977.583844][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943977.583855][12769:12769] CHIP:DMG: { - [1666943977.583857][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943977.583860][12769:12769] CHIP:DMG: { - [1666943977.583864][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666943977.583867][12769:12769] CHIP:DMG: AttributePathIB = - [1666943977.583870][12769:12769] CHIP:DMG: { - [1666943977.583873][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943977.583877][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666943977.583880][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666943977.583883][12769:12769] CHIP:DMG: } - [1666943977.583887][12769:12769] CHIP:DMG: - [1666943977.583891][12769:12769] CHIP:DMG: Data = 1, - [1666943977.583893][12769:12769] CHIP:DMG: }, - [1666943977.583897][12769:12769] CHIP:DMG: - [1666943977.583899][12769:12769] CHIP:DMG: }, - [1666943977.583903][12769:12769] CHIP:DMG: - [1666943977.583905][12769:12769] CHIP:DMG: ], - [1666943977.583909][12769:12769] CHIP:DMG: - [1666943977.583911][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943977.583913][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool switch read attribute-list 1 1 - - Verify TH receives AttributeList attribute response on the TH(all-clusters-minimal-app) Log: - - [1676530441.143667][49371:49373] CHIP:DMG: ReportDataMessage = - [1676530441.143670][49371:49373] CHIP:DMG: { - [1676530441.143673][49371:49373] CHIP:DMG: AttributeReportIBs = - [1676530441.143678][49371:49373] CHIP:DMG: [ - [1676530441.143680][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.143685][49371:49373] CHIP:DMG: { - [1676530441.143688][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.143691][49371:49373] CHIP:DMG: { - [1676530441.143694][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.143697][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.143701][49371:49373] CHIP:DMG: { - [1676530441.143704][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.143707][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.143711][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.143713][49371:49373] CHIP:DMG: } - [1676530441.143717][49371:49373] CHIP:DMG: - [1676530441.143720][49371:49373] CHIP:DMG: Data = [ - [1676530441.143723][49371:49373] CHIP:DMG: - [1676530441.143726][49371:49373] CHIP:DMG: ], - [1676530441.143729][49371:49373] CHIP:DMG: }, - [1676530441.143733][49371:49373] CHIP:DMG: - [1676530441.143736][49371:49373] CHIP:DMG: }, - [1676530441.143742][49371:49373] CHIP:DMG: - [1676530441.143744][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.143749][49371:49373] CHIP:DMG: { - [1676530441.143751][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.143754][49371:49373] CHIP:DMG: { - [1676530441.143757][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.143760][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.143763][49371:49373] CHIP:DMG: { - [1676530441.143766][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.143769][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.143772][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.143775][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.143778][49371:49373] CHIP:DMG: } - [1676530441.143782][49371:49373] CHIP:DMG: - [1676530441.143785][49371:49373] CHIP:DMG: Data = 0, - [1676530441.143788][49371:49373] CHIP:DMG: }, - [1676530441.143792][49371:49373] CHIP:DMG: - [1676530441.143794][49371:49373] CHIP:DMG: }, - [1676530441.143800][49371:49373] CHIP:DMG: - [1676530441.143803][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.143807][49371:49373] CHIP:DMG: { - [1676530441.143809][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.143812][49371:49373] CHIP:DMG: { - [1676530441.143815][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.143818][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.143820][49371:49373] CHIP:DMG: { - [1676530441.143823][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.143827][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.143830][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.143833][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.143835][49371:49373] CHIP:DMG: } - [1676530441.143839][49371:49373] CHIP:DMG: - [1676530441.143842][49371:49373] CHIP:DMG: Data = 1, - [1676530441.143845][49371:49373] CHIP:DMG: }, - [1676530441.143849][49371:49373] CHIP:DMG: - [1676530441.143851][49371:49373] CHIP:DMG: }, - [1676530441.143857][49371:49373] CHIP:DMG: - [1676530441.143860][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.143865][49371:49373] CHIP:DMG: { - [1676530441.143868][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.143872][49371:49373] CHIP:DMG: { - [1676530441.143877][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.143880][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.143885][49371:49373] CHIP:DMG: { - [1676530441.143891][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.143896][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.143900][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.143903][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.143906][49371:49373] CHIP:DMG: } - [1676530441.143910][49371:49373] CHIP:DMG: - [1676530441.143913][49371:49373] CHIP:DMG: Data = 65528, - [1676530441.143916][49371:49373] CHIP:DMG: }, - [1676530441.143920][49371:49373] CHIP:DMG: - [1676530441.143922][49371:49373] CHIP:DMG: }, - [1676530441.143929][49371:49373] CHIP:DMG: - [1676530441.143931][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.143937][49371:49373] CHIP:DMG: { - [1676530441.143940][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.143944][49371:49373] CHIP:DMG: { - [1676530441.143948][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.143952][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.143956][49371:49373] CHIP:DMG: { - [1676530441.143959][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.143964][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.143969][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.143973][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.143978][49371:49373] CHIP:DMG: } - [1676530441.143983][49371:49373] CHIP:DMG: - [1676530441.143988][49371:49373] CHIP:DMG: Data = 65529, - [1676530441.143992][49371:49373] CHIP:DMG: }, - [1676530441.143998][49371:49373] CHIP:DMG: - [1676530441.144001][49371:49373] CHIP:DMG: }, - [1676530441.144010][49371:49373] CHIP:DMG: - [1676530441.144012][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.144018][49371:49373] CHIP:DMG: { - [1676530441.144021][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.144024][49371:49373] CHIP:DMG: { - [1676530441.144027][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.144030][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.144033][49371:49373] CHIP:DMG: { - [1676530441.144036][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.144041][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.144046][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.144050][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.144054][49371:49373] CHIP:DMG: } - [1676530441.144061][49371:49373] CHIP:DMG: - [1676530441.144065][49371:49373] CHIP:DMG: Data = 65530, - [1676530441.144068][49371:49373] CHIP:DMG: }, - [1676530441.144075][49371:49373] CHIP:DMG: - [1676530441.144078][49371:49373] CHIP:DMG: }, - [1676530441.144086][49371:49373] CHIP:DMG: - [1676530441.144089][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.144096][49371:49373] CHIP:DMG: { - [1676530441.144099][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.144103][49371:49373] CHIP:DMG: { - [1676530441.144107][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.144109][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.144112][49371:49373] CHIP:DMG: { - [1676530441.144115][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.144119][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.144122][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.144127][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.144131][49371:49373] CHIP:DMG: } - [1676530441.144136][49371:49373] CHIP:DMG: - [1676530441.144141][49371:49373] CHIP:DMG: Data = 65531, - [1676530441.144145][49371:49373] CHIP:DMG: }, - [1676530441.144152][49371:49373] CHIP:DMG: - [1676530441.144156][49371:49373] CHIP:DMG: }, - [1676530441.144165][49371:49373] CHIP:DMG: - [1676530441.144169][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.144176][49371:49373] CHIP:DMG: { - [1676530441.144179][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.144184][49371:49373] CHIP:DMG: { - [1676530441.144188][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.144192][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.144197][49371:49373] CHIP:DMG: { - [1676530441.144200][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.144203][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.144208][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.144212][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.144216][49371:49373] CHIP:DMG: } - [1676530441.144222][49371:49373] CHIP:DMG: - [1676530441.144226][49371:49373] CHIP:DMG: Data = 65532, - [1676530441.144230][49371:49373] CHIP:DMG: }, - [1676530441.144237][49371:49373] CHIP:DMG: - [1676530441.144240][49371:49373] CHIP:DMG: }, - [1676530441.144248][49371:49373] CHIP:DMG: - [1676530441.144251][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.144258][49371:49373] CHIP:DMG: { - [1676530441.144261][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.144265][49371:49373] CHIP:DMG: { - [1676530441.144270][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.144273][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.144278][49371:49373] CHIP:DMG: { - [1676530441.144283][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.144288][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.144293][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.144297][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.144301][49371:49373] CHIP:DMG: } - [1676530441.144306][49371:49373] CHIP:DMG: - [1676530441.144310][49371:49373] CHIP:DMG: Data = 65533, - [1676530441.144314][49371:49373] CHIP:DMG: }, - [1676530441.144319][49371:49373] CHIP:DMG: - [1676530441.144322][49371:49373] CHIP:DMG: }, - [1676530441.144329][49371:49373] CHIP:DMG: - [1676530441.144332][49371:49373] CHIP:DMG: ], - [1676530441.144352][49371:49373] CHIP:DMG: - [1676530441.144356][49371:49373] CHIP:DMG: SuppressResponse = true, - [1676530441.144359][49371:49373] CHIP:DMG: InteractionModelRevision = 1 - [1676530441.144362][49371:49373] CHIP:DMG: } - - - - ./chip-tool switch read number-of-positions 1 1 - - Verify TH receives NumberOfPositions attribute response on the TH(all-clusters-minimal-app) Log: - - [1666944027.604420][12769:12769] CHIP:DMG: ReportDataMessage = - [1666944027.604423][12769:12769] CHIP:DMG: { - [1666944027.604425][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666944027.604430][12769:12769] CHIP:DMG: [ - [1666944027.604432][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944027.604437][12769:12769] CHIP:DMG: { - [1666944027.604439][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944027.604443][12769:12769] CHIP:DMG: { - [1666944027.604445][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944027.604447][12769:12769] CHIP:DMG: AttributePathIB = - [1666944027.604450][12769:12769] CHIP:DMG: { - [1666944027.604452][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944027.604455][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944027.604459][12769:12769] CHIP:DMG: Attribute = 0x0000_0000, - [1666944027.604461][12769:12769] CHIP:DMG: } - [1666944027.604463][12769:12769] CHIP:DMG: - [1666944027.604466][12769:12769] CHIP:DMG: Data = 2, - [1666944027.604469][12769:12769] CHIP:DMG: }, - [1666944027.604480][12769:12769] CHIP:DMG: - [1666944027.604482][12769:12769] CHIP:DMG: }, - [1666944027.604486][12769:12769] CHIP:DMG: - [1666944027.604488][12769:12769] CHIP:DMG: ], - [1666944027.604492][12769:12769] CHIP:DMG: - [1666944027.604495][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666944027.604497][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666944027.604500][12769:12769] CHIP:DMG: } - - - ./chip-tool switch read current-position 1 1 - - Verify TH receives CurrentPosition attribute response on the TH(all-clusters-minimal-app) Log: - - [1666944049.906683][12769:12769] CHIP:DMG: ReportDataMessage = - [1666944049.906685][12769:12769] CHIP:DMG: { - [1666944049.906687][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666944049.906690][12769:12769] CHIP:DMG: [ - [1666944049.906692][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944049.906695][12769:12769] CHIP:DMG: { - [1666944049.906697][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944049.906699][12769:12769] CHIP:DMG: { - [1666944049.906701][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944049.906703][12769:12769] CHIP:DMG: AttributePathIB = - [1666944049.906705][12769:12769] CHIP:DMG: { - [1666944049.906708][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944049.906710][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944049.906712][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, - [1666944049.906714][12769:12769] CHIP:DMG: } - [1666944049.906717][12769:12769] CHIP:DMG: - [1666944049.906719][12769:12769] CHIP:DMG: Data = 0, - [1666944049.906721][12769:12769] CHIP:DMG: }, - [1666944049.906724][12769:12769] CHIP:DMG: - [1666944049.906726][12769:12769] CHIP:DMG: }, - [1666944049.906728][12769:12769] CHIP:DMG: - [1666944049.906730][12769:12769] CHIP:DMG: ], - [1666944049.906733][12769:12769] CHIP:DMG: - [1666944049.906735][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666944049.906737][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666944049.906739][12769:12769] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - TH all-clusters-minimal-app does not support optional attributes - - ./chip-tool switch read multi-press-max 1 1 - - status = 0x86 (UNSUPPORTED_ATTRIBUTE), - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && SWTCH.C.AO-READ - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_S_2_1.yaml b/src/app/tests/suites/certification/Test_TC_S_2_1.yaml index 02d54ffa921b7e..039309538b5097 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_1.yaml @@ -64,7 +64,7 @@ tests: attribute: "SceneValid" response: constraints: - type: uint8 + type: int8u - label: "Step 6: TH reads from the DUT the (0x0004) NameSupport attribute" PICS: S.S.A0003 && S.S.F00 @@ -73,7 +73,7 @@ tests: response: value: 0x80 constraints: - type: uint8 + type: int8u - label: "Step 6: TH reads from the DUT the (0x0004) NameSupport attribute" PICS: S.S.A0004 && (!S.S.F00) @@ -82,7 +82,7 @@ tests: response: value: 0x00 constraints: - type: uint8 + type: int8u - label: "Step 7: TH reads from the DUT the (0x0005) LastConfiguredBy attribute" @@ -110,4 +110,4 @@ tests: attribute: "RemainingCapacity" response: constraints: - type: uint8 + type: int8u diff --git a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml index 437acb3881ff3f..a33f9d9752b168 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml @@ -23,6 +23,9 @@ config: cluster: "Scenes" endpoint: 1 + GroupKeyManagement.Endpoint: 0 + Groups.Endpoint: 1 + tests: - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" @@ -32,12 +35,6 @@ tests: - name: "nodeId" value: nodeId - - label: "TH sends a RemoveAllGroups command to DUT." - PICS: G.S.C04.Rsp - cluster: "Groups" - endpoint: "1" - command: "RemoveAllGroups" - - label: "TH reads from the DUT the (0x0006) SceneTableSize attribute" PICS: S.S.A0006 command: "readAttribute" @@ -46,14 +43,12 @@ tests: values: - name: "SceneTableSize" saveAs: maxScenes - constraints: - type: uint16 - label: "Step 0a: preparation step for using commands from Groups cluster: Add KeySet" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "KeySetWrite" arguments: values: @@ -62,19 +57,19 @@ tests: { GroupKeySetID: 0x01a1, GroupKeySecurityPolicy: 0, - EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", - EpochStartTime0: 0, - EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", - EpochStartTime1: 0, - EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", - EpochStartTime2: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 2220000, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: 2220001, + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 2220002, } - label: "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "writeAttribute" attribute: "GroupKeyMap" arguments: @@ -84,6 +79,12 @@ tests: { FabricIndex: 1, GroupId: 0x0002, GroupKeySetID: 0x01a1 }, ] + - label: "Step 0c: TH sends a RemoveAllGroups command to DUT." + PICS: G.S.C04.Rsp + cluster: "Groups" + endpoint: Groups.Endpoint + command: "RemoveAllGroups" + - label: "Step 1a: TH sends a AddGroup command to DUT with the GroupID field set to 0x0001." @@ -133,7 +134,7 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) + value: ( maxScenes / 2 ) - name: "GroupID" value: 0x0001 @@ -238,16 +239,17 @@ tests: value: 0x01 - label: "Step 3c: TH reads the SceneCount attribute from DUT." - PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 + PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 && !S.S.F03 command: "readAttribute" attribute: "SceneCount" response: value: 1 + saveAs: SceneCountValue constraints: type: int8u - - label: "Step 3c: TH reads the CurrentScene attribute from DUT." - PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 + - label: "Step 3d: TH reads the CurrentScene attribute from DUT." + PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 && !S.S.F03 command: "readAttribute" attribute: "CurrentScene" response: @@ -255,8 +257,8 @@ tests: constraints: type: int8u - - label: "Step 3c: TH reads the CurrentGroup attribute from DUT." - PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 + - label: "Step 3e: TH reads the CurrentGroup attribute from DUT." + PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 && !S.S.F03 command: "readAttribute" attribute: "CurrentGroup" response: @@ -264,19 +266,65 @@ tests: constraints: type: groupid - - label: "Step 3c: TH reads the SceneValid attribute from DUT." - PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 + - label: "Step 3f: TH reads the SceneValid attribute from DUT." + PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 && !S.S.F03 command: "readAttribute" attribute: "SceneValid" response: value: true constraints: - type: uint8 + type: int8u + + - label: "Step 3g: TH reads attribute SceneTableSize from DUT." + PICS: S.S.F03 && S.S.F02 + command: "readAttribute" + attribute: "SceneTableSize" + response: + saveAs: SceneTableSizeValue + constraints: + type: int16u + + #FabricSceneInfo attribute not supported + - label: "Step 3h: TH reads attribute FabricSceneInfo from DUT" + verification: | + DUT provides FabricSceneInfo containing (for the current fabric) following fields: + + SceneCount has the value (PIXIT.S.SceneTableEntriesOnFactoryNew + 1) + + CurrentScene has the value 0x01 + + CurrentGroup has the value G1 + + SceneValid has the value TRUE. + + if S.S.F02(TS), RemainingCapacity has the value SceneTableSize/2 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && S.S.F03 && S.S.F02 + arguments: + values: + - name: "message" + value: "Enter y after success" + - name: "expectedValue" + value: "y" + + #- label: "Step 3h: TH reads attribute FabricSceneInfo from DUT" + # PICS: S.S.F03 && S.S.F02 + # command: "readAttribute" + # attribute: "FabricSceneInfo" + # response: + # value: { + # SceneCount: SceneCountValue, + # CurrentScene: 0x01, + # CurrentGroup: 0x0001, + # SceneValid: true, + # RemainingCapacity: ( SceneTableSizeValue/2 ), + # } - label: "Step 4a: Reboot target device" PICS: PICS_SDK_CI_ONLY cluster: "SystemCommands" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "Reboot" - label: "Step 4a: Reboot target device(DUT)" @@ -292,6 +340,14 @@ tests: - name: "expectedValue" value: "y" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + - label: "Step 4c: TH configures AC2 on DUT for all implemented application clusters supporting scenes." @@ -419,7 +475,7 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) - 1 + value: ( maxScenes / 2 ) - 1 - name: "GroupID" value: 0x0001 - name: "SceneList" @@ -455,18 +511,16 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) + constraints: + anyOf: [( maxScenes / 2 ), 0xfe, 0x89] - name: "GroupID" value: 0x0001 - # TODO : For Capacity, replace "value: (maxScenes/2)" by following lines when new backend for test is used in CI - # constraints: - # anyOf: [(maxScenes/2), 0xfe ,0x89] - label: "Step 8a: TH sends a AddScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to 0x01, the TransitionTime field set to 0x0001 and a set of extension fields appropriate to AC1." - PICS: S.S.C00.Rsp && && PICS_SDK_CI_ONLY + PICS: S.S.C00.Rsp && PICS_SDK_CI_ONLY command: "AddScene" arguments: values: @@ -586,14 +640,12 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) - 1 + constraints: + anyOf: [( maxScenes / 2 ) - 1, 0xfe, 0x89] - name: "GroupID" value: 0x0001 - name: "SceneList" value: [0x01] - # TODO : For Capacity, replace "value: (maxScenes/2)" by following lines when new backend for test is used in CI - # constraints: - # anyOf: [(maxScenes/2), 0xfe ,0x89] - label: "Step 9a: TH sends a RemoveScene command to DUT with the GroupID field @@ -629,12 +681,10 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) + constraints: + anyOf: [( maxScenes / 2 ), 0xfe, 0x89] - name: "GroupID" value: 0x0001 - # TODO : For Capacity, replace "value: (maxScenes/2)" by following lines when new backend for test is used in CI - # constraints: - # anyOf: [(maxScenes/2), 0xfe ,0x89] - label: "Step 10a: TH configures AC2 on DUT for all implemented application @@ -786,39 +836,34 @@ tests: response: values: - name: "Status" - value: 0x00 + saveAs: StoreStatus + constraints: + anyOf: [0x00, 0x89] - name: "GroupID" value: 0x0001 - name: "SceneID" value: 0x02 - # TODO: For status, replace "- value: 0x00" by following lines when new backend for test is used in CI - # saveAs: StoreStatus - # constraints: - # anyOf: [0x00, 0x89] - - # TODO: Uncomment once the new backend is implemented, allowing the use of EqualityCommands pseudo cluster - #- label: - # "Verify that the status of previous command was either 0x00 (SUCCESS) - # or 0x89 (INSUFFICIENT_SPACE)" - # cluster: "EqualityCommands" - # command: "UnsignedNumberEquals" - # arguments: - # values: - # - name: "Value1" - # value: 0x00 - # - name: "Value2" - # value: StoreStatus - # response: - # - values: - # - name: "Equals" - # value: true - # saveAs: ContinueTest + + - label: + "Verify that the status of previous command was either 0x00 (SUCCESS) + or 0x89 (INSUFFICIENT_SPACE)" + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: 0x00 + - name: "Value2" + value: StoreStatus + response: + - values: + - name: "Equals" + saveAs: ContinueTest - label: "Step 12c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest PICS: S.S.C06.Rsp command: "GetSceneMembership" arguments: @@ -830,7 +875,7 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) - 2 + value: ( maxScenes / 2 ) - 2 - name: "GroupID" value: 0x0001 - name: "SceneList" @@ -839,8 +884,7 @@ tests: - label: "Step 13a: If capacity allows, TH sends a AddGroup command to DUT with the GroupID field set to 0x0002." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest PICS: G.S.C00.Rsp cluster: "Groups" command: "AddGroup" @@ -860,8 +904,7 @@ tests: - label: "Step 13b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0002." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest PICS: S.S.C03.Rsp command: "RemoveAllScenes" arguments: @@ -878,8 +921,7 @@ tests: - label: "Step 13c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0002." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest PICS: S.S.C06.Rsp command: "GetSceneMembership" arguments: @@ -891,15 +933,14 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) - 2 + value: ( maxScenes / 2 ) - 2 - name: "GroupID" value: 0x0002 - label: "Step 14a: TH configures AC3 on DUT for all implemented application clusters supporting scenes." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest cluster: "Level Control" PICS: PICS_SDK_CI_ONLY command: "MoveToLevelWithOnOff" @@ -917,8 +958,7 @@ tests: - label: "Step 14a: TH configures AC3 on DUT for all implemented application clusters supporting scenes." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest verification: | Is DUT configured with AC3? cluster: "LogCommands" @@ -936,8 +976,7 @@ tests: - label: "Step 14b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0002 and the SceneID field set to 0x03." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest PICS: S.S.C04.Rsp command: "StoreScene" arguments: @@ -949,39 +988,35 @@ tests: response: values: - name: "Status" - value: 0x00 + saveAs: StoreStatus + constraints: + anyOf: [0x00, 0x89] - name: "GroupID" value: 0x0002 - name: "SceneID" value: 0x03 - # TODO: For Status, replace "- value: 0x00"by following lines when new backend for test is used in CI - # saveAs: StoreStatus - # constraints: - # anyOf: [0x00, 0x89] - - # TODO: Uncomment once the new backend is implemented, allowing the use of EqualityCommands pseudo cluster - #- label: - # "Verify that the status of previous command was either 0x00 (SUCCESS) - # or 0x89 (INSUFFICIENT_SPACE)" - # runIf: ContinueTest - # cluster: "EqualityCommands" - # command: "UnsignedNumberEquals" - # arguments: - # values: - # - name: "Value1" - # value: 0x00 - # - name: "Value2" - # value: StoreStatus - # response: - # - values: - # - name: "Equals" - # value: true - # saveAs: ContinueTest + + - label: + "Verify that the status of previous command was either 0x00 (SUCCESS) + or 0x89 (INSUFFICIENT_SPACE)" + runIf: ContinueTest + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: 0x00 + - name: "Value2" + value: StoreStatus + response: + - values: + - name: "Equals" + saveAs: ContinueTest - label: "Step 14c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0002." - #runIf: ContinueTest + runIf: ContinueTest PICS: S.S.C06.Rsp command: "GetSceneMembership" arguments: @@ -993,8 +1028,20 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) - 3 + value: ( maxScenes / 2 ) - 3 - name: "GroupID" value: 0x0002 - name: "SceneList" value: [0x03] + + - label: + "Step 15: TH removes the Group key set that was added by sending a + KeySetRemove command to the GroupKeyManagement cluster with the + GroupKeySetID field set to 0x01a1" + cluster: "Group Key Management" + endpoint: GroupKeyManagement.Endpoint + command: "KeySetRemove" + arguments: + values: + - name: GroupKeySetID + value: 0x01a1 diff --git a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml index 61ba0728eef868..cc019818fcc4a1 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml @@ -25,6 +25,7 @@ config: G1: type: int16u defaultValue: 0x0001 + GroupKeyManagement.Endpoint: 0 tests: - label: "Wait for the commissioned device to be retrieved" @@ -43,14 +44,12 @@ tests: values: - name: "SceneTableSize" saveAs: maxScenes - constraints: - type: uint16 - label: "Step 0a: preparation step for using commands from Groups cluster: Add KeySet" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "KeySetWrite" arguments: values: @@ -59,19 +58,19 @@ tests: { GroupKeySetID: 0x01a1, GroupKeySecurityPolicy: 0, - EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", - EpochStartTime0: 0, - EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", - EpochStartTime1: 0, - EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", - EpochStartTime2: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 2220000, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: 2220001, + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 2220002, } - label: "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "writeAttribute" attribute: "GroupKeyMap" arguments: @@ -182,10 +181,10 @@ tests: value: 0x01 - label: - "Step 2a: TH sends a AddScene command to DUT with the GroupID field + "Step 2b: TH sends a AddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, the TransitionTime field set to 0x0001 (1s) and a set of extension fields appropriate to AC1." - PICS: (!S.S.C40.Rsp) && PICS_SDK_CI_ONLY + PICS: S.S.C40.Rsp && PICS_SDK_CI_ONLY command: "AddScene" arguments: values: @@ -230,7 +229,7 @@ tests: value: 0x01 - label: - "Step 2b: TH sends a EnhancedAddScene command to DUT with the GroupID + "Step 2a: TH sends a EnhancedAddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, the TransitionTime field set to 0x000a and a set of extension fields appropriate to AC1." verification: | @@ -399,9 +398,9 @@ tests: ] - label: - "Step 3a: TH sends a ViewScene command to DUT with the GroupID field + "Step 3b: TH sends a ViewScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01." - PICS: (!S.S.C41.Rsp) && PICS_SDK_CI_ONLY + PICS: S.S.C41.Rsp && PICS_SDK_CI_ONLY command: "ViewScene" arguments: values: @@ -444,7 +443,7 @@ tests: ] - label: - "Step 3b: TH sends a EnhancedViewScene command to DUT with the GroupID + "Step 3a: TH sends a EnhancedViewScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01." PICS: S.S.C41.Rsp && PICS_SKIP_SAMPLE_APP verification: | @@ -578,7 +577,7 @@ tests: - label: "TH confirm the DUT reached AC1 (on level control cluster) after 1s" - PICS: PICS_SDK_CI_ONLY + PICS: S.S.C40.Rsp cluster: "Level Control" command: "readAttribute" attribute: "CurrentLevel" @@ -604,8 +603,6 @@ tests: identifier from field set to 0x01, the group identifier to field set to G1 and the scene identifier to field set to 0x02." PICS: S.S.C42.Rsp - verification: | - DUT sends a CopySceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the group identifier from field set to G1 and the scene identifier from field set to 0x01. command: "CopyScene" arguments: values: @@ -647,3 +644,15 @@ tests: value: G1 - name: "SceneList" value: [0x01, 0x02] + + - label: + "Step 7: TH removes the Group key set that was added by sending a + KeySetRemove command to the GroupKeyManagement cluster with the + GroupKeySetID field set to 0x01a1" + cluster: "Group Key Management" + endpoint: GroupKeyManagement.Endpoint + command: "KeySetRemove" + arguments: + values: + - name: GroupKeySetID + value: 0x01a1 diff --git a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml index dea1657f51e555..2cf0d603da4ba1 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml @@ -23,6 +23,9 @@ config: cluster: "Scenes" endpoint: 1 + GroupKeyManagement.Endpoint: 0 + Groups.Endpoint: 1 + tests: - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" @@ -32,17 +35,11 @@ tests: - name: "nodeId" value: nodeId - - label: "TH sends a RemoveAllGroups command to DUT." - PICS: G.S.C04.Rsp - cluster: "Groups" - endpoint: "1" - command: "RemoveAllGroups" - - label: "Step 0a: preparation step for using commands from Groups cluster: Add KeySet" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "KeySetWrite" arguments: values: @@ -51,24 +48,30 @@ tests: { GroupKeySetID: 0x01a1, GroupKeySecurityPolicy: 0, - EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", - EpochStartTime0: 0, - EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", - EpochStartTime1: 0, - EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", - EpochStartTime2: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 2220000, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: 2220001, + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 2220002, } - label: "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "writeAttribute" attribute: "GroupKeyMap" arguments: value: [{ FabricIndex: 1, GroupId: 0x0001, GroupKeySetID: 0x01a1 }] + - label: "Step 0c: TH sends a RemoveAllGroups command to DUT." + PICS: G.S.C04.Rsp + cluster: "Groups" + endpoint: Groups.Endpoint + command: "RemoveAllGroups" + - label: "Step 2a: TH sends a AddGroup command to DUT with the GroupID field set to 0x0001." @@ -204,7 +207,6 @@ tests: value: 0 - label: "Wait 1s for level to change" - PICS: PICS_SDK_CI_ONLY cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -253,7 +255,6 @@ tests: value: 0x01 - label: "Wait 20s" - PICS: PICS_SDK_CI_ONLY cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -284,8 +285,8 @@ tests: value: "y" - label: - "TH configures AC2 on DUT for all implemented application clusters - supporting scenes." + "Step 6a: TH configures AC2 on DUT for all implemented application + clusters supporting scenes." PICS: PICS_SDK_CI_ONLY cluster: "Level Control" command: "MoveToLevelWithOnOff" @@ -301,13 +302,13 @@ tests: value: 0 - label: - "TH configures AC2 on DUT for all implemented application clusters - supporting scenes." + "Step 6a: TH configures AC2 on DUT for all implemented application + clusters supporting scenes." verification: | Is DUT configured with AC2? cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP + PICS: PICS_SKIP_SAMPLE_APP && PICS_SC_RECALL_SCENE_TRANSITION_TIME arguments: values: - name: "message" @@ -318,10 +319,10 @@ tests: value: "y" - label: - "Step 6a: TH sends a RecallScene command to DUT with the GroupID field + "Step 6b: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to 0x01 and the TransitionTime field set to 0x0032 (5s)." - PICS: S.S.C05.Rsp + PICS: S.S.C05.Rsp && PICS_SC_RECALL_SCENE_TRANSITION_TIME command: "RecallScene" arguments: values: @@ -333,7 +334,6 @@ tests: value: 0x0032 - label: "Wait 5s" - PICS: PICS_SDK_CI_ONLY cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -412,4 +412,16 @@ tests: - name: "TransitionTime" value: null response: - error: 0x00 + error: SUCCESS + + - label: + "Step 8: TH removes the Group key set that was added by sending a + KeySetRemove command to the GroupKeyManagement cluster with the + GroupKeySetID field set to 0x01a1" + cluster: "Group Key Management" + endpoint: GroupKeyManagement.Endpoint + command: "KeySetRemove" + arguments: + values: + - name: GroupKeySetID + value: 0x01a1 diff --git a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml b/src/app/tests/suites/certification/Test_TC_S_3_1.yaml deleted file mode 100644 index 3bc443f3cb3866..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml +++ /dev/null @@ -1,608 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 132.3.1. [TC-S-3.1] Functionality with DUT as Client - -PICS: - - S.C - - S.C.AM-READ - - S.C.AO-READ - - S.C.AM-WRITE - - S.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: DUT reads all supported mandatory attributes from TH one at a - time in a manufacturer specific order." - PICS: S.C.AM-READ - verification: | - ./chip-tool scenes read scene-count 1 1 - - [1689664978.443091][2339:2341] CHIP:DMG: ReportDataMessage = - [1689664978.443128][2339:2341] CHIP:DMG: { - [1689664978.443156][2339:2341] CHIP:DMG: AttributeReportIBs = - [1689664978.443196][2339:2341] CHIP:DMG: [ - [1689664978.443226][2339:2341] CHIP:DMG: AttributeReportIB = - [1689664978.443268][2339:2341] CHIP:DMG: { - [1689664978.443300][2339:2341] CHIP:DMG: AttributeDataIB = - [1689664978.443341][2339:2341] CHIP:DMG: { - [1689664978.443381][2339:2341] CHIP:DMG: DataVersion = 0xff333f87, - [1689664978.443420][2339:2341] CHIP:DMG: AttributePathIB = - [1689664978.443462][2339:2341] CHIP:DMG: { - [1689664978.443503][2339:2341] CHIP:DMG: Endpoint = 0x1, - [1689664978.443546][2339:2341] CHIP:DMG: Cluster = 0x5, - [1689664978.443589][2339:2341] CHIP:DMG: Attribute = 0x0000_0000, - [1689664978.443630][2339:2341] CHIP:DMG: } - [1689664978.443672][2339:2341] CHIP:DMG: - [1689664978.443714][2339:2341] CHIP:DMG: Data = 0, - [1689664978.443752][2339:2341] CHIP:DMG: }, - [1689664978.443793][2339:2341] CHIP:DMG: - [1689664978.443857][2339:2341] CHIP:DMG: }, - [1689664978.443900][2339:2341] CHIP:DMG: - [1689664978.443929][2339:2341] CHIP:DMG: ], - [1689664978.443968][2339:2341] CHIP:DMG: - [1689664978.443999][2339:2341] CHIP:DMG: SuppressResponse = true, - [1689664978.444030][2339:2341] CHIP:DMG: InteractionModelRevision = 1 - [1689664978.444059][2339:2341] CHIP:DMG: } - - ./chip-tool scenes read current-scene 1 1 - - [1689664981.268319][2343:2346] CHIP:DMG: ReportDataMessage = - [1689664981.268356][2343:2346] CHIP:DMG: { - [1689664981.268420][2343:2346] CHIP:DMG: AttributeReportIBs = - [1689664981.268462][2343:2346] CHIP:DMG: [ - [1689664981.268492][2343:2346] CHIP:DMG: AttributeReportIB = - [1689664981.268530][2343:2346] CHIP:DMG: { - [1689664981.268561][2343:2346] CHIP:DMG: AttributeDataIB = - [1689664981.268595][2343:2346] CHIP:DMG: { - [1689664981.268631][2343:2346] CHIP:DMG: DataVersion = 0xff333f87, - [1689664981.268666][2343:2346] CHIP:DMG: AttributePathIB = - [1689664981.268703][2343:2346] CHIP:DMG: { - [1689664981.268740][2343:2346] CHIP:DMG: Endpoint = 0x1, - [1689664981.268779][2343:2346] CHIP:DMG: Cluster = 0x5, - [1689664981.268817][2343:2346] CHIP:DMG: Attribute = 0x0000_0001, - [1689664981.268854][2343:2346] CHIP:DMG: } - [1689664981.268893][2343:2346] CHIP:DMG: - [1689664981.268932][2343:2346] CHIP:DMG: Data = 0, - [1689664981.268966][2343:2346] CHIP:DMG: }, - [1689664981.269003][2343:2346] CHIP:DMG: - [1689664981.269033][2343:2346] CHIP:DMG: }, - [1689664981.269068][2343:2346] CHIP:DMG: - [1689664981.269095][2343:2346] CHIP:DMG: ], - [1689664981.269131][2343:2346] CHIP:DMG: - [1689664981.269160][2343:2346] CHIP:DMG: SuppressResponse = true, - [1689664981.269189][2343:2346] CHIP:DMG: InteractionModelRevision = 1 - [1689664981.269216][2343:2346] CHIP:DMG: } - - - ./chip-tool scenes read current-group 1 1 - - [1689664983.848116][2348:2351] CHIP:DMG: ReportDataMessage = - [1689664983.848153][2348:2351] CHIP:DMG: { - [1689664983.848182][2348:2351] CHIP:DMG: AttributeReportIBs = - [1689664983.848226][2348:2351] CHIP:DMG: [ - [1689664983.848257][2348:2351] CHIP:DMG: AttributeReportIB = - [1689664983.848296][2348:2351] CHIP:DMG: { - [1689664983.848326][2348:2351] CHIP:DMG: AttributeDataIB = - [1689664983.848364][2348:2351] CHIP:DMG: { - [1689664983.848400][2348:2351] CHIP:DMG: DataVersion = 0xff333f87, - [1689664983.848437][2348:2351] CHIP:DMG: AttributePathIB = - [1689664983.848475][2348:2351] CHIP:DMG: { - [1689664983.848513][2348:2351] CHIP:DMG: Endpoint = 0x1, - [1689664983.848553][2348:2351] CHIP:DMG: Cluster = 0x5, - [1689664983.848593][2348:2351] CHIP:DMG: Attribute = 0x0000_0002, - [1689664983.848631][2348:2351] CHIP:DMG: } - [1689664983.848671][2348:2351] CHIP:DMG: - [1689664983.848710][2348:2351] CHIP:DMG: Data = 0, - [1689664983.848745][2348:2351] CHIP:DMG: }, - [1689664983.848783][2348:2351] CHIP:DMG: - [1689664983.848813][2348:2351] CHIP:DMG: }, - [1689664983.848850][2348:2351] CHIP:DMG: - [1689664983.848877][2348:2351] CHIP:DMG: ], - [1689664983.848913][2348:2351] CHIP:DMG: - [1689664983.848941][2348:2351] CHIP:DMG: SuppressResponse = true, - [1689664983.848970][2348:2351] CHIP:DMG: InteractionModelRevision = 1 - [1689664983.848997][2348:2351] CHIP:DMG: } - - - ./chip-tool scenes read scene-valid 1 1 - - [1689664986.197422][2352:2354] CHIP:DMG: ReportDataMessage = - [1689664986.197461][2352:2354] CHIP:DMG: { - [1689664986.197492][2352:2354] CHIP:DMG: AttributeReportIBs = - [1689664986.197534][2352:2354] CHIP:DMG: [ - [1689664986.197565][2352:2354] CHIP:DMG: AttributeReportIB = - [1689664986.197610][2352:2354] CHIP:DMG: { - [1689664986.197643][2352:2354] CHIP:DMG: AttributeDataIB = - [1689664986.197682][2352:2354] CHIP:DMG: { - [1689664986.197722][2352:2354] CHIP:DMG: DataVersion = 0xff333f87, - [1689664986.197762][2352:2354] CHIP:DMG: AttributePathIB = - [1689664986.197803][2352:2354] CHIP:DMG: { - [1689664986.197845][2352:2354] CHIP:DMG: Endpoint = 0x1, - [1689664986.197889][2352:2354] CHIP:DMG: Cluster = 0x5, - [1689664986.197935][2352:2354] CHIP:DMG: Attribute = 0x0000_0003, - [1689664986.197978][2352:2354] CHIP:DMG: } - [1689664986.198021][2352:2354] CHIP:DMG: - [1689664986.198064][2352:2354] CHIP:DMG: Data = false, - [1689664986.198102][2352:2354] CHIP:DMG: }, - [1689664986.198144][2352:2354] CHIP:DMG: - [1689664986.198177][2352:2354] CHIP:DMG: }, - [1689664986.198217][2352:2354] CHIP:DMG: - [1689664986.198247][2352:2354] CHIP:DMG: ], - [1689664986.198285][2352:2354] CHIP:DMG: - [1689664986.198315][2352:2354] CHIP:DMG: SuppressResponse = true, - [1689664986.198347][2352:2354] CHIP:DMG: InteractionModelRevision = 1 - [1689664986.198376][2352:2354] CHIP:DMG: } - - ./chip-tool scenes read name-support 1 1 - - [1689664990.166849][2355:2357] CHIP:DMG: ReportDataMessage = - [1689664990.166908][2355:2357] CHIP:DMG: { - [1689664990.166933][2355:2357] CHIP:DMG: AttributeReportIBs = - [1689664990.166966][2355:2357] CHIP:DMG: [ - [1689664990.166992][2355:2357] CHIP:DMG: AttributeReportIB = - [1689664990.167030][2355:2357] CHIP:DMG: { - [1689664990.167058][2355:2357] CHIP:DMG: AttributeDataIB = - [1689664990.167090][2355:2357] CHIP:DMG: { - [1689664990.167125][2355:2357] CHIP:DMG: DataVersion = 0xff333f87, - [1689664990.167157][2355:2357] CHIP:DMG: AttributePathIB = - [1689664990.167193][2355:2357] CHIP:DMG: { - [1689664990.167228][2355:2357] CHIP:DMG: Endpoint = 0x1, - [1689664990.167265][2355:2357] CHIP:DMG: Cluster = 0x5, - [1689664990.167302][2355:2357] CHIP:DMG: Attribute = 0x0000_0004, - [1689664990.167338][2355:2357] CHIP:DMG: } - [1689664990.167374][2355:2357] CHIP:DMG: - [1689664990.167410][2355:2357] CHIP:DMG: Data = 128, - [1689664990.167442][2355:2357] CHIP:DMG: }, - [1689664990.167477][2355:2357] CHIP:DMG: - [1689664990.167505][2355:2357] CHIP:DMG: }, - [1689664990.167538][2355:2357] CHIP:DMG: - [1689664990.167564][2355:2357] CHIP:DMG: ], - [1689664990.167596][2355:2357] CHIP:DMG: - [1689664990.167623][2355:2357] CHIP:DMG: SuppressResponse = true, - [1689664990.167650][2355:2357] CHIP:DMG: InteractionModelRevision = 1 - [1689664990.167674][2355:2357] CHIP:DMG: } - - ./chip-tool scenes read scene-table-size 1 1 - - [1689664998.402942][2361:2363] CHIP:DMG: ReportDataMessage = - [1689664998.402980][2361:2363] CHIP:DMG: { - [1689664998.403009][2361:2363] CHIP:DMG: AttributeReportIBs = - [1689664998.403051][2361:2363] CHIP:DMG: [ - [1689664998.403085][2361:2363] CHIP:DMG: AttributeReportIB = - [1689664998.403173][2361:2363] CHIP:DMG: { - [1689664998.403212][2361:2363] CHIP:DMG: AttributeDataIB = - [1689664998.403256][2361:2363] CHIP:DMG: { - [1689664998.403300][2361:2363] CHIP:DMG: DataVersion = 0xff333f87, - [1689664998.403341][2361:2363] CHIP:DMG: AttributePathIB = - [1689664998.403386][2361:2363] CHIP:DMG: { - [1689664998.403431][2361:2363] CHIP:DMG: Endpoint = 0x1, - [1689664998.403487][2361:2363] CHIP:DMG: Cluster = 0x5, - [1689664998.403534][2361:2363] CHIP:DMG: Attribute = 0x0000_0006, - [1689664998.403578][2361:2363] CHIP:DMG: } - [1689664998.403623][2361:2363] CHIP:DMG: - [1689664998.403669][2361:2363] CHIP:DMG: Data = 0, - [1689664998.403710][2361:2363] CHIP:DMG: }, - [1689664998.403756][2361:2363] CHIP:DMG: - [1689664998.403793][2361:2363] CHIP:DMG: }, - [1689664998.403868][2361:2363] CHIP:DMG: - [1689664998.403903][2361:2363] CHIP:DMG: ], - [1689664998.403947][2361:2363] CHIP:DMG: - [1689664998.403981][2361:2363] CHIP:DMG: SuppressResponse = true, - [1689664998.404016][2361:2363] CHIP:DMG: InteractionModelRevision = 1 - [1689664998.404048][2361:2363] CHIP:DMG: } - - ./chip-tool scenes read remaining-capacity 1 1 - - [1689665008.860825][2364:2366] CHIP:DMG: ReportDataMessage = - [1689665008.860866][2364:2366] CHIP:DMG: { - [1689665008.860922][2364:2366] CHIP:DMG: AttributeReportIBs = - [1689665008.860964][2364:2366] CHIP:DMG: [ - [1689665008.860995][2364:2366] CHIP:DMG: AttributeReportIB = - [1689665008.861039][2364:2366] CHIP:DMG: { - [1689665008.861072][2364:2366] CHIP:DMG: AttributeDataIB = - [1689665008.861108][2364:2366] CHIP:DMG: { - [1689665008.861147][2364:2366] CHIP:DMG: DataVersion = 0xff333f87, - [1689665008.861187][2364:2366] CHIP:DMG: AttributePathIB = - [1689665008.861228][2364:2366] CHIP:DMG: { - [1689665008.861269][2364:2366] CHIP:DMG: Endpoint = 0x1, - [1689665008.861312][2364:2366] CHIP:DMG: Cluster = 0x5, - [1689665008.861355][2364:2366] CHIP:DMG: Attribute = 0x0000_0007, - [1689665008.861396][2364:2366] CHIP:DMG: } - [1689665008.861438][2364:2366] CHIP:DMG: - [1689665008.861481][2364:2366] CHIP:DMG: Data = 0, - [1689665008.861518][2364:2366] CHIP:DMG: }, - [1689665008.861559][2364:2366] CHIP:DMG: - [1689665008.861592][2364:2366] CHIP:DMG: }, - [1689665008.861631][2364:2366] CHIP:DMG: - [1689665008.861660][2364:2366] CHIP:DMG: ], - [1689665008.861698][2364:2366] CHIP:DMG: - [1689665008.861729][2364:2366] CHIP:DMG: SuppressResponse = true, - [1689665008.861760][2364:2366] CHIP:DMG: InteractionModelRevision = 1 - [1689665008.861789][2364:2366] CHIP:DMG: } - disabled: true - - - label: - "Step 2: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order." - PICS: S.C.AO-READ - verification: | - ./chip-tool scenes read last-configured-by 1 1 - - [1689664994.730050][2358:2360] CHIP:DMG: ReportDataMessage = - [1689664994.730079][2358:2360] CHIP:DMG: { - [1689664994.730102][2358:2360] CHIP:DMG: AttributeReportIBs = - [1689664994.730136][2358:2360] CHIP:DMG: [ - [1689664994.730162][2358:2360] CHIP:DMG: AttributeReportIB = - [1689664994.730201][2358:2360] CHIP:DMG: { - [1689664994.730229][2358:2360] CHIP:DMG: AttributeDataIB = - [1689664994.730262][2358:2360] CHIP:DMG: { - [1689664994.730296][2358:2360] CHIP:DMG: DataVersion = 0xff333f87, - [1689664994.730329][2358:2360] CHIP:DMG: AttributePathIB = - [1689664994.730364][2358:2360] CHIP:DMG: { - [1689664994.730399][2358:2360] CHIP:DMG: Endpoint = 0x1, - [1689664994.730437][2358:2360] CHIP:DMG: Cluster = 0x5, - [1689664994.730473][2358:2360] CHIP:DMG: Attribute = 0x0000_0005, - [1689664994.730508][2358:2360] CHIP:DMG: } - [1689664994.730544][2358:2360] CHIP:DMG: - [1689664994.730580][2358:2360] CHIP:DMG: Data = NULL - [1689664994.730610][2358:2360] CHIP:DMG: }, - [1689664994.730646][2358:2360] CHIP:DMG: - [1689664994.730674][2358:2360] CHIP:DMG: }, - [1689664994.730707][2358:2360] CHIP:DMG: - [1689664994.730732][2358:2360] CHIP:DMG: ], - [1689664994.730765][2358:2360] CHIP:DMG: - [1689664994.730791][2358:2360] CHIP:DMG: SuppressResponse = true, - [1689664994.730818][2358:2360] CHIP:DMG: InteractionModelRevision = 1 - [1689664994.730843][2358:2360] CHIP:DMG: } - disabled: true - - - label: - "Step 3: DUT writes a suitable value to all supported mandatory - attributes on the TH one at a time in a manufacturer specific order." - PICS: S.C.AM-WRITE - verification: | - This cluster doesn't have any writable attributes - disabled: true - - - label: - "Step 4: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order." - PICS: S.C.AO-WRITE - verification: | - This cluster doesn't have any writable attributes - disabled: true - - - label: - "Step 5: Configure TH such that it implements mandatory and none of - the optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again." - verification: | - ./chip-tool scenes read attribute-list 1 1 - - [1689666789.967807][4742:4744] CHIP:DMG: ReportDataMessage = - [1689666789.967886][4742:4744] CHIP:DMG: { - [1689666789.967916][4742:4744] CHIP:DMG: AttributeReportIBs = - [1689666789.967966][4742:4744] CHIP:DMG: [ - [1689666789.967997][4742:4744] CHIP:DMG: AttributeReportIB = - [1689666789.968046][4742:4744] CHIP:DMG: { - [1689666789.968079][4742:4744] CHIP:DMG: AttributeDataIB = - [1689666789.968117][4742:4744] CHIP:DMG: { - [1689666789.968158][4742:4744] CHIP:DMG: DataVersion = 0xf12a63c8, - [1689666789.968197][4742:4744] CHIP:DMG: AttributePathIB = - [1689666789.968238][4742:4744] CHIP:DMG: { - [1689666789.968279][4742:4744] CHIP:DMG: Endpoint = 0x1, - [1689666789.968322][4742:4744] CHIP:DMG: Cluster = 0x5, - [1689666789.968366][4742:4744] CHIP:DMG: Attribute = 0x0000_FFFB, - [1689666789.968407][4742:4744] CHIP:DMG: } - [1689666789.968449][4742:4744] CHIP:DMG: - [1689666789.968488][4742:4744] CHIP:DMG: Data = [ - [1689666789.968579][4742:4744] CHIP:DMG: 0, 1, 2, 3, 4, 5, 6, 7, 65528, 65529, 65530, 65531, 65532, 65533, - [1689666789.968630][4742:4744] CHIP:DMG: ], - [1689666789.968668][4742:4744] CHIP:DMG: }, - [1689666789.968716][4742:4744] CHIP:DMG: - [1689666789.968749][4742:4744] CHIP:DMG: }, - [1689666789.968795][4742:4744] CHIP:DMG: - [1689666789.968825][4742:4744] CHIP:DMG: ], - [1689666789.968871][4742:4744] CHIP:DMG: - [1689666789.968902][4742:4744] CHIP:DMG: SuppressResponse = true, - [1689666789.968934][4742:4744] CHIP:DMG: InteractionModelRevision = 1 - [1689666789.968963][4742:4744] CHIP:DMG: } - - - ./chip-tool scenes read feature-map 1 1 - - [1689666905.399488][4746:4748] CHIP:DMG: ReportDataMessage = - [1689666905.399526][4746:4748] CHIP:DMG: { - [1689666905.399556][4746:4748] CHIP:DMG: AttributeReportIBs = - [1689666905.399600][4746:4748] CHIP:DMG: [ - [1689666905.399632][4746:4748] CHIP:DMG: AttributeReportIB = - [1689666905.399680][4746:4748] CHIP:DMG: { - [1689666905.399715][4746:4748] CHIP:DMG: AttributeDataIB = - [1689666905.399761][4746:4748] CHIP:DMG: { - [1689666905.399799][4746:4748] CHIP:DMG: DataVersion = 0xf12a63c8, - [1689666905.399868][4746:4748] CHIP:DMG: AttributePathIB = - [1689666905.399908][4746:4748] CHIP:DMG: { - [1689666905.399951][4746:4748] CHIP:DMG: Endpoint = 0x1, - [1689666905.399994][4746:4748] CHIP:DMG: Cluster = 0x5, - [1689666905.400038][4746:4748] CHIP:DMG: Attribute = 0x0000_FFFC, - [1689666905.400079][4746:4748] CHIP:DMG: } - [1689666905.400121][4746:4748] CHIP:DMG: - [1689666905.400163][4746:4748] CHIP:DMG: Data = 1, - [1689666905.400200][4746:4748] CHIP:DMG: }, - [1689666905.400281][4746:4748] CHIP:DMG: - [1689666905.400316][4746:4748] CHIP:DMG: }, - [1689666905.400355][4746:4748] CHIP:DMG: - [1689666905.400385][4746:4748] CHIP:DMG: ], - [1689666905.400424][4746:4748] CHIP:DMG: - [1689666905.400455][4746:4748] CHIP:DMG: SuppressResponse = true, - [1689666905.400487][4746:4748] CHIP:DMG: InteractionModelRevision = 1 - [1689666905.400517][4746:4748] CHIP:DMG: } - - - ./chip-tool scenes read scene-count 1 1 - - [1689664978.443091][2339:2341] CHIP:DMG: ReportDataMessage = - [1689664978.443128][2339:2341] CHIP:DMG: { - [1689664978.443156][2339:2341] CHIP:DMG: AttributeReportIBs = - [1689664978.443196][2339:2341] CHIP:DMG: [ - [1689664978.443226][2339:2341] CHIP:DMG: AttributeReportIB = - [1689664978.443268][2339:2341] CHIP:DMG: { - [1689664978.443300][2339:2341] CHIP:DMG: AttributeDataIB = - [1689664978.443341][2339:2341] CHIP:DMG: { - [1689664978.443381][2339:2341] CHIP:DMG: DataVersion = 0xff333f87, - [1689664978.443420][2339:2341] CHIP:DMG: AttributePathIB = - [1689664978.443462][2339:2341] CHIP:DMG: { - [1689664978.443503][2339:2341] CHIP:DMG: Endpoint = 0x1, - [1689664978.443546][2339:2341] CHIP:DMG: Cluster = 0x5, - [1689664978.443589][2339:2341] CHIP:DMG: Attribute = 0x0000_0000, - [1689664978.443630][2339:2341] CHIP:DMG: } - [1689664978.443672][2339:2341] CHIP:DMG: - [1689664978.443714][2339:2341] CHIP:DMG: Data = 0, - [1689664978.443752][2339:2341] CHIP:DMG: }, - [1689664978.443793][2339:2341] CHIP:DMG: - [1689664978.443857][2339:2341] CHIP:DMG: }, - [1689664978.443900][2339:2341] CHIP:DMG: - [1689664978.443929][2339:2341] CHIP:DMG: ], - [1689664978.443968][2339:2341] CHIP:DMG: - [1689664978.443999][2339:2341] CHIP:DMG: SuppressResponse = true, - [1689664978.444030][2339:2341] CHIP:DMG: InteractionModelRevision = 1 - [1689664978.444059][2339:2341] CHIP:DMG: } - - ./chip-tool scenes read current-scene 1 1 - - [1689664981.268319][2343:2346] CHIP:DMG: ReportDataMessage = - [1689664981.268356][2343:2346] CHIP:DMG: { - [1689664981.268420][2343:2346] CHIP:DMG: AttributeReportIBs = - [1689664981.268462][2343:2346] CHIP:DMG: [ - [1689664981.268492][2343:2346] CHIP:DMG: AttributeReportIB = - [1689664981.268530][2343:2346] CHIP:DMG: { - [1689664981.268561][2343:2346] CHIP:DMG: AttributeDataIB = - [1689664981.268595][2343:2346] CHIP:DMG: { - [1689664981.268631][2343:2346] CHIP:DMG: DataVersion = 0xff333f87, - [1689664981.268666][2343:2346] CHIP:DMG: AttributePathIB = - [1689664981.268703][2343:2346] CHIP:DMG: { - [1689664981.268740][2343:2346] CHIP:DMG: Endpoint = 0x1, - [1689664981.268779][2343:2346] CHIP:DMG: Cluster = 0x5, - [1689664981.268817][2343:2346] CHIP:DMG: Attribute = 0x0000_0001, - [1689664981.268854][2343:2346] CHIP:DMG: } - [1689664981.268893][2343:2346] CHIP:DMG: - [1689664981.268932][2343:2346] CHIP:DMG: Data = 0, - [1689664981.268966][2343:2346] CHIP:DMG: }, - [1689664981.269003][2343:2346] CHIP:DMG: - [1689664981.269033][2343:2346] CHIP:DMG: }, - [1689664981.269068][2343:2346] CHIP:DMG: - [1689664981.269095][2343:2346] CHIP:DMG: ], - [1689664981.269131][2343:2346] CHIP:DMG: - [1689664981.269160][2343:2346] CHIP:DMG: SuppressResponse = true, - [1689664981.269189][2343:2346] CHIP:DMG: InteractionModelRevision = 1 - [1689664981.269216][2343:2346] CHIP:DMG: } - - - ./chip-tool scenes read current-group 1 1 - - [1689664983.848116][2348:2351] CHIP:DMG: ReportDataMessage = - [1689664983.848153][2348:2351] CHIP:DMG: { - [1689664983.848182][2348:2351] CHIP:DMG: AttributeReportIBs = - [1689664983.848226][2348:2351] CHIP:DMG: [ - [1689664983.848257][2348:2351] CHIP:DMG: AttributeReportIB = - [1689664983.848296][2348:2351] CHIP:DMG: { - [1689664983.848326][2348:2351] CHIP:DMG: AttributeDataIB = - [1689664983.848364][2348:2351] CHIP:DMG: { - [1689664983.848400][2348:2351] CHIP:DMG: DataVersion = 0xff333f87, - [1689664983.848437][2348:2351] CHIP:DMG: AttributePathIB = - [1689664983.848475][2348:2351] CHIP:DMG: { - [1689664983.848513][2348:2351] CHIP:DMG: Endpoint = 0x1, - [1689664983.848553][2348:2351] CHIP:DMG: Cluster = 0x5, - [1689664983.848593][2348:2351] CHIP:DMG: Attribute = 0x0000_0002, - [1689664983.848631][2348:2351] CHIP:DMG: } - [1689664983.848671][2348:2351] CHIP:DMG: - [1689664983.848710][2348:2351] CHIP:DMG: Data = 0, - [1689664983.848745][2348:2351] CHIP:DMG: }, - [1689664983.848783][2348:2351] CHIP:DMG: - [1689664983.848813][2348:2351] CHIP:DMG: }, - [1689664983.848850][2348:2351] CHIP:DMG: - [1689664983.848877][2348:2351] CHIP:DMG: ], - [1689664983.848913][2348:2351] CHIP:DMG: - [1689664983.848941][2348:2351] CHIP:DMG: SuppressResponse = true, - [1689664983.848970][2348:2351] CHIP:DMG: InteractionModelRevision = 1 - [1689664983.848997][2348:2351] CHIP:DMG: } - - - ./chip-tool scenes read scene-valid 1 1 - - [1689664986.197422][2352:2354] CHIP:DMG: ReportDataMessage = - [1689664986.197461][2352:2354] CHIP:DMG: { - [1689664986.197492][2352:2354] CHIP:DMG: AttributeReportIBs = - [1689664986.197534][2352:2354] CHIP:DMG: [ - [1689664986.197565][2352:2354] CHIP:DMG: AttributeReportIB = - [1689664986.197610][2352:2354] CHIP:DMG: { - [1689664986.197643][2352:2354] CHIP:DMG: AttributeDataIB = - [1689664986.197682][2352:2354] CHIP:DMG: { - [1689664986.197722][2352:2354] CHIP:DMG: DataVersion = 0xff333f87, - [1689664986.197762][2352:2354] CHIP:DMG: AttributePathIB = - [1689664986.197803][2352:2354] CHIP:DMG: { - [1689664986.197845][2352:2354] CHIP:DMG: Endpoint = 0x1, - [1689664986.197889][2352:2354] CHIP:DMG: Cluster = 0x5, - [1689664986.197935][2352:2354] CHIP:DMG: Attribute = 0x0000_0003, - [1689664986.197978][2352:2354] CHIP:DMG: } - [1689664986.198021][2352:2354] CHIP:DMG: - [1689664986.198064][2352:2354] CHIP:DMG: Data = false, - [1689664986.198102][2352:2354] CHIP:DMG: }, - [1689664986.198144][2352:2354] CHIP:DMG: - [1689664986.198177][2352:2354] CHIP:DMG: }, - [1689664986.198217][2352:2354] CHIP:DMG: - [1689664986.198247][2352:2354] CHIP:DMG: ], - [1689664986.198285][2352:2354] CHIP:DMG: - [1689664986.198315][2352:2354] CHIP:DMG: SuppressResponse = true, - [1689664986.198347][2352:2354] CHIP:DMG: InteractionModelRevision = 1 - [1689664986.198376][2352:2354] CHIP:DMG: } - - ./chip-tool scenes read name-support 1 1 - - [1689664990.166849][2355:2357] CHIP:DMG: ReportDataMessage = - [1689664990.166908][2355:2357] CHIP:DMG: { - [1689664990.166933][2355:2357] CHIP:DMG: AttributeReportIBs = - [1689664990.166966][2355:2357] CHIP:DMG: [ - [1689664990.166992][2355:2357] CHIP:DMG: AttributeReportIB = - [1689664990.167030][2355:2357] CHIP:DMG: { - [1689664990.167058][2355:2357] CHIP:DMG: AttributeDataIB = - [1689664990.167090][2355:2357] CHIP:DMG: { - [1689664990.167125][2355:2357] CHIP:DMG: DataVersion = 0xff333f87, - [1689664990.167157][2355:2357] CHIP:DMG: AttributePathIB = - [1689664990.167193][2355:2357] CHIP:DMG: { - [1689664990.167228][2355:2357] CHIP:DMG: Endpoint = 0x1, - [1689664990.167265][2355:2357] CHIP:DMG: Cluster = 0x5, - [1689664990.167302][2355:2357] CHIP:DMG: Attribute = 0x0000_0004, - [1689664990.167338][2355:2357] CHIP:DMG: } - [1689664990.167374][2355:2357] CHIP:DMG: - [1689664990.167410][2355:2357] CHIP:DMG: Data = 128, - [1689664990.167442][2355:2357] CHIP:DMG: }, - [1689664990.167477][2355:2357] CHIP:DMG: - [1689664990.167505][2355:2357] CHIP:DMG: }, - [1689664990.167538][2355:2357] CHIP:DMG: - [1689664990.167564][2355:2357] CHIP:DMG: ], - [1689664990.167596][2355:2357] CHIP:DMG: - [1689664990.167623][2355:2357] CHIP:DMG: SuppressResponse = true, - [1689664990.167650][2355:2357] CHIP:DMG: InteractionModelRevision = 1 - [1689664990.167674][2355:2357] CHIP:DMG: } - - ./chip-tool scenes read scene-table-size 1 1 - - [1689664998.402942][2361:2363] CHIP:DMG: ReportDataMessage = - [1689664998.402980][2361:2363] CHIP:DMG: { - [1689664998.403009][2361:2363] CHIP:DMG: AttributeReportIBs = - [1689664998.403051][2361:2363] CHIP:DMG: [ - [1689664998.403085][2361:2363] CHIP:DMG: AttributeReportIB = - [1689664998.403173][2361:2363] CHIP:DMG: { - [1689664998.403212][2361:2363] CHIP:DMG: AttributeDataIB = - [1689664998.403256][2361:2363] CHIP:DMG: { - [1689664998.403300][2361:2363] CHIP:DMG: DataVersion = 0xff333f87, - [1689664998.403341][2361:2363] CHIP:DMG: AttributePathIB = - [1689664998.403386][2361:2363] CHIP:DMG: { - [1689664998.403431][2361:2363] CHIP:DMG: Endpoint = 0x1, - [1689664998.403487][2361:2363] CHIP:DMG: Cluster = 0x5, - [1689664998.403534][2361:2363] CHIP:DMG: Attribute = 0x0000_0006, - [1689664998.403578][2361:2363] CHIP:DMG: } - [1689664998.403623][2361:2363] CHIP:DMG: - [1689664998.403669][2361:2363] CHIP:DMG: Data = 0, - [1689664998.403710][2361:2363] CHIP:DMG: }, - [1689664998.403756][2361:2363] CHIP:DMG: - [1689664998.403793][2361:2363] CHIP:DMG: }, - [1689664998.403868][2361:2363] CHIP:DMG: - [1689664998.403903][2361:2363] CHIP:DMG: ], - [1689664998.403947][2361:2363] CHIP:DMG: - [1689664998.403981][2361:2363] CHIP:DMG: SuppressResponse = true, - [1689664998.404016][2361:2363] CHIP:DMG: InteractionModelRevision = 1 - [1689664998.404048][2361:2363] CHIP:DMG: } - - ./chip-tool scenes read remaining-capacity 1 1 - - [1689665008.860825][2364:2366] CHIP:DMG: ReportDataMessage = - [1689665008.860866][2364:2366] CHIP:DMG: { - [1689665008.860922][2364:2366] CHIP:DMG: AttributeReportIBs = - [1689665008.860964][2364:2366] CHIP:DMG: [ - [1689665008.860995][2364:2366] CHIP:DMG: AttributeReportIB = - [1689665008.861039][2364:2366] CHIP:DMG: { - [1689665008.861072][2364:2366] CHIP:DMG: AttributeDataIB = - [1689665008.861108][2364:2366] CHIP:DMG: { - [1689665008.861147][2364:2366] CHIP:DMG: DataVersion = 0xff333f87, - [1689665008.861187][2364:2366] CHIP:DMG: AttributePathIB = - [1689665008.861228][2364:2366] CHIP:DMG: { - [1689665008.861269][2364:2366] CHIP:DMG: Endpoint = 0x1, - [1689665008.861312][2364:2366] CHIP:DMG: Cluster = 0x5, - [1689665008.861355][2364:2366] CHIP:DMG: Attribute = 0x0000_0007, - [1689665008.861396][2364:2366] CHIP:DMG: } - [1689665008.861438][2364:2366] CHIP:DMG: - [1689665008.861481][2364:2366] CHIP:DMG: Data = 0, - [1689665008.861518][2364:2366] CHIP:DMG: }, - [1689665008.861559][2364:2366] CHIP:DMG: - [1689665008.861592][2364:2366] CHIP:DMG: }, - [1689665008.861631][2364:2366] CHIP:DMG: - [1689665008.861660][2364:2366] CHIP:DMG: ], - [1689665008.861698][2364:2366] CHIP:DMG: - [1689665008.861729][2364:2366] CHIP:DMG: SuppressResponse = true, - [1689665008.861760][2364:2366] CHIP:DMG: InteractionModelRevision = 1 - [1689665008.861789][2364:2366] CHIP:DMG: } - disabled: true - - - label: - "Step 6: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order." - PICS: S.C.AO-READ - verification: | - ./chip-tool scenes read last-configured-by 1 1 - - [1689666947.328580][4750:4752] CHIP:DMG: ReportDataMessage = - [1689666947.328619][4750:4752] CHIP:DMG: { - [1689666947.328650][4750:4752] CHIP:DMG: AttributeReportIBs = - [1689666947.328692][4750:4752] CHIP:DMG: [ - [1689666947.328723][4750:4752] CHIP:DMG: AttributeReportIB = - [1689666947.328771][4750:4752] CHIP:DMG: { - [1689666947.328806][4750:4752] CHIP:DMG: AttributeDataIB = - [1689666947.328851][4750:4752] CHIP:DMG: { - [1689666947.328892][4750:4752] CHIP:DMG: DataVersion = 0xf12a63c8, - [1689666947.328932][4750:4752] CHIP:DMG: AttributePathIB = - [1689666947.328974][4750:4752] CHIP:DMG: { - [1689666947.329015][4750:4752] CHIP:DMG: Endpoint = 0x1, - [1689666947.329060][4750:4752] CHIP:DMG: Cluster = 0x5, - [1689666947.329105][4750:4752] CHIP:DMG: Attribute = 0x0000_0005, - [1689666947.329146][4750:4752] CHIP:DMG: } - [1689666947.329189][4750:4752] CHIP:DMG: - [1689666947.329231][4750:4752] CHIP:DMG: Data = NULL - [1689666947.329270][4750:4752] CHIP:DMG: }, - [1689666947.329312][4750:4752] CHIP:DMG: - [1689666947.329346][4750:4752] CHIP:DMG: }, - [1689666947.329386][4750:4752] CHIP:DMG: - [1689666947.329416][4750:4752] CHIP:DMG: ], - [1689666947.329455][4750:4752] CHIP:DMG: - [1689666947.329486][4750:4752] CHIP:DMG: SuppressResponse = true, - [1689666947.329518][4750:4752] CHIP:DMG: InteractionModelRevision = 1 - [1689666947.329547][4750:4752] CHIP:DMG: } - disabled: true - - - label: - "Step 7: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order." - PICS: S.C.AO-WRITE - verification: | - This cluster doesn't have any writable attributes - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml index c6b39dba4f8fa3..b9977898b1d5ec 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml @@ -30,65 +30,75 @@ tests: - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." verification: | - Verify that the DUT response contains the ClusterRevision attribute and has the value 1. + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read cluster-revision 1 1 + + Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: + + [1690189572.337445][16132:16134] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFD DataVersion: 473867547 + [1690189572.337466][16132:16134] CHIP:TOO: ClusterRevision: 1 disabled: true - label: "Step 3: TH reads from the DUT the FeatureMap attribute." verification: | - Verify that the DUT response contains the FeatureMap attribute and have the following bit set: + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read feature-map 1 1 - bit 0: SHALL be 1 if and only if TCCM.S.F00(DEPONOFF) + On the TH(Chip-tool) Log, Verify featureMap value is 1 If TCCM.S.F00(DEPONOFF) true, Otherwise 0, and below is the sample log provided for the raspi platform: + + [1690189585.723124][16135:16137] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFC DataVersion: 473867547 + [1690189585.723143][16135:16137] CHIP:TOO: FeatureMap: 1 disabled: true - label: "Step 4: TH reads from the DUT the AttributeList attribute." verification: | - Verify that the DUT response contains the AttributeList attribute and have the list of supported attributes: - - The list SHALL include all the mandatory entries: - 0x0000, 0x0001, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd. - - The list MAY include these optional entries: - - 0x0002: SHALL be included if and only if TCCM.S.A0002(StartUpMode) - - The list include entries based on feature support: - - - 0x0003 SHALL be included if and only if TCCM.S.F00(DEPONOFF) - - - and SHALL NOT be included otherwise. - - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) - + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read attribute-list 1 1 + + Verify the "AttributeList " should include the mandatory attributes (values 0, 1), + - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and + - list may include optional attribute(value 0x0002), if MOD.S.A0004(StartUpMode) supports, + - list contains feature dependent attribute (values 0x0003), if MOD.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1690189598.832157][16140:16142] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFB DataVersion: 473867547 + [1690189598.832176][16140:16142] CHIP:TOO: AttributeList: 10 entries + [1690189598.832181][16140:16142] CHIP:TOO: [1]: 0 + [1690189598.832184][16140:16142] CHIP:TOO: [2]: 1 + [1690189598.832187][16140:16142] CHIP:TOO: [3]: 2 + [1690189598.832190][16140:16142] CHIP:TOO: [4]: 3 + [1690189598.832193][16140:16142] CHIP:TOO: [5]: 65528 + [1690189598.832196][16140:16142] CHIP:TOO: [6]: 65529 + [1690189598.832199][16140:16142] CHIP:TOO: [7]: 65530 + [1690189598.832202][16140:16142] CHIP:TOO: [8]: 65531 + [1690189598.832206][16140:16142] CHIP:TOO: [9]: 65532 + [1690189598.832210][16140:16142] CHIP:TOO: [10]: 65533 + disabled: true - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. + - label: "Step 5: TH reads from the DUT the EventList attribute." + verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read event-list 1 1 + Verify "EventList" contains a list of supported events, for this cluster the list is emty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690189614.840538][16147:16149] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFA DataVersion: 473867547 + [1690189614.840589][16147:16149] CHIP:TOO: EventList: 0 entries disabled: true - - label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute." + - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." verification: | - Verify that the DUT response contains the AcceptedCommandList attribute and have the list of Accepted Command: - The list SHALL include all the mandatory entries: + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read accepted-command-list 1 1 - 0x00 - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) + Verify the "AcceptedCommandList" contains a list of mandatory commands (value 0) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. - - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690189624.827078][16152:16154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFF9 DataVersion: 473867547 + [1690189624.827136][16152:16154] CHIP:TOO: AcceptedCommandList: 1 entries + [1690189624.827158][16152:16154] CHIP:TOO: [1]: 0 disabled: true - - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." + - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." verification: | - Verify that the DUT response contains the GeneratedCommandList attribute and have the list of Generated Command: - The list SHALL include all the mandatory entries: - - 0x01 - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read generated-command-list 1 1 - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. + Verify " GeneratedCommandList" contains a list of mandatory commands (value 1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690189651.608897][16155:16157] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFF8 DataVersion: 473867547 + [1690189651.608955][16155:16157] CHIP:TOO: GeneratedCommandList: 1 entries + [1690189651.608973][16155:16157] CHIP:TOO: [1]: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml index 7dec81834b44c9..41a95cff88e004 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml @@ -34,42 +34,73 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: TCCM.S.A0000 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has at least one entry - - Verify that each ModeOptionsStruct entry has a unique Mode field value - - Verify that each ModeOptionsStruct entry has a unique Label field value - - Verify that each ModeOptionsStruct entry’s ModeTags field, if not empty, has: - the values of the Value fields that are not larger than 16 bits - - for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range - - if the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - - - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field - - Save the Mode field values as supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that list should contain at least one entry + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value + - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 + - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690189665.585798][16159:16161] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 473867547 + [1690189665.585885][16159:16161] CHIP:TOO: SupportedModes: 3 entries + [1690189665.585924][16159:16161] CHIP:TOO: [1]: { + [1690189665.585936][16159:16161] CHIP:TOO: Label: Normal + [1690189665.585955][16159:16161] CHIP:TOO: Mode: 0 + [1690189665.585970][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.585997][16159:16161] CHIP:TOO: [1]: { + [1690189665.586008][16159:16161] CHIP:TOO: Value: 0 + [1690189665.586018][16159:16161] CHIP:TOO: } + [1690189665.586028][16159:16161] CHIP:TOO: } + [1690189665.586050][16159:16161] CHIP:TOO: [2]: { + [1690189665.586060][16159:16161] CHIP:TOO: Label: Rapid Cool + [1690189665.586068][16159:16161] CHIP:TOO: Mode: 1 + [1690189665.586081][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.586094][16159:16161] CHIP:TOO: [1]: { + [1690189665.586105][16159:16161] CHIP:TOO: Value: 16384 + [1690189665.586114][16159:16161] CHIP:TOO: } + [1690189665.586124][16159:16161] CHIP:TOO: } + [1690189665.586143][16159:16161] CHIP:TOO: [3]: { + [1690189665.586152][16159:16161] CHIP:TOO: Label: Rapid Freeze + [1690189665.586162][16159:16161] CHIP:TOO: Mode: 2 + [1690189665.586175][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.586189][16159:16161] CHIP:TOO: [1]: { + [1690189665.586198][16159:16161] CHIP:TOO: Value: 16385 + [1690189665.586207][16159:16161] CHIP:TOO: } + [1690189665.586217][16159:16161] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1690189682.782276][16162:16164] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 473867547 + [1690189682.782314][16162:16164] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the OnMode attribute." PICS: TCCM.S.A0003 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 + + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null + + [1690189699.711642][16169:16171] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 473867547 + [1690189699.711687][16169:16171] CHIP:TOO: OnMode: null disabled: true - label: "Step 5: TH reads from the DUT the StartUpMode attribute." PICS: TCCM.S.A0002 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 + + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null + + [1690189713.973520][16173:16175] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 473867547 + [1690189713.973576][16173:16175] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml index 1978da84910f03..90b3751ebb632f 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml @@ -34,107 +34,183 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: TCCM.S.A0000 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690189665.585798][16159:16161] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 473867547 + [1690189665.585885][16159:16161] CHIP:TOO: SupportedModes: 3 entries + [1690189665.585924][16159:16161] CHIP:TOO: [1]: { + [1690189665.585936][16159:16161] CHIP:TOO: Label: Normal + [1690189665.585955][16159:16161] CHIP:TOO: Mode: 0 + [1690189665.585970][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.585997][16159:16161] CHIP:TOO: [1]: { + [1690189665.586008][16159:16161] CHIP:TOO: Value: 0 + [1690189665.586018][16159:16161] CHIP:TOO: } + [1690189665.586028][16159:16161] CHIP:TOO: } + [1690189665.586050][16159:16161] CHIP:TOO: [2]: { + [1690189665.586060][16159:16161] CHIP:TOO: Label: Rapid Cool + [1690189665.586068][16159:16161] CHIP:TOO: Mode: 1 + [1690189665.586081][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.586094][16159:16161] CHIP:TOO: [1]: { + [1690189665.586105][16159:16161] CHIP:TOO: Value: 16384 + [1690189665.586114][16159:16161] CHIP:TOO: } + [1690189665.586124][16159:16161] CHIP:TOO: } + [1690189665.586143][16159:16161] CHIP:TOO: [3]: { + [1690189665.586152][16159:16161] CHIP:TOO: Label: Rapid Freeze + [1690189665.586162][16159:16161] CHIP:TOO: Mode: 2 + [1690189665.586175][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.586189][16159:16161] CHIP:TOO: [1]: { + [1690189665.586198][16159:16161] CHIP:TOO: Value: 16385 + [1690189665.586207][16159:16161] CHIP:TOO: } + [1690189665.586217][16159:16161] CHIP:TOO: } disabled: true - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 - Save the value as old_current_mode_dut + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th + [1690189753.281932][16180:16182] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 473867547 + [1690189753.281979][16180:16182] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" PICS: TCCM.S.C00.Rsp verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1689991627.698450][142731:142733] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1689991627.698488][142731:142733] CHIP:TOO: ChangeToModeResponse: { + [1689991627.698499][142731:142733] CHIP:TOO: status: 0 + [1689991627.698507][142731:142733] CHIP:TOO: } disabled: true - label: - "Step 4: Manually put the device in a state from which it will FAIL to + "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.TCCM.MODE_CHANGE_FAIL" + PICS: PIXIT.TCCM.CAN_TEST_MODE_FAILURE verification: | - + Manual operation required disabled: true - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 - Save the value as old_current_mode_dut + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1689991744.646114][142740:142742] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 2299631070 + [1689991744.646165][142740:142742] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.TCCM.MODE_CHANGE_FAIL" - PICS: TCCM.S.C00.Rsp + PICS: PIXIT.TCCM.CAN_TEST_MODE_FAILURE && TCCM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + Note : Please skip this step as SDK is not enabled with this failure response - Verify that the Status field is set to GenericFailure(0x02) or in the MfgCodes (0x80 to 0xBF) range + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 2 1 1 - Verify that the StatusText field has a length between 1 and 64 + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and below is the sample log provided for the raspi platform: + + [1690208444.427313][19616:19618] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1690208444.427473][19616:19618] CHIP:TOO: ChangeToModeResponse: { + [1690208444.427482][19616:19618] CHIP:TOO: status: 0 + [1690208444.427486][19616:19618] CHIP:TOO: } disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to old_current_mode_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform,Here CurrentMode attribute value is 0 + + [1689991744.646114][142740:142742] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 2299631070 + [1689991744.646165][142740:142742] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 8: Manually put the device in a state from which it will + "Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.TCCM.MODE_CHANGE_OK" verification: | - + Manual operation required disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - Save the value as old_current_mode_dut + [1689991744.646114][142740:142742] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 2299631070 + [1689991744.646165][142740:142742] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.TCCM.MODE_CHANGE_OK" PICS: TCCM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 1 1 1 - Verify that the Status field is set to Success(0x00) + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690189985.803199][16357:16359] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1690189985.803213][16357:16359] CHIP:TOO: ChangeToModeResponse: { + [1690189985.803220][16357:16359] CHIP:TOO: status: 0 + [1690189985.803224][16357:16359] CHIP:TOO: } disabled: true - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to PIXIT.TCCM.MODE_CHANGE_OK + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 + + [1690190007.564500][16361:16363] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 473867552 + [1690190007.564538][16361:16363] CHIP:TOO: CurrentMode: 1 disabled: true - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: TCCM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 3 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: - Verify that the Status field is set to UnsupportedMode(0x01). + [1690190041.868458][16365:16367] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1690190041.868514][16365:16367] CHIP:TOO: ChangeToModeResponse: { + [1690190041.868518][16365:16367] CHIP:TOO: status: 1 + [1690190041.868521][16365:16367] CHIP:TOO: } disabled: true - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + - label: "Step 14: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to PIXIT.TCCM.MODE_CHANGE_OK + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 + + [1690190081.598522][16369:16371] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 473867552 + [1690190081.598595][16369:16371] CHIP:TOO: CurrentMode: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml index 030a1fd97419d5..0999a37d8a8fae 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml @@ -21,6 +21,27 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. Refrigerator and Temperature Controlled Cabinet and OnOff clusters are available on the same endpoint + + 2. The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + disabled: true + + - label: "Note" + verification: | + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690190139.816096][16383:16385] CHIP:DMG: StatusIB = + [1690190139.816100][16383:16385] CHIP:DMG: { + [1690190139.816102][16383:16385] CHIP:DMG: status = 0x00 (SUCCESS), + [1690190139.816105][16383:16385] CHIP:DMG: }, + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -31,31 +52,66 @@ tests: - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: TCCM.S.A0003 && TCCM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 + + On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - Save the value as on_mode_dut + [1690190167.005388][16387:16389] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 473867556 + [1690190167.005447][16387:16389] CHIP:TOO: OnMode: 0 disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 && TCCM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute is an integer. + Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - Save the value as old_current_mode_dut + NOTE: If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + [1690190333.843046][16430:16432] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 2612443001 + [1690190333.843064][16430:16432] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: TCCM.S.A0000 && TCCM.S.F00 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th. + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690190348.956716][16435:16437] CHIP:DMG: } + [1690190348.956853][16435:16437] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 2612443001 + [1690190348.956895][16435:16437] CHIP:TOO: SupportedModes: 3 entries + [1690190348.956919][16435:16437] CHIP:TOO: [1]: { + [1690190348.956924][16435:16437] CHIP:TOO: Label: Normal + [1690190348.956929][16435:16437] CHIP:TOO: Mode: 0 + [1690190348.956935][16435:16437] CHIP:TOO: ModeTags: 1 entries + [1690190348.956952][16435:16437] CHIP:TOO: [1]: { + [1690190348.956955][16435:16437] CHIP:TOO: Value: 0 + [1690190348.956958][16435:16437] CHIP:TOO: } + [1690190348.956961][16435:16437] CHIP:TOO: } + [1690190348.956967][16435:16437] CHIP:TOO: [2]: { + [1690190348.956970][16435:16437] CHIP:TOO: Label: Rapid Cool + [1690190348.956972][16435:16437] CHIP:TOO: Mode: 1 + [1690190348.956976][16435:16437] CHIP:TOO: ModeTags: 1 entries + [1690190348.956980][16435:16437] CHIP:TOO: [1]: { + [1690190348.956982][16435:16437] CHIP:TOO: Value: 16384 + [1690190348.956984][16435:16437] CHIP:TOO: } + [1690190348.956987][16435:16437] CHIP:TOO: } + [1690190348.956992][16435:16437] CHIP:TOO: [3]: { + [1690190348.956994][16435:16437] CHIP:TOO: Label: Rapid Freeze + [1690190348.956997][16435:16437] CHIP:TOO: Mode: 2 + [1690190348.957000][16435:16437] CHIP:TOO: ModeTags: 1 entries + [1690190348.957003][16435:16437] CHIP:TOO: [1]: { + [1690190348.957006][16435:16437] CHIP:TOO: Value: 16385 + [1690190348.957008][16435:16437] CHIP:TOO: } + [1690190348.957010][16435:16437] CHIP:TOO: } disabled: true - label: @@ -63,25 +119,50 @@ tests: to new_mode_th" PICS: TCCM.S.C00.Rsp && TCCM.S.F00 verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690190379.801241][16449:16451] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1690190379.801256][16449:16451] CHIP:TOO: ChangeToModeResponse: { + [1690190379.801260][16449:16451] CHIP:TOO: status: 0 + [1690190379.801263][16449:16451] CHIP:TOO: } disabled: true - label: "Step 6: TH sends a Off command to the DUT" PICS: OO.S.C00.Rsp && TCCM.S.F00 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool onoff off 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = + [1684931101.118659][20709:20711] CHIP:DMG: { + [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931101.118665][20709:20711] CHIP:DMG: }, disabled: true - label: "Step 7: TH sends a On command to the DUT" PICS: OO.S.C01.Rsp && TCCM.S.F00 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool onoff on 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = + [1684931217.055517][20729:20731] CHIP:DMG: { + [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931217.055523][20729:20731] CHIP:DMG: }, disabled: true - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 && TCCM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 + - The value is equal to on_mode_dut + [1690190401.931156][16461:16463] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 2612443003 + [1690190401.931176][16461:16463] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml index 7c2b43de5486f5..d7283b93401d3b 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml @@ -24,6 +24,19 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To Execute the TC-TCCM-3.2 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,50 +47,164 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: TCCM.S.A0002 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer or Null + - Save the value as startup_mode_dut, below is the sample log provided for the raspi platform: + - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + - Here startup_mode_dut is null proceed to step 3. - Save the value as startup_mode_dut + [1690541247.515223][2594:2596] CHIP:DMG: } + [1690541247.521286][2594:2596] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 667171525 + [1690541247.523875][2594:2596] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: TCCM.S.A0001 + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: TCCM.S.A0000 + verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690190590.967854][16509:16511] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 899063585 + [1690190590.967878][16509:16511] CHIP:TOO: SupportedModes: 3 entries + [1690190590.967889][16509:16511] CHIP:TOO: [1]: { + [1690190590.967892][16509:16511] CHIP:TOO: Label: Normal + [1690190590.967895][16509:16511] CHIP:TOO: Mode: 0 + [1690190590.967899][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967904][16509:16511] CHIP:TOO: [1]: { + [1690190590.967907][16509:16511] CHIP:TOO: Value: 0 + [1690190590.967910][16509:16511] CHIP:TOO: } + [1690190590.967913][16509:16511] CHIP:TOO: } + [1690190590.967918][16509:16511] CHIP:TOO: [2]: { + [1690190590.967920][16509:16511] CHIP:TOO: Label: Rapid Cool + [1690190590.967923][16509:16511] CHIP:TOO: Mode: 1 + [1690190590.967926][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967929][16509:16511] CHIP:TOO: [1]: { + [1690190590.967932][16509:16511] CHIP:TOO: Value: 16384 + [1690190590.967934][16509:16511] CHIP:TOO: } + [1690190590.967937][16509:16511] CHIP:TOO: } + [1690190590.967942][16509:16511] CHIP:TOO: [3]: { + [1690190590.967944][16509:16511] CHIP:TOO: Label: Rapid Freeze + [1690190590.967946][16509:16511] CHIP:TOO: Mode: 2 + [1690190590.967950][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967953][16509:16511] CHIP:TOO: [1]: { + [1690190590.967956][16509:16511] CHIP:TOO: Value: 16385 + [1690190590.967958][16509:16511] CHIP:TOO: } + [1690190590.967961][16509:16511] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: TCCM.S.A0002 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write start-up-mode 0 1 1 - Save the value as old_current_mode_dut + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + [1690190139.816096][16383:16385] CHIP:DMG: StatusIB = + [1690190139.816100][16383:16385] CHIP:DMG: { + [1690190139.816102][16383:16385] CHIP:DMG: status = 0x00 (SUCCESS), + [1690190139.816105][16383:16385] CHIP:DMG: }, disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: TCCM.S.A0000 + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 - Verify that the list has two or more entries + On TH(chip-tool), Verify that CurrentMode attribute value is an integer + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform: - Save the Mode field values as supported_modes_dut + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8 - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th. + [1690190562.418843][16505:16507] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 899063585 + [1690190562.418907][16505:16507] CHIP:TOO: CurrentMode: 0 + disabled: true + + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." + PICS: TCCM.S.A0000 + verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690190590.967854][16509:16511] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 899063585 + [1690190590.967878][16509:16511] CHIP:TOO: SupportedModes: 3 entries + [1690190590.967889][16509:16511] CHIP:TOO: [1]: { + [1690190590.967892][16509:16511] CHIP:TOO: Label: Normal + [1690190590.967895][16509:16511] CHIP:TOO: Mode: 0 + [1690190590.967899][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967904][16509:16511] CHIP:TOO: [1]: { + [1690190590.967907][16509:16511] CHIP:TOO: Value: 0 + [1690190590.967910][16509:16511] CHIP:TOO: } + [1690190590.967913][16509:16511] CHIP:TOO: } + [1690190590.967918][16509:16511] CHIP:TOO: [2]: { + [1690190590.967920][16509:16511] CHIP:TOO: Label: Rapid Cool + [1690190590.967923][16509:16511] CHIP:TOO: Mode: 1 + [1690190590.967926][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967929][16509:16511] CHIP:TOO: [1]: { + [1690190590.967932][16509:16511] CHIP:TOO: Value: 16384 + [1690190590.967934][16509:16511] CHIP:TOO: } + [1690190590.967937][16509:16511] CHIP:TOO: } + [1690190590.967942][16509:16511] CHIP:TOO: [3]: { + [1690190590.967944][16509:16511] CHIP:TOO: Label: Rapid Freeze + [1690190590.967946][16509:16511] CHIP:TOO: Mode: 2 + [1690190590.967950][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967953][16509:16511] CHIP:TOO: [1]: { + [1690190590.967956][16509:16511] CHIP:TOO: Value: 16385 + [1690190590.967958][16509:16511] CHIP:TOO: } + [1690190590.967961][16509:16511] CHIP:TOO: } disabled: true - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: TCCM.S.C00.Rsp verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690190614.263418][16516:16518] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1690190614.263432][16516:16518] CHIP:TOO: ChangeToModeResponse: { + [1690190614.263438][16516:16518] CHIP:TOO: status: 0 + [1690190614.263441][16516:16518] CHIP:TOO: } + disabled: true + + - label: "Step 8: Physically power cycle the device" + verification: | + Physically power cycle the device disabled: true - - label: "Step 6: Physically power cycle the device" + - label: "Step 9: TH reads from the DUT the StartUpMode attribute." + PICS: TCCM.S.A0002 verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer + - Save the value as new_start_up_mode_dut + - The value is equal to new_start_up_mode_th and below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + [1690541859.062480][2695:2697] CHIP:DMG: } + [1690541859.062677][2695:2697] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 1628543926 + [1690541859.062764][2695:2697] CHIP:TOO: StartUpMode: 0 disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - The value is equal to startup_mode_dut + [1690190646.897310][16529:16531] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 3922115677 + [1690190646.897357][16529:16531] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml index 86efebd44626e1..f8f067844dcc96 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml @@ -26,6 +26,19 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To Execute the TC-TCC-3.3 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -36,68 +49,199 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: TCCM.S.A0002 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer or Null + - Save the value as startup_mode_dut, below is the sample log provided for the raspi platform: + - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + - Here startup_mode_dut is null proceed to step 3. - Save the value as startup_mode_dut + [1690541247.515223][2594:2596] CHIP:DMG: } + [1690541247.521286][2594:2596] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 667171525 + [1690541247.523875][2594:2596] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the OnMode attribute." - PICS: TCCM.S.A0003 && TCCM.S.A0002 + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: TCCM.S.A0000 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690190590.967854][16509:16511] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 899063585 + [1690190590.967878][16509:16511] CHIP:TOO: SupportedModes: 3 entries + [1690190590.967889][16509:16511] CHIP:TOO: [1]: { + [1690190590.967892][16509:16511] CHIP:TOO: Label: Normal + [1690190590.967895][16509:16511] CHIP:TOO: Mode: 0 + [1690190590.967899][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967904][16509:16511] CHIP:TOO: [1]: { + [1690190590.967907][16509:16511] CHIP:TOO: Value: 0 + [1690190590.967910][16509:16511] CHIP:TOO: } + [1690190590.967913][16509:16511] CHIP:TOO: } + [1690190590.967918][16509:16511] CHIP:TOO: [2]: { + [1690190590.967920][16509:16511] CHIP:TOO: Label: Rapid Cool + [1690190590.967923][16509:16511] CHIP:TOO: Mode: 1 + [1690190590.967926][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967929][16509:16511] CHIP:TOO: [1]: { + [1690190590.967932][16509:16511] CHIP:TOO: Value: 16384 + [1690190590.967934][16509:16511] CHIP:TOO: } + [1690190590.967937][16509:16511] CHIP:TOO: } + [1690190590.967942][16509:16511] CHIP:TOO: [3]: { + [1690190590.967944][16509:16511] CHIP:TOO: Label: Rapid Freeze + [1690190590.967946][16509:16511] CHIP:TOO: Mode: 2 + [1690190590.967950][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967953][16509:16511] CHIP:TOO: [1]: { + [1690190590.967956][16509:16511] CHIP:TOO: Value: 16385 + [1690190590.967958][16509:16511] CHIP:TOO: } + [1690190590.967961][16509:16511] CHIP:TOO: } + disabled: true - Save the value as old_on_mode_dut + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: TCCM.S.A0002 + verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write start-up-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - If startup_mode_dut is equal to old_on_mode_dut proceed to step 4. Else proceed to step 6. + [1690190139.816096][16383:16385] CHIP:DMG: StatusIB = + [1690190139.816100][16383:16385] CHIP:DMG: { + [1690190139.816102][16383:16385] CHIP:DMG: status = 0x00 (SUCCESS), + [1690190139.816105][16383:16385] CHIP:DMG: }, disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: TCCM.S.A0000 && TCCM.S.A0002 + - label: "Step 5: TH reads from the DUT the OnMode attribute." + PICS: TCCM.S.A0003 && TCCM.S.A0002 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries + Set onmode to any integer value because as default it value has null. + + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - Verify that the list has two or more entries + [1690190824.443367][16580:16582] CHIP:DMG: StatusIB = + [1690190824.443379][16580:16582] CHIP:DMG: { + [1690190824.443391][16580:16582] CHIP:DMG: status = 0x00 (SUCCESS), + [1690190824.443402][16580:16582] CHIP:DMG: }, - Save the Mode field values as supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th. + On TH(chip-tool), Verify that OnMode attribute value is an integer + -Save the value as old_on_mode_du, t below is the sample log provided for the raspi platform, here OnMode attribute value is 0 + + [1690190846.367481][16585:16587] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 978521150 + [1690190846.367522][16585:16587] CHIP:TOO: OnMode: 0 + + If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. Else proceed to step 8. + disabled: true + + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." + PICS: TCCM.S.A0000 && TCCM.S.A0002 + verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690190590.967854][16509:16511] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 899063585 + [1690190590.967878][16509:16511] CHIP:TOO: SupportedModes: 3 entries + [1690190590.967889][16509:16511] CHIP:TOO: [1]: { + [1690190590.967892][16509:16511] CHIP:TOO: Label: Normal + [1690190590.967895][16509:16511] CHIP:TOO: Mode: 0 + [1690190590.967899][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967904][16509:16511] CHIP:TOO: [1]: { + [1690190590.967907][16509:16511] CHIP:TOO: Value: 0 + [1690190590.967910][16509:16511] CHIP:TOO: } + [1690190590.967913][16509:16511] CHIP:TOO: } + [1690190590.967918][16509:16511] CHIP:TOO: [2]: { + [1690190590.967920][16509:16511] CHIP:TOO: Label: Rapid Cool + [1690190590.967923][16509:16511] CHIP:TOO: Mode: 1 + [1690190590.967926][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967929][16509:16511] CHIP:TOO: [1]: { + [1690190590.967932][16509:16511] CHIP:TOO: Value: 16384 + [1690190590.967934][16509:16511] CHIP:TOO: } + [1690190590.967937][16509:16511] CHIP:TOO: } + [1690190590.967942][16509:16511] CHIP:TOO: [3]: { + [1690190590.967944][16509:16511] CHIP:TOO: Label: Rapid Freeze + [1690190590.967946][16509:16511] CHIP:TOO: Mode: 2 + [1690190590.967950][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967953][16509:16511] CHIP:TOO: [1]: { + [1690190590.967956][16509:16511] CHIP:TOO: Value: 16385 + [1690190590.967958][16509:16511] CHIP:TOO: } + [1690190590.967961][16509:16511] CHIP:TOO: } disabled: true - label: - "Step 5: TH writes to the DUT the OnMode attribute with the + "Step 7: TH writes to the DUT the OnMode attribute with the new_mode_th value" PICS: TCCM.S.A0003 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write on-mode 1 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690190905.134866][16594:16596] CHIP:DMG: StatusIB = + [1690190905.134869][16594:16596] CHIP:DMG: { + [1690190905.134873][16594:16596] CHIP:DMG: status = 0x00 (SUCCESS), + [1690190905.134876][16594:16596] CHIP:DMG: }, disabled: true - - label: "Step 6: TH reads from the DUT the OnMode attribute." + - label: "Step 8: TH reads from the DUT the OnMode attribute." PICS: TCCM.S.A0003 && TCCM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 - Save the value as new_on_mode_dut + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as new_on_mode_dut and value is equal to new_mode_th, below is the sample log provided for the raspi platform, here OnMode attribute value is 1 - The value is equal to new_mode_th + [1690190846.367481][16585:16587] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 978521150 + [1690190846.367522][16585:16587] CHIP:TOO: OnMode: 1 disabled: true - label: - "Step 7: TH writes to the DUT the StartUpOnOff attribute with the + "Step 9: TH writes to the DUT the StartUpOnOff attribute with the value 1." PICS: OO.S.A4003 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool onoff write start-up-on-off 1 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690180270.884152][14228:14230] CHIP:DMG: { + [1690180270.884156][14228:14230] CHIP:DMG: status = 0x00 (SUCCESS), + [1690180270.884158][14228:14230] CHIP:DMG: }, + disabled: true + + - label: "Step 10: Physically power cycle the device" + verification: | + Physically power cycle the device disabled: true - - label: "Step 8: Physically power cycle the device" + - label: "Step 11: TH reads from the DUT the StartUpMode attribute." + PICS: TCCM.S.A0002 verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 + On TH(chip-tool), Verify that StartUpMode attribute value is an integer value is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform , here StartUpMode is 0 + + [1690541247.515223][2594:2596] CHIP:DMG: } + [1690541247.521286][2594:2596] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 667171525 + [1690541247.523875][2594:2596] CHIP:TOO: StartUpMode: 0 disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to new_on_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - The value is equal to new_on_mode_dut + [1690190945.261971][16605:16607] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 4180211608 + [1690190945.261982][16605:16607] CHIP:TOO: CurrentMode: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml index f70fad20638661..a31f3ccf9a1775 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml @@ -35,4 +35,15 @@ tests: PICS: TCTL.S.A0003 verification: | ./chip-tool temperaturecontrol read step 1 1 + + On TH(chip-tool), Verify that the DUT response contains a temperature value <= TCTL.S.A0002(MaxTemperature) - TCTL.S.A0001(MinTemperature) + and (TCTL.S.A0002(MaxTemperature) - TCTL.S.A0001(MinTemperature)) % TCTL.S.A0003(Step) == 0 + + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0003 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: step: 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml index 398788f4ed8802..7806d2fce732ab 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml @@ -36,16 +36,41 @@ tests: PICS: TCTL.S.A0000 verification: | ./chip-tool temperaturecontrol read temperature-setpoint 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperature with value between MinTemperature and TCTL.S.A0002(MaxTemperature) inclusive. + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0000 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: TemperatureSetpoint : 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 3: TH reads from the DUT the MinTemperature attribute" PICS: TCTL.S.A0001 verification: | ./chip-tool temperaturecontrol read min-temperature 1 1 + on TH(chip-tool), Verify that the DUT response contains a temperature with value less than TCTL.S.A0002(MaxTemperature). + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0001 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: MinTemperature: 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 4: TH reads from the DUT the MaxTemperature attribute" PICS: TCTL.S.A0002 verification: | ./chip-tool temperaturecontrol read max-temperature 1 1 + + On TH(chip-tool), Verify that the DUT response contains a temperature with value greater than TCTL.S.A0001(MinTemperature). + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0002 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: MaxTemperature: 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TIMESYNC_2_15.yaml b/src/app/tests/suites/certification/Test_TC_TIMESYNC_2_15.yaml deleted file mode 100644 index dea7e182c42dd1..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TIMESYNC_2_15.yaml +++ /dev/null @@ -1,163 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 142.2.15. [TC-TIMESYNC-2.15] Endpoint composition with DUT as Server - -PICS: - - TIMESYNC.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: TH does a wildcard read of the time sync cluster UTCTime - attribute across all endpoints." - verification: | - ./chip-tool timesynchronization read utctime 1 0xFFFF - - On TH(Chip-tool), Verify that only one AttributeReportIB is returned for endpoint 0. - - [1688724683.563762][13887:13889] CHIP:DMG: } - [1688724683.563834][13887:13889] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0038 Attribute 0x0000_0000 DataVersion: 2061582322 - [1688724683.563870][13887:13889] CHIP:TOO: UTCTime: 742039883563331 - [1688724683.563926][13887:13889] CHIP:EM: <<< [E:22156i S:9939 M:104620514 (Ack:265588578)] (S) Msg TX to 1:0000000000000001 [8979] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1688724683.563939][13887:13889] CHIP:IN: (S) Sending msg 104620514 on secure session with LSID: 9939 - [1688724683.563964][13887:13889] CHIP:EM: Flushed pending ack for MessageCounter:265588578 on exchange 22156i - disabled: true - - - label: - "Step 2: TH does a wildcard read of the descriptor cluster ServerList - attribute across all endpoint." - verification: | - ./chip-tool descriptor read server-list 1 0xFFFF - On TH(Chip-tool), Verify that the time synchronization cluster id - 0x0038(56) is listed in the ServerList attribute from endpoint 0 and is not listed in the ServerList attribute for any other endpoints. - - [1688724759.304134][13899:13901] CHIP:DMG: } - [1688724759.304525][13899:13901] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 2397850349 - [1688724759.304584][13899:13901] CHIP:TOO: ServerList: 29 entries - [1688724759.304598][13899:13901] CHIP:TOO: [1]: 3 - [1688724759.304607][13899:13901] CHIP:TOO: [2]: 4 - [1688724759.304617][13899:13901] CHIP:TOO: [3]: 29 - [1688724759.304627][13899:13901] CHIP:TOO: [4]: 30 - [1688724759.304637][13899:13901] CHIP:TOO: [5]: 31 - [1688724759.304646][13899:13901] CHIP:TOO: [6]: 40 - [1688724759.304656][13899:13901] CHIP:TOO: [7]: 42 - [1688724759.304666][13899:13901] CHIP:TOO: [8]: 43 - [1688724759.304676][13899:13901] CHIP:TOO: [9]: 44 - [1688724759.304686][13899:13901] CHIP:TOO: [10]: 45 - [1688724759.304695][13899:13901] CHIP:TOO: [11]: 46 - [1688724759.304705][13899:13901] CHIP:TOO: [12]: 47 - [1688724759.304715][13899:13901] CHIP:TOO: [13]: 48 - [1688724759.304725][13899:13901] CHIP:TOO: [14]: 49 - [1688724759.304734][13899:13901] CHIP:TOO: [15]: 50 - [1688724759.304744][13899:13901] CHIP:TOO: [16]: 51 - [1688724759.304754][13899:13901] CHIP:TOO: [17]: 52 - [1688724759.304764][13899:13901] CHIP:TOO: [18]: 53 - [1688724759.304773][13899:13901] CHIP:TOO: [19]: 54 - [1688724759.304783][13899:13901] CHIP:TOO: [20]: 55 - [1688724759.304793][13899:13901] CHIP:TOO: [21]: 56 - [1688724759.304802][13899:13901] CHIP:TOO: [22]: 60 - [1688724759.304813][13899:13901] CHIP:TOO: [23]: 62 - [1688724759.304823][13899:13901] CHIP:TOO: [24]: 63 - [1688724759.304832][13899:13901] CHIP:TOO: [25]: 64 - [1688724759.304842][13899:13901] CHIP:TOO: [26]: 65 - [1688724759.304852][13899:13901] CHIP:TOO: [27]: 70 - [1688724759.304862][13899:13901] CHIP:TOO: [28]: 1029 - [1688724759.304872][13899:13901] CHIP:TOO: [29]: 4294048774 - [1688724759.305115][13899:13901] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1621835978 - [1688724759.305168][13899:13901] CHIP:TOO: ServerList: 69 entries - [1688724759.305177][13899:13901] CHIP:TOO: [1]: 3 - [1688724759.305187][13899:13901] CHIP:TOO: [2]: 4 - [1688724759.305197][13899:13901] CHIP:TOO: [3]: 5 - [1688724759.305207][13899:13901] CHIP:TOO: [4]: 6 - [1688724759.305217][13899:13901] CHIP:TOO: [5]: 7 - [1688724759.305226][13899:13901] CHIP:TOO: [6]: 8 - [1688724759.305236][13899:13901] CHIP:TOO: [7]: 15 - [1688724759.305246][13899:13901] CHIP:TOO: [8]: 29 - [1688724759.305256][13899:13901] CHIP:TOO: [9]: 30 - [1688724759.305265][13899:13901] CHIP:TOO: [10]: 37 - [1688724759.305275][13899:13901] CHIP:TOO: [11]: 47 - [1688724759.305285][13899:13901] CHIP:TOO: [12]: 59 - [1688724759.305295][13899:13901] CHIP:TOO: [13]: 64 - [1688724759.305304][13899:13901] CHIP:TOO: [14]: 65 - [1688724759.305314][13899:13901] CHIP:TOO: [15]: 69 - [1688724759.305323][13899:13901] CHIP:TOO: [16]: 80 - [1688724759.305333][13899:13901] CHIP:TOO: [17]: 87 - [1688724759.305343][13899:13901] CHIP:TOO: [18]: 91 - [1688724759.305353][13899:13901] CHIP:TOO: [19]: 113 - [1688724759.305362][13899:13901] CHIP:TOO: [20]: 114 - [1688724759.305372][13899:13901] CHIP:TOO: [21]: 115 - [1688724759.305382][13899:13901] CHIP:TOO: [22]: 116 - [1688724759.305392][13899:13901] CHIP:TOO: [23]: 117 - [1688724759.305402][13899:13901] CHIP:TOO: [24]: 118 - [1688724759.305411][13899:13901] CHIP:TOO: [25]: 119 - [1688724759.305421][13899:13901] CHIP:TOO: [26]: 120 - [1688724759.305431][13899:13901] CHIP:TOO: [27]: 121 - [1688724759.305441][13899:13901] CHIP:TOO: [28]: 122 - [1688724759.305450][13899:13901] CHIP:TOO: [29]: 123 - [1688724759.305460][13899:13901] CHIP:TOO: [30]: 124 - [1688724759.305470][13899:13901] CHIP:TOO: [31]: 257 - [1688724759.305480][13899:13901] CHIP:TOO: [32]: 258 - [1688724759.305490][13899:13901] CHIP:TOO: [33]: 259 - [1688724759.305499][13899:13901] CHIP:TOO: [34]: 512 - [1688724759.305509][13899:13901] CHIP:TOO: [35]: 513 - [1688724759.305519][13899:13901] CHIP:TOO: [36]: 514 - [1688724759.305529][13899:13901] CHIP:TOO: [37]: 516 - [1688724759.305539][13899:13901] CHIP:TOO: [38]: 768 - [1688724759.305549][13899:13901] CHIP:TOO: [39]: 769 - [1688724759.305558][13899:13901] CHIP:TOO: [40]: 1024 - [1688724759.305568][13899:13901] CHIP:TOO: [41]: 1026 - [1688724759.305578][13899:13901] CHIP:TOO: [42]: 1027 - [1688724759.305588][13899:13901] CHIP:TOO: [43]: 1028 - [1688724759.305598][13899:13901] CHIP:TOO: [44]: 1029 - [1688724759.305607][13899:13901] CHIP:TOO: [45]: 1030 - [1688724759.305617][13899:13901] CHIP:TOO: [46]: 1036 - [1688724759.305627][13899:13901] CHIP:TOO: [47]: 1037 - [1688724759.305637][13899:13901] CHIP:TOO: [48]: 1043 - [1688724759.305647][13899:13901] CHIP:TOO: [49]: 1045 - [1688724759.305657][13899:13901] CHIP:TOO: [50]: 1066 - [1688724759.305667][13899:13901] CHIP:TOO: [51]: 1067 - [1688724759.305676][13899:13901] CHIP:TOO: [52]: 1068 - [1688724759.305686][13899:13901] CHIP:TOO: [53]: 1069 - [1688724759.305696][13899:13901] CHIP:TOO: [54]: 1070 - [1688724759.305705][13899:13901] CHIP:TOO: [55]: 1071 - [1688724759.305715][13899:13901] CHIP:TOO: [56]: 1283 - [1688724759.305725][13899:13901] CHIP:TOO: [57]: 1284 - [1688724759.305734][13899:13901] CHIP:TOO: [58]: 1285 - [1688724759.305744][13899:13901] CHIP:TOO: [59]: 1286 - [1688724759.305754][13899:13901] CHIP:TOO: [60]: 1287 - [1688724759.305764][13899:13901] CHIP:TOO: [61]: 1288 - [1688724759.305773][13899:13901] CHIP:TOO: [62]: 1289 - [1688724759.305783][13899:13901] CHIP:TOO: [63]: 1290 - [1688724759.305793][13899:13901] CHIP:TOO: [64]: 1291 - [1688724759.305802][13899:13901] CHIP:TOO: [65]: 1292 - [1688724759.305812][13899:13901] CHIP:TOO: [66]: 1293 - [1688724759.305822][13899:13901] CHIP:TOO: [67]: 1294 - [1688724759.305832][13899:13901] CHIP:TOO: [68]: 2820 - [1688724759.305842][13899:13901] CHIP:TOO: [69]: 4294048773 - [1688724759.305881][13899:13901] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1550598832 - [1688724759.305897][13899:13901] CHIP:TOO: ServerList: 5 entries - [1688724759.305906][13899:13901] CHIP:TOO: [1]: 4 - [1688724759.305916][13899:13901] CHIP:TOO: [2]: 6 - [1688724759.305926][13899:13901] CHIP:TOO: [3]: 29 - [1688724759.305936][13899:13901] CHIP:TOO: [4]: 47 - [1688724759.305945][13899:13901] CHIP:TOO: [5]: 1030 - [1688724759.306032][13899:13901] CHIP:EM: <<< [E:9189i S:12449 M:231725041 (Ack:22667687)] (S) Msg TX to 1:0000000000000001 [8979] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1688724759.306046][13899:13901] CHIP:IN: (S) Sending msg 231725041 on secure session with LSID: 12449 - [1688724759.306081][13899:13901] CHIP:EM: Flushed pending ack for MessageCounter:22667687 on exchange 9189i - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TMP_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_TMP_3_1_Simulated.yaml deleted file mode 100644 index fcef638b9e000a..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TMP_3_1_Simulated.yaml +++ /dev/null @@ -1,659 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 6.3.1. [TC-TMP-3.1] Attributes with client as DUT - -PICS: - - TMP.C - - TMP.C.AM-READ - - TMP.C.AO-READ - - TMP.C.AM-WRITE - - TMP.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Temperature Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: MeasuredValue" - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute: MinMeasuredValue" - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute: MaxMeasuredValue" - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute: Tolerance" - wait: "readAttribute" - attribute: "Tolerance" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - To verify all below steps use all-clusters-minimal-app - - ./chip-tool temperaturemeasurement read measured-value 1 1 - Verify DUT receives measured-value attribute response on the TH(all-clusters-minimal-app) Log: - - [1666954493.877646][6087:6087] CHIP:EM: Handling via exchange: 25543r, Delegate: 0xaaaab0ad80e0 - [1666954493.877744][6087:6087] CHIP:IM: Received Read request - [1666954493.877919][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666954493.877989][6087:6087] CHIP:DMG: { - [1666954493.878044][6087:6087] CHIP:DMG: AttributePathIBs = - [1666954493.878109][6087:6087] CHIP:DMG: [ - [1666954493.878172][6087:6087] CHIP:DMG: AttributePathIB = - [1666954493.878258][6087:6087] CHIP:DMG: { - [1666954493.878333][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954493.878483][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954493.878627][6087:6087] CHIP:DMG: Attribute = 0x0000_0000, - [1666954493.878815][6087:6087] CHIP:DMG: } - [1666954493.878899][6087:6087] CHIP:DMG: - [1666954493.878966][6087:6087] CHIP:DMG: ], - [1666954493.879039][6087:6087] CHIP:DMG: - [1666954493.879544][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666954493.879716][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666954493.879780][6087:6087] CHIP:DMG: }, - [1666954493.879963][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666954493.880294][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666954493.880375][6087:6087] CHIP:DMG: Cluster 402, Attribute 0 is dirty - [1666954493.880434][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666954493.880505][6087:6087] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0402 e=1 p=v - [1666954493.880583][6087:6087] CHIP:DMG: AccessControl: allowed - [1666954493.880703][6087:6087] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666954493.881294][6087:6087] CHIP:EM: <<< [E:25543r M:47295307 (Ack:14766592)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666954493.881411][6087:6087] CHIP:IN: (S) Sending msg 47295307 on secure session with LSID: 1274 - [1666954493.882135][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:47925 | 47295307 | [Interaction Model (1) / Report Data (0x05) / Session = 17330 / Exchange = 25543] - [1666954493.882240][6087:6087] CHIP:DMG: Header Flags = - [1666954493.882298][6087:6087] CHIP:DMG: { - [1666954493.882387][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666954493.882444][6087:6087] CHIP:DMG: { - [1666954493.882504][6087:6087] CHIP:DMG: AckMsg = 14766592 - [1666954493.882560][6087:6087] CHIP:DMG: NeedsAck = true - [1666954493.882607][6087:6087] CHIP:DMG: } - [1666954493.882677][6087:6087] CHIP:DMG: } - [1666954493.882776][6087:6087] CHIP:DMG: - [1666954493.882851][6087:6087] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666954493.882907][6087:6087] CHIP:DMG: { - [1666954493.882963][6087:6087] CHIP:DMG: data = 00b243004babd102ad9c892c216d98202fc231b7185fd81d7cdfbbcbea762458172c6c84a150ec33023c18ec7a0b46e73335a7aaf43ca2b4e050c6d85c866bd7039f5bd37366 - [1666954493.883023][6087:6087] CHIP:DMG: buffer_ptr = 187650284036288 - [1666954493.883077][6087:6087] CHIP:DMG: } - [1666954493.883130][6087:6087] CHIP:DMG: - [1666954493.883299][6087:6087] CHIP:DMG: ReportDataMessage = - [1666954493.883367][6087:6087] CHIP:DMG: { - [1666954493.883422][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666954493.883492][6087:6087] CHIP:DMG: [ - [1666954493.883554][6087:6087] CHIP:DMG: AttributeReportIB = - [1666954493.883720][6087:6087] CHIP:DMG: { - [1666954493.883803][6087:6087] CHIP:DMG: AttributeDataIB = - [1666954493.883936][6087:6087] CHIP:DMG: { - [1666954493.884016][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666954493.884157][6087:6087] CHIP:DMG: AttributePathIB = - [1666954493.884302][6087:6087] CHIP:DMG: { - [1666954493.884451][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954493.884602][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954493.884756][6087:6087] CHIP:DMG: Attribute = 0x0000_0000, - [1666954493.884899][6087:6087] CHIP:DMG: } - [1666954493.884985][6087:6087] CHIP:DMG: - [1666954493.885057][6087:6087] CHIP:DMG: Data = NULL - [1666954493.885135][6087:6087] CHIP:DMG: }, - [1666954493.885273][6087:6087] CHIP:DMG: - [1666954493.885350][6087:6087] CHIP:DMG: }, - [1666954493.885477][6087:6087] CHIP:DMG: - [1666954493.885544][6087:6087] CHIP:DMG: ], - - - ./chip-tool temperaturemeasurement read max-measured-value 1 1 - Verify DUT receives max-measured-value attribute response on the TH(all-clusters-minimal-app) Log: - - [1666954528.135348][6087:6087] CHIP:EM: Handling via exchange: 34550r, Delegate: 0xaaaab0ad80e0 - [1666954528.135445][6087:6087] CHIP:IM: Received Read request - [1666954528.135617][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666954528.135684][6087:6087] CHIP:DMG: { - [1666954528.135738][6087:6087] CHIP:DMG: AttributePathIBs = - [1666954528.135802][6087:6087] CHIP:DMG: [ - [1666954528.135864][6087:6087] CHIP:DMG: AttributePathIB = - [1666954528.135948][6087:6087] CHIP:DMG: { - [1666954528.136021][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954528.136243][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954528.136334][6087:6087] CHIP:DMG: Attribute = 0x0000_0002, - [1666954528.136418][6087:6087] CHIP:DMG: } - [1666954528.136487][6087:6087] CHIP:DMG: - [1666954528.136559][6087:6087] CHIP:DMG: ], - [1666954528.136631][6087:6087] CHIP:DMG: - [1666954528.136698][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666954528.136762][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666954528.136821][6087:6087] CHIP:DMG: }, - [1666954528.136988][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666954528.137208][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666954528.137279][6087:6087] CHIP:DMG: Cluster 402, Attribute 2 is dirty - [1666954528.137334][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_0002 (expanded=0) - [1666954528.137401][6087:6087] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0402 e=1 p=v - [1666954528.137477][6087:6087] CHIP:DMG: AccessControl: allowed - [1666954528.137592][6087:6087] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666954528.138121][6087:6087] CHIP:EM: <<< [E:34550r M:157321696 (Ack:200937431)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666954528.138223][6087:6087] CHIP:IN: (S) Sending msg 157321696 on secure session with LSID: 1275 - [1666954528.138927][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:60947 | 157321696 | [Interaction Model (1) / Report Data (0x05) / Session = 47327 / Exchange = 34550] - [1666954528.139022][6087:6087] CHIP:DMG: Header Flags = - [1666954528.139080][6087:6087] CHIP:DMG: { - [1666954528.139168][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666954528.139226][6087:6087] CHIP:DMG: { - [1666954528.139286][6087:6087] CHIP:DMG: AckMsg = 200937431 - [1666954528.139341][6087:6087] CHIP:DMG: NeedsAck = true - [1666954528.139394][6087:6087] CHIP:DMG: } - [1666954528.139466][6087:6087] CHIP:DMG: } - [1666954528.139521][6087:6087] CHIP:DMG: - [1666954528.139588][6087:6087] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666954528.139644][6087:6087] CHIP:DMG: { - [1666954528.139699][6087:6087] CHIP:DMG: data = 00dfb800e0896009f537bfb3ee387784dd9550975d432fc9600b2c971bd4be1e94725849b9c26de6d951e18c9bd7c72e2494172492cc8f645459f0523f4e9f688827c1d68604 - [1666954528.139757][6087:6087] CHIP:DMG: buffer_ptr = 187650284039360 - [1666954528.139810][6087:6087] CHIP:DMG: } - [1666954528.139861][6087:6087] CHIP:DMG: - [1666954528.140022][6087:6087] CHIP:DMG: ReportDataMessage = - [1666954528.140087][6087:6087] CHIP:DMG: { - [1666954528.140141][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666954528.140225][6087:6087] CHIP:DMG: [ - [1666954528.140287][6087:6087] CHIP:DMG: AttributeReportIB = - [1666954528.140371][6087:6087] CHIP:DMG: { - [1666954528.140442][6087:6087] CHIP:DMG: AttributeDataIB = - [1666954528.140515][6087:6087] CHIP:DMG: { - [1666954528.140596][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666954528.140679][6087:6087] CHIP:DMG: AttributePathIB = - [1666954528.140771][6087:6087] CHIP:DMG: { - [1666954528.140866][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954528.140958][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954528.141053][6087:6087] CHIP:DMG: Attribute = 0x0000_0002, - [1666954528.141141][6087:6087] CHIP:DMG: } - [1666954528.141237][6087:6087] CHIP:DMG: - [1666954528.141331][6087:6087] CHIP:DMG: Data = NULL - [1666954528.141410][6087:6087] CHIP:DMG: }, - [1666954528.141493][6087:6087] CHIP:DMG: - [1666954528.141563][6087:6087] CHIP:DMG: }, - [1666954528.141648][6087:6087] CHIP:DMG: - [1666954528.141715][6087:6087] CHIP:DMG: ], - - - ./chip-tool temperaturemeasurement read min-measured-value 1 1 - Verify DUT receives min-measured-value attribute response on the TH(all-clusters-minimal-app) Log: - - [1666954579.729186][6087:6087] CHIP:EM: Handling via exchange: 13627r, Delegate: 0xaaaab0ad80e0 - [1666954579.729291][6087:6087] CHIP:IM: Received Read request - [1666954579.729463][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666954579.729530][6087:6087] CHIP:DMG: { - [1666954579.729585][6087:6087] CHIP:DMG: AttributePathIBs = - [1666954579.729651][6087:6087] CHIP:DMG: [ - [1666954579.729713][6087:6087] CHIP:DMG: AttributePathIB = - [1666954579.729796][6087:6087] CHIP:DMG: { - [1666954579.729871][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954579.729948][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954579.730024][6087:6087] CHIP:DMG: Attribute = 0x0000_0001, - [1666954579.730094][6087:6087] CHIP:DMG: } - [1666954579.730168][6087:6087] CHIP:DMG: - [1666954579.730236][6087:6087] CHIP:DMG: ], - [1666954579.730307][6087:6087] CHIP:DMG: - [1666954579.730376][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666954579.730440][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666954579.730499][6087:6087] CHIP:DMG: }, - [1666954579.730674][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666954579.730963][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666954579.731038][6087:6087] CHIP:DMG: Cluster 402, Attribute 1 is dirty - [1666954579.731095][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) - [1666954579.731164][6087:6087] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0402 e=1 p=v - [1666954579.731240][6087:6087] CHIP:DMG: AccessControl: allowed - [1666954579.731379][6087:6087] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666954579.732062][6087:6087] CHIP:EM: <<< [E:13627r M:44698905 (Ack:48846946)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666954579.732182][6087:6087] CHIP:IN: (S) Sending msg 44698905 on secure session with LSID: 1276 - [1666954579.732896][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:50038 | 44698905 | [Interaction Model (1) / Report Data (0x05) / Session = 14277 / Exchange = 13627] - [1666954579.733002][6087:6087] CHIP:DMG: Header Flags = - [1666954579.733059][6087:6087] CHIP:DMG: { - [1666954579.733149][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666954579.733205][6087:6087] CHIP:DMG: { - [1666954579.733265][6087:6087] CHIP:DMG: AckMsg = 48846946 - [1666954579.733320][6087:6087] CHIP:DMG: NeedsAck = true - [1666954579.733374][6087:6087] CHIP:DMG: } - [1666954579.733445][6087:6087] CHIP:DMG: } - [1666954579.733501][6087:6087] CHIP:DMG: - [1666954579.733571][6087:6087] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666954579.733626][6087:6087] CHIP:DMG: { - [1666954579.733682][6087:6087] CHIP:DMG: data = 00c53700190daa027a1deb577441765a1cec59927ae2370d0d2190907ce38e16fa3493923aca247183f3cc5540bd1f4683f32e86f9842fc968152ea37fc686b1aedaf7296ffb - [1666954579.733740][6087:6087] CHIP:DMG: buffer_ptr = 187650284040096 - [1666954579.733856][6087:6087] CHIP:DMG: } - [1666954579.733915][6087:6087] CHIP:DMG: - [1666954579.734086][6087:6087] CHIP:DMG: ReportDataMessage = - [1666954579.734154][6087:6087] CHIP:DMG: { - [1666954579.734205][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666954579.734283][6087:6087] CHIP:DMG: [ - [1666954579.734346][6087:6087] CHIP:DMG: AttributeReportIB = - [1666954579.734427][6087:6087] CHIP:DMG: { - [1666954579.734502][6087:6087] CHIP:DMG: AttributeDataIB = - [1666954579.734595][6087:6087] CHIP:DMG: { - [1666954579.734691][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666954579.734824][6087:6087] CHIP:DMG: AttributePathIB = - [1666954579.734923][6087:6087] CHIP:DMG: { - [1666954579.735005][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954579.735105][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954579.735196][6087:6087] CHIP:DMG: Attribute = 0x0000_0001, - [1666954579.735292][6087:6087] CHIP:DMG: } - [1666954579.735391][6087:6087] CHIP:DMG: - [1666954579.735487][6087:6087] CHIP:DMG: Data = NULL - [1666954579.735565][6087:6087] CHIP:DMG: }, - [1666954579.735651][6087:6087] CHIP:DMG: - [1666954579.735724][6087:6087] CHIP:DMG: }, - [1666954579.735801][6087:6087] CHIP:DMG: - [1666954579.735863][6087:6087] CHIP:DMG: ], - - - ./chip-tool temperaturemeasurement read feature-map 1 1 - Verify DUT receives feature-map attribute response on the TH(all-clusters-minimal-app) Log: - - [1666955056.085472][6087:6087] CHIP:EM: Handling via exchange: 8859r, Delegate: 0xaaaab0ad80e0 - [1666955056.085572][6087:6087] CHIP:IM: Received Read request - [1666955056.085747][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666955056.085819][6087:6087] CHIP:DMG: { - [1666955056.085874][6087:6087] CHIP:DMG: AttributePathIBs = - [1666955056.085954][6087:6087] CHIP:DMG: [ - [1666955056.086018][6087:6087] CHIP:DMG: AttributePathIB = - [1666955056.086107][6087:6087] CHIP:DMG: { - [1666955056.086188][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955056.086282][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955056.086373][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666955056.086451][6087:6087] CHIP:DMG: } - [1666955056.086517][6087:6087] CHIP:DMG: - [1666955056.086577][6087:6087] CHIP:DMG: ], - [1666955056.086649][6087:6087] CHIP:DMG: - [1666955056.086762][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666955056.086836][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666955056.086897][6087:6087] CHIP:DMG: }, - [1666955056.087072][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666955056.087308][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666955056.087385][6087:6087] CHIP:DMG: Cluster 402, Attribute fffc is dirty - [1666955056.087440][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1666955056.087510][6087:6087] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0402 e=1 p=v - [1666955056.087586][6087:6087] CHIP:DMG: AccessControl: allowed - [1666955056.087705][6087:6087] CHIP:DMG: Sending report (payload has 38 bytes)... - [1666955056.088268][6087:6087] CHIP:EM: <<< [E:8859r M:73892045 (Ack:58753019)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666955056.088379][6087:6087] CHIP:IN: (S) Sending msg 73892045 on secure session with LSID: 1277 - [1666955056.089094][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:45653 | 73892045 | [Interaction Model (1) / Report Data (0x05) / Session = 30000 / Exchange = 8859] - [1666955056.089297][6087:6087] CHIP:DMG: Header Flags = - [1666955056.089357][6087:6087] CHIP:DMG: { - [1666955056.089448][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666955056.089505][6087:6087] CHIP:DMG: { - [1666955056.089565][6087:6087] CHIP:DMG: AckMsg = 58753019 - [1666955056.089622][6087:6087] CHIP:DMG: NeedsAck = true - [1666955056.089675][6087:6087] CHIP:DMG: } - [1666955056.089748][6087:6087] CHIP:DMG: } - [1666955056.089805][6087:6087] CHIP:DMG: - [1666955056.089875][6087:6087] CHIP:DMG: Encrypted Payload (72 bytes) = - [1666955056.089933][6087:6087] CHIP:DMG: { - [1666955056.089991][6087:6087] CHIP:DMG: data = 00307500cd80670441d7379f0c2dc290cb546382bd57698bf3b434ce28da2056c754abe2015af240726bece5af2ddb6c7c4161daa7179aa455f0e17736706d0af429e76cbd119449 - [1666955056.090050][6087:6087] CHIP:DMG: buffer_ptr = 187650284037616 - [1666955056.090105][6087:6087] CHIP:DMG: } - [1666955056.090157][6087:6087] CHIP:DMG: - [1666955056.090328][6087:6087] CHIP:DMG: ReportDataMessage = - [1666955056.090397][6087:6087] CHIP:DMG: { - [1666955056.090452][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666955056.090530][6087:6087] CHIP:DMG: [ - [1666955056.090593][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955056.090687][6087:6087] CHIP:DMG: { - [1666955056.090808][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955056.090887][6087:6087] CHIP:DMG: { - [1666955056.090974][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955056.091058][6087:6087] CHIP:DMG: AttributePathIB = - [1666955056.091144][6087:6087] CHIP:DMG: { - [1666955056.091234][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955056.091328][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955056.091419][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666955056.091504][6087:6087] CHIP:DMG: } - [1666955056.091596][6087:6087] CHIP:DMG: - [1666955056.091686][6087:6087] CHIP:DMG: Data = 0, - [1666955056.091767][6087:6087] CHIP:DMG: }, - [1666955056.091856][6087:6087] CHIP:DMG: - [1666955056.091929][6087:6087] CHIP:DMG: }, - [1666955056.092008][6087:6087] CHIP:DMG: - [1666955056.092071][6087:6087] CHIP:DMG: ], - - - ./chip-tool temperaturemeasurement read attribute-list 1 1 - Verify DUT receives attribute-list attribute response on the TH(all-clusters-minimal-app) Log: - - [1666955301.631931][6087:6087] CHIP:EM: Handling via exchange: 47180r, Delegate: 0xaaaab0ad80e0 - [1666955301.632028][6087:6087] CHIP:IM: Received Read request - [1666955301.632199][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666955301.632265][6087:6087] CHIP:DMG: { - [1666955301.632320][6087:6087] CHIP:DMG: AttributePathIBs = - [1666955301.632385][6087:6087] CHIP:DMG: [ - [1666955301.632447][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.632523][6087:6087] CHIP:DMG: { - [1666955301.632601][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.632684][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.632772][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.632854][6087:6087] CHIP:DMG: } - [1666955301.632931][6087:6087] CHIP:DMG: - [1666955301.633002][6087:6087] CHIP:DMG: ], - [1666955301.633073][6087:6087] CHIP:DMG: - [1666955301.633141][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666955301.633206][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666955301.633265][6087:6087] CHIP:DMG: }, - [1666955301.633433][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666955301.633656][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666955301.633729][6087:6087] CHIP:DMG: Cluster 402, Attribute fffb is dirty - [1666955301.633785][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - [1666955301.633849][6087:6087] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0402 e=1 p=v - [1666955301.633924][6087:6087] CHIP:DMG: AccessControl: allowed - [1666955301.634106][6087:6087] CHIP:DMG: Sending report (payload has 283 bytes)... - [1666955301.634781][6087:6087] CHIP:EM: <<< [E:47180r M:264855615 (Ack:241692066)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666955301.634883][6087:6087] CHIP:IN: (S) Sending msg 264855615 on secure session with LSID: 1278 - [1666955301.635623][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:49059 | 264855615 | [Interaction Model (1) / Report Data (0x05) / Session = 25182 / Exchange = 47180] - [1666955301.635718][6087:6087] CHIP:DMG: Header Flags = - [1666955301.635776][6087:6087] CHIP:DMG: { - [1666955301.635863][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666955301.635919][6087:6087] CHIP:DMG: { - [1666955301.635979][6087:6087] CHIP:DMG: AckMsg = 241692066 - [1666955301.636034][6087:6087] CHIP:DMG: NeedsAck = true - [1666955301.636093][6087:6087] CHIP:DMG: } - [1666955301.636165][6087:6087] CHIP:DMG: } - [1666955301.636220][6087:6087] CHIP:DMG: - [1666955301.636288][6087:6087] CHIP:DMG: Encrypted Payload (317 bytes) = - [1666955301.636343][6087:6087] CHIP:DMG: { - [1666955301.636399][6087:6087] CHIP:DMG: data = 005e62003f60c90fa085c5efdb33678732930f363ecdcb1a14a818f3d0e4922d984374a5b24f4911f05027baa4ba57ad5e9cdd5c13e89854c6aa43aab11031b96294249f35b7a273fd77ec16354ed968bbb1ede503247e17267d38a1752a1439786e9644dfb5e2161ecd397e5e6017ce7bfe17cd7f7cbedf0bc058f51a9136c0cb8b20c43d69a7af9eb49164f4017674e2e6da38a7e2cf7b23f6505d88265ef05838884f1cdfc66a37116fd0bb060e276a58b5ef4f23c3d32df2fd9d407b700239852bb02415f4019bff097b0108ee91c06ef7b9c4561de3377d54afd95b5cdf9803eddca6e9ef2a546add7c9832494c20d07d1f91bb0b4588afc28256beebfb0ecd955858e918313b98e4cbaac3458fafe13ccdec893229c50f78732eaf5dfbb8e42fc9747e765937f59a36367892f493783d9184c0aba847cffed9a4 - [1666955301.636471][6087:6087] CHIP:DMG: buffer_ptr = 187650284042032 - [1666955301.636524][6087:6087] CHIP:DMG: } - [1666955301.636576][6087:6087] CHIP:DMG: - [1666955301.637014][6087:6087] CHIP:DMG: ReportDataMessage = - [1666955301.637245][6087:6087] CHIP:DMG: { - [1666955301.637303][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666955301.637382][6087:6087] CHIP:DMG: [ - [1666955301.637444][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.637532][6087:6087] CHIP:DMG: { - [1666955301.637604][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.637692][6087:6087] CHIP:DMG: { - [1666955301.637768][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.637850][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.637942][6087:6087] CHIP:DMG: { - [1666955301.638037][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.638128][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.638226][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.638318][6087:6087] CHIP:DMG: } - [1666955301.638414][6087:6087] CHIP:DMG: - [1666955301.638498][6087:6087] CHIP:DMG: Data = [ - [1666955301.638587][6087:6087] CHIP:DMG: - [1666955301.638677][6087:6087] CHIP:DMG: ], - [1666955301.638784][6087:6087] CHIP:DMG: }, - [1666955301.638873][6087:6087] CHIP:DMG: - [1666955301.638945][6087:6087] CHIP:DMG: }, - [1666955301.639042][6087:6087] CHIP:DMG: - [1666955301.639104][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.639183][6087:6087] CHIP:DMG: { - [1666955301.639248][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.639335][6087:6087] CHIP:DMG: { - [1666955301.639417][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.639658][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.639755][6087:6087] CHIP:DMG: { - [1666955301.639841][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.639933][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.640025][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.640112][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.640195][6087:6087] CHIP:DMG: } - [1666955301.640283][6087:6087] CHIP:DMG: - [1666955301.640378][6087:6087] CHIP:DMG: Data = 0, - [1666955301.640457][6087:6087] CHIP:DMG: }, - [1666955301.640543][6087:6087] CHIP:DMG: - [1666955301.640613][6087:6087] CHIP:DMG: }, - [1666955301.640708][6087:6087] CHIP:DMG: - [1666955301.640770][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.640854][6087:6087] CHIP:DMG: { - [1666955301.640925][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.641012][6087:6087] CHIP:DMG: { - [1666955301.641102][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.641190][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.641274][6087:6087] CHIP:DMG: { - [1666955301.641367][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.641466][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.641558][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.641645][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.641730][6087:6087] CHIP:DMG: } - [1666955301.641825][6087:6087] CHIP:DMG: - [1666955301.641920][6087:6087] CHIP:DMG: Data = 1, - [1666955301.642000][6087:6087] CHIP:DMG: }, - [1666955301.642094][6087:6087] CHIP:DMG: - [1666955301.642164][6087:6087] CHIP:DMG: }, - [1666955301.642261][6087:6087] CHIP:DMG: - [1666955301.642323][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.642406][6087:6087] CHIP:DMG: { - [1666955301.642476][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.642557][6087:6087] CHIP:DMG: { - [1666955301.642645][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.642752][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.642842][6087:6087] CHIP:DMG: { - [1666955301.642934][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.643024][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.643115][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.643201][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.643294][6087:6087] CHIP:DMG: } - [1666955301.643383][6087:6087] CHIP:DMG: - [1666955301.643478][6087:6087] CHIP:DMG: Data = 2, - [1666955301.643564][6087:6087] CHIP:DMG: }, - [1666955301.643657][6087:6087] CHIP:DMG: - [1666955301.643722][6087:6087] CHIP:DMG: }, - [1666955301.643817][6087:6087] CHIP:DMG: - [1666955301.643879][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.643972][6087:6087] CHIP:DMG: { - [1666955301.644043][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.644120][6087:6087] CHIP:DMG: { - [1666955301.644208][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.644289][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.644372][6087:6087] CHIP:DMG: { - [1666955301.644465][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.644558][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.644648][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.644733][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.644821][6087:6087] CHIP:DMG: } - [1666955301.644909][6087:6087] CHIP:DMG: - [1666955301.644996][6087:6087] CHIP:DMG: Data = 65528, - [1666955301.645074][6087:6087] CHIP:DMG: }, - [1666955301.645168][6087:6087] CHIP:DMG: - [1666955301.645234][6087:6087] CHIP:DMG: }, - [1666955301.645323][6087:6087] CHIP:DMG: - [1666955301.645385][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.645465][6087:6087] CHIP:DMG: { - [1666955301.645535][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.645616][6087:6087] CHIP:DMG: { - [1666955301.645704][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.645785][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.645867][6087:6087] CHIP:DMG: { - [1666955301.645960][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.646052][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.646149][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.646234][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.646318][6087:6087] CHIP:DMG: } - [1666955301.646406][6087:6087] CHIP:DMG: - [1666955301.646500][6087:6087] CHIP:DMG: Data = 65529, - [1666955301.646586][6087:6087] CHIP:DMG: }, - [1666955301.646678][6087:6087] CHIP:DMG: - [1666955301.646777][6087:6087] CHIP:DMG: }, - [1666955301.646869][6087:6087] CHIP:DMG: - [1666955301.646932][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.647016][6087:6087] CHIP:DMG: { - [1666955301.647087][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.647172][6087:6087] CHIP:DMG: { - [1666955301.647376][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.647461][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.647545][6087:6087] CHIP:DMG: { - [1666955301.647631][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.647713][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.647812][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.647907][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.647994][6087:6087] CHIP:DMG: } - [1666955301.648082][6087:6087] CHIP:DMG: - [1666955301.648168][6087:6087] CHIP:DMG: Data = 65531, - [1666955301.648254][6087:6087] CHIP:DMG: }, - [1666955301.648338][6087:6087] CHIP:DMG: - [1666955301.648408][6087:6087] CHIP:DMG: }, - [1666955301.648503][6087:6087] CHIP:DMG: - [1666955301.648564][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.648649][6087:6087] CHIP:DMG: { - [1666955301.648714][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.648800][6087:6087] CHIP:DMG: { - [1666955301.648880][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.648961][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.649050][6087:6087] CHIP:DMG: { - [1666955301.649136][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.649226][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.649314][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.649401][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.649484][6087:6087] CHIP:DMG: } - [1666955301.649579][6087:6087] CHIP:DMG: - [1666955301.649804][6087:6087] CHIP:DMG: Data = 65532, - [1666955301.649887][6087:6087] CHIP:DMG: }, - [1666955301.649973][6087:6087] CHIP:DMG: - [1666955301.650043][6087:6087] CHIP:DMG: }, - [1666955301.650137][6087:6087] CHIP:DMG: - [1666955301.650198][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.650282][6087:6087] CHIP:DMG: { - [1666955301.650353][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.650440][6087:6087] CHIP:DMG: { - [1666955301.650528][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.650609][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.650693][6087:6087] CHIP:DMG: { - [1666955301.650840][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.650934][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.651032][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.651126][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.651219][6087:6087] CHIP:DMG: } - [1666955301.651308][6087:6087] CHIP:DMG: - [1666955301.651392][6087:6087] CHIP:DMG: Data = 65533, - [1666955301.651471][6087:6087] CHIP:DMG: }, - [1666955301.651558][6087:6087] CHIP:DMG: - [1666955301.651628][6087:6087] CHIP:DMG: }, - [1666955301.651708][6087:6087] CHIP:DMG: - [1666955301.651769][6087:6087] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - .Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool temperaturemeasurement read tolerance 1 1 - - Verify DUT receives tolerence attribute response on the TH(all-clusters-minimal-app) Log: - - [1666955343.056928][6087:6087] CHIP:EM: Handling via exchange: 21936r, Delegate: 0xaaaab0ad80e0 - [1666955343.057022][6087:6087] CHIP:IM: Received Read request - [1666955343.057192][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666955343.057258][6087:6087] CHIP:DMG: { - [1666955343.057313][6087:6087] CHIP:DMG: AttributePathIBs = - [1666955343.057378][6087:6087] CHIP:DMG: [ - [1666955343.057440][6087:6087] CHIP:DMG: AttributePathIB = - [1666955343.057515][6087:6087] CHIP:DMG: { - [1666955343.057649][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955343.057746][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955343.057820][6087:6087] CHIP:DMG: Attribute = 0x0000_0003, - [1666955343.057902][6087:6087] CHIP:DMG: } - [1666955343.057980][6087:6087] CHIP:DMG: - [1666955343.058050][6087:6087] CHIP:DMG: ], - [1666955343.058122][6087:6087] CHIP:DMG: - [1666955343.058256][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666955343.058325][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666955343.058385][6087:6087] CHIP:DMG: }, - [1666955343.058552][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666955343.058812][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666955343.058888][6087:6087] CHIP:DMG: Cluster 402, Attribute 3 is dirty - [1666955343.058943][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_0003 (expanded=0) - [1666955343.059055][6087:6087] CHIP:DMG: Sending report (payload has 34 bytes)... - [1666955343.059564][6087:6087] CHIP:EM: <<< [E:21936r M:135520016 (Ack:7304816)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666955343.059664][6087:6087] CHIP:IN: (S) Sending msg 135520016 on secure session with LSID: 1279 - [1666955343.060484][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:33713 | 135520016 | [Interaction Model (1) / Report Data (0x05) / Session = 15458 / Exchange = 21936] - [1666955343.060581][6087:6087] CHIP:DMG: Header Flags = - [1666955343.060638][6087:6087] CHIP:DMG: { - [1666955343.060725][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666955343.060783][6087:6087] CHIP:DMG: { - [1666955343.060842][6087:6087] CHIP:DMG: AckMsg = 7304816 - [1666955343.060898][6087:6087] CHIP:DMG: NeedsAck = true - [1666955343.060952][6087:6087] CHIP:DMG: } - [1666955343.061024][6087:6087] CHIP:DMG: } - [1666955343.061079][6087:6087] CHIP:DMG: - [1666955343.061146][6087:6087] CHIP:DMG: Encrypted Payload (68 bytes) = - [1666955343.061201][6087:6087] CHIP:DMG: { - [1666955343.061256][6087:6087] CHIP:DMG: data = 00623c0010df1308fd3223e8f68f0d869707d560703cf1ab9c49624bdfa75abcf3c360a19db17c7f2a325e41b371932dbcbc9d41f2b617d0e98154f3d11f237da69cf343 - [1666955343.061314][6087:6087] CHIP:DMG: buffer_ptr = 187650284050608 - [1666955343.061368][6087:6087] CHIP:DMG: } - [1666955343.061420][6087:6087] CHIP:DMG: - [1666955343.061568][6087:6087] CHIP:DMG: ReportDataMessage = - [1666955343.061634][6087:6087] CHIP:DMG: { - [1666955343.061689][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666955343.061774][6087:6087] CHIP:DMG: [ - [1666955343.061837][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955343.061919][6087:6087] CHIP:DMG: { - [1666955343.061991][6087:6087] CHIP:DMG: AttributeStatusIB = - [1666955343.062082][6087:6087] CHIP:DMG: { - [1666955343.062167][6087:6087] CHIP:DMG: AttributePathIB = - [1666955343.062258][6087:6087] CHIP:DMG: { - [1666955343.062355][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955343.062437][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955343.062528][6087:6087] CHIP:DMG: Attribute = 0x0000_0003, - [1666955343.062603][6087:6087] CHIP:DMG: } - [1666955343.062697][6087:6087] CHIP:DMG: - [1666955343.062822][6087:6087] CHIP:DMG: StatusIB = - [1666955343.062911][6087:6087] CHIP:DMG: { - [1666955343.062997][6087:6087] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1666955343.063081][6087:6087] CHIP:DMG: }, - [1666955343.063167][6087:6087] CHIP:DMG: - [1666955343.063236][6087:6087] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index d43b6e8cf7cde1..0ec5d4dfe2d042 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -31,13 +31,27 @@ tests: - name: "nodeId" value: nodeId + #Issue: https://github.com/project-chip/connectedhomeip/issues/26601 - label: "Step 2: Read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 5 - constraints: - type: int16u + verification: | + ./chip-tool thermostat read cluster-revision 1 1 + + On TH(chip-tool), verify that DUT responsds ClusterRevision attribute value as 6 + + [1654082369.006076][7829:7834] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_FFFD DataVersion: 2954689426 + [1654082369.006146][7829:7834] CHIP:TOO: ClusterRevision: 5 + [1654082369.006241][7829:7834] CHIP:EM: Sending Standalone Ack for MessageCounter:4310083 on exchange 63290i + + This log and comment are as per the latest sdk but the vaue is wrong https://github.com/project-chip/connectedhomeip/issues/26601 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Step 3a: Read the global attribute: FeatureMap" PICS: @@ -116,6 +130,17 @@ tests: type: bitmap32 hasMasksSet: [0x20] + - label: + "Step 3h: Given TSTAT.S.F06(LTNE) ensure featuremap has the correct + bit set" + PICS: TSTAT.S.F06 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x40] + - label: "Step 4a: Read the global attribute: AttributeList" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" @@ -232,16 +257,318 @@ tests: type: list contains: [55, 56, 57] - - label: "Step 5a: Read the global attribute: AcceptedCommandList" + - label: "Step 4k: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0001 command: "readAttribute" - attribute: "AcceptedCommandList" + attribute: "AttributeList" response: constraints: type: list - contains: [0] + contains: [1] + + - label: "Step 4l: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0009 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [9] + + - label: "Step 4m: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0010 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16] + + - label: "Step 4n: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A001a + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [26] + + - label: "Step 4o: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A001d + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [29] + + - label: "Step 4p: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0023 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [35] + + - label: "Step 4q: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0024 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [36] + + - label: "Step 4r: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0025 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [37] + + - label: "Step 4s: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0029 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [41] + + - label: "Step 4t: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0030 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [48] + + - label: "Step 4u: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0031 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [49] + + - label: "Step 4x: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0032 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [50] + + - label: "Step 5y: Read the optional attribute: AttributeList" + PICS: TSTAT.S.A003a + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [58] + + - label: "Step 4z: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0040 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [64] + + - label: "Step 4A: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0041 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65] + + - label: "Step 4B: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0042 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [66] + + - label: "Step 4C: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0043 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [67] + + - label: "Step 5D: Read the optional attribute: AttributeList" + PICS: TSTAT.S.A0044 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [68] + + - label: "Step 4E: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0045 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [69] + + - label: "Step 4F: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0046 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [70] + + - label: "Step 5G: Read the optional attribute: AttributeList" + PICS: TSTAT.S.A0047 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [71] + + - label: + "Step 4H: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.A0003 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] + + - label: + "Step 4I: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.A0004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: + "Step 4J: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.A0008 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [8] + + - label: + "Step 4K: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [21] + + - label: + "Step 4L: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.A0016 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [22] + + - label: + "Step 4M: Read the Feature dependent(TSTAT.S.F01(COOL)) optional + attribute in AttributeList" + PICS: TSTAT.S.F01 && TSTAT.S.A0005 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + + - label: + "Step 4N: Read the Feature dependent(TSTAT.S.F01(COOL)) optional + attribute in AttributeList" + PICS: TSTAT.S.F01 && TSTAT.S.A0007 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [6] + + - label: + "Step 4O: Read the Feature dependent(TSTAT.S.F01(COOL)) optional + attribute in AttributeList" + PICS: TSTAT.S.F01 && TSTAT.S.A0007 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [7] + + - label: + "Step 4P: Read the Feature dependent(TSTAT.S.F01(COOL)) optional + attribute in AttributeList" + PICS: TSTAT.S.F01 && TSTAT.S.A0017 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [23] + + - label: + "Step 4Q: Read the Feature dependent(TSTAT.S.F01(COOL)) optional + attribute in AttributeList" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [24] - label: - "Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in + "Step 4R: Read the Feature dependent(TSTAT.S.F05(AUTO)) optional + attribute in AttributeList" + PICS: TSTAT.S.F05 && TSTAT.S.A001e + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [30] + + - label: + "Step 5a: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList" PICS: TSTAT.S.F03 command: "readAttribute" @@ -251,6 +578,15 @@ tests: type: list contains: [0, 1, 2, 3] + - label: "Step 5b: Read the optional attribute: AcceptedCommandList" + PICS: TSTAT.S.C04.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [4] + - label: "Step 6a: Read the global attribute: GeneratedCommandList" PICS: " !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp " command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml deleted file mode 100644 index 2166efc583592e..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml +++ /dev/null @@ -1,979 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 41.3.1. [TC-TSTAT-3.1] Attributes with client as DUT - -PICS: - - TSTAT.C - - TSTAT.C.AM-READ - - TSTAT.C.AO-READ - - TSTAT.C.AM-WRITE - - TSTAT.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: - "Step 1: DUT reads all supported mandatory attributes from TH one at a - time in a manufacturer specific order" - PICS: TSTAT.C.AM-READ - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - ./chip-tool thermostat read local-temperature 1 1 - - Verify the ReadRequestMessage on TH(thermostat-app) - - [1666952132.254664][5523:5523] CHIP:EM: Handling via exchange: 45183r, Delegate: 0xaaaad0bf6d38 - [1666952132.254810][5523:5523] CHIP:IM: Received Read request - [1666952132.254984][5523:5523] CHIP:DMG: ReadRequestMessage = - [1666952132.255049][5523:5523] CHIP:DMG: { - [1666952132.255104][5523:5523] CHIP:DMG: AttributePathIBs = - [1666952132.255170][5523:5523] CHIP:DMG: [ - [1666952132.255231][5523:5523] CHIP:DMG: AttributePathIB = - [1666952132.255311][5523:5523] CHIP:DMG: { - [1666952132.255383][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952132.255465][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952132.255552][5523:5523] CHIP:DMG: Attribute = 0x0000_0000, - [1666952132.255634][5523:5523] CHIP:DMG: } - [1666952132.255711][5523:5523] CHIP:DMG: - [1666952132.255939][5523:5523] CHIP:DMG: ], - [1666952132.256019][5523:5523] CHIP:DMG: - [1666952132.256086][5523:5523] CHIP:DMG: isFabricFiltered = true, - [1666952132.256150][5523:5523] CHIP:DMG: InteractionModelRevision = 1 - [1666952132.256209][5523:5523] CHIP:DMG: }, - [1666952132.256374][5523:5523] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952132.256579][5523:5523] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952132.256650][5523:5523] CHIP:DMG: Cluster 201, Attribute 0 is dirty - [1666952132.256704][5523:5523] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666952132.256770][5523:5523] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666952132.256846][5523:5523] CHIP:DMG: AccessControl: allowed - [1666952132.256956][5523:5523] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952132.257462][5523:5523] CHIP:EM: <<< [E:45183r M:211664667 (Ack:20415204)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952132.257559][5523:5523] CHIP:IN: (S) Sending msg 211664667 on secure session with LSID: 58857 - [1666952132.258207][5523:5523] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:57054 | 211664667 | [Interaction Model (1) / Report Data (0x05) / Session = 30657 / Exchange = 45183] - [1666952132.258305][5523:5523] CHIP:DMG: Header Flags = - [1666952132.258362][5523:5523] CHIP:DMG: { - [1666952132.258450][5523:5523] CHIP:DMG: Exchange (0x06) = - [1666952132.258506][5523:5523] CHIP:DMG: { - [1666952132.258566][5523:5523] CHIP:DMG: AckMsg = 20415204 - [1666952132.258620][5523:5523] CHIP:DMG: NeedsAck = true - [1666952132.258674][5523:5523] CHIP:DMG: } - [1666952132.258795][5523:5523] CHIP:DMG: } - [1666952132.258854][5523:5523] CHIP:DMG: - [1666952132.258922][5523:5523] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952132.258978][5523:5523] CHIP:DMG: { - [1666952132.259034][5523:5523] CHIP:DMG: data = 00c177001bbf9d0c8d034854664a7ad1e4d8a6e4d761fe52deb0e743e0c31922d77d53fe79bdb2ad8046791f6a61818db2b483479c011ab934bf0781e9f97d136c8b15e3fbc00f - [1666952132.259092][5523:5523] CHIP:DMG: buffer_ptr = 187651103265312 - [1666952132.259145][5523:5523] CHIP:DMG: } - [1666952132.259197][5523:5523] CHIP:DMG: - [1666952132.259352][5523:5523] CHIP:DMG: ReportDataMessage = - [1666952132.259419][5523:5523] CHIP:DMG: { - [1666952132.259472][5523:5523] CHIP:DMG: AttributeReportIBs = - [1666952132.259557][5523:5523] CHIP:DMG: [ - [1666952132.259619][5523:5523] CHIP:DMG: AttributeReportIB = - [1666952132.259699][5523:5523] CHIP:DMG: { - [1666952132.259769][5523:5523] CHIP:DMG: AttributeDataIB = - [1666952132.259856][5523:5523] CHIP:DMG: { - [1666952132.259941][5523:5523] CHIP:DMG: DataVersion = 0x20b42cf7, - [1666952132.260026][5523:5523] CHIP:DMG: AttributePathIB = - [1666952132.260109][5523:5523] CHIP:DMG: { - [1666952132.260197][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952132.260294][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952132.260389][5523:5523] CHIP:DMG: Attribute = 0x0000_0000, - [1666952132.260465][5523:5523] CHIP:DMG: } - [1666952132.260537][5523:5523] CHIP:DMG: - [1666952132.260608][5523:5523] CHIP:DMG: Data = 0, - [1666952132.260671][5523:5523] CHIP:DMG: }, - [1666952132.260741][5523:5523] CHIP:DMG: - [1666952132.260805][5523:5523] CHIP:DMG: }, - [1666952132.260886][5523:5523] CHIP:DMG: - [1666952132.260947][5523:5523] CHIP:DMG: ], - - - - ./chip-tool thermostat read control-sequence-of-operation 1 1 - - - Verify the ReadRequestMessage on TH(thermostat-app) - - [1666952211.603156][5523:5523] CHIP:EM: Handling via exchange: 32228r, Delegate: 0xaaaad0bf6d38 - [1666952211.603251][5523:5523] CHIP:IM: Received Read request - [1666952211.603444][5523:5523] CHIP:DMG: ReadRequestMessage = - [1666952211.603512][5523:5523] CHIP:DMG: { - [1666952211.603592][5523:5523] CHIP:DMG: AttributePathIBs = - [1666952211.603658][5523:5523] CHIP:DMG: [ - [1666952211.603740][5523:5523] CHIP:DMG: AttributePathIB = - [1666952211.603818][5523:5523] CHIP:DMG: { - [1666952211.603917][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952211.604002][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952211.604112][5523:5523] CHIP:DMG: Attribute = 0x0000_001B, - [1666952211.604197][5523:5523] CHIP:DMG: } - [1666952211.604297][5523:5523] CHIP:DMG: - [1666952211.604372][5523:5523] CHIP:DMG: ], - [1666952211.604464][5523:5523] CHIP:DMG: - [1666952211.604533][5523:5523] CHIP:DMG: isFabricFiltered = true, - [1666952211.604598][5523:5523] CHIP:DMG: InteractionModelRevision = 1 - [1666952211.604657][5523:5523] CHIP:DMG: }, - [1666952211.604851][5523:5523] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952211.605110][5523:5523] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952211.605181][5523:5523] CHIP:DMG: Cluster 201, Attribute 1b is dirty - [1666952211.605259][5523:5523] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_001B (expanded=0) - [1666952211.605329][5523:5523] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666952211.605404][5523:5523] CHIP:DMG: AccessControl: allowed - [1666952211.605514][5523:5523] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952211.606307][5523:5523] CHIP:EM: <<< [E:32228r M:122580976 (Ack:109657417)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952211.606407][5523:5523] CHIP:IN: (S) Sending msg 122580976 on secure session with LSID: 58858 - [1666952211.607192][5523:5523] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:59185 | 122580976 | [Interaction Model (1) / Report Data (0x05) / Session = 34789 / Exchange = 32228] - [1666952211.607290][5523:5523] CHIP:DMG: Header Flags = - [1666952211.607348][5523:5523] CHIP:DMG: { - [1666952211.607436][5523:5523] CHIP:DMG: Exchange (0x06) = - [1666952211.607491][5523:5523] CHIP:DMG: { - [1666952211.607551][5523:5523] CHIP:DMG: AckMsg = 109657417 - [1666952211.607637][5523:5523] CHIP:DMG: NeedsAck = true - [1666952211.607692][5523:5523] CHIP:DMG: } - [1666952211.607764][5523:5523] CHIP:DMG: } - [1666952211.607844][5523:5523] CHIP:DMG: - [1666952211.607912][5523:5523] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952211.608153][5523:5523] CHIP:DMG: { - [1666952211.608217][5523:5523] CHIP:DMG: data = 00e58700f06f4e07aad692eabd077933fb8541496ae905808d17a81c3427464da89dc5f0d6bb92eedfca8a57e327fbb528f459b2636428a845bbc22a64e87328cb458a5dd459e1 - [1666952211.608274][5523:5523] CHIP:DMG: buffer_ptr = 187651103269664 - [1666952211.608327][5523:5523] CHIP:DMG: } - [1666952211.608378][5523:5523] CHIP:DMG: - [1666952211.608544][5523:5523] CHIP:DMG: ReportDataMessage = - [1666952211.608609][5523:5523] CHIP:DMG: { - [1666952211.608664][5523:5523] CHIP:DMG: AttributeReportIBs = - [1666952211.608748][5523:5523] CHIP:DMG: [ - [1666952211.608811][5523:5523] CHIP:DMG: AttributeReportIB = - [1666952211.608896][5523:5523] CHIP:DMG: { - [1666952211.608966][5523:5523] CHIP:DMG: AttributeDataIB = - [1666952211.609052][5523:5523] CHIP:DMG: { - [1666952211.609142][5523:5523] CHIP:DMG: DataVersion = 0x20b42cf7, - [1666952211.609224][5523:5523] CHIP:DMG: AttributePathIB = - [1666952211.609315][5523:5523] CHIP:DMG: { - [1666952211.609402][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952211.609500][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952211.609589][5523:5523] CHIP:DMG: Attribute = 0x0000_001B, - [1666952211.609672][5523:5523] CHIP:DMG: } - [1666952211.609760][5523:5523] CHIP:DMG: - [1666952211.609848][5523:5523] CHIP:DMG: Data = 4, - [1666952211.609934][5523:5523] CHIP:DMG: }, - [1666952211.610017][5523:5523] CHIP:DMG: - [1666952211.610087][5523:5523] CHIP:DMG: }, - [1666952211.610167][5523:5523] CHIP:DMG: - [1666952211.610227][5523:5523] CHIP:DMG: ], - - - ./chip-tool thermostat read system-mode 1 1 - - Verify the ReadRequestMessage on TH(thermostat-app) - [1666952247.579164][5523:5523] CHIP:EM: Handling via exchange: 50210r, Delegate: 0xaaaad0bf6d38 - [1666952247.579281][5523:5523] CHIP:IM: Received Read request - [1666952247.579476][5523:5523] CHIP:DMG: ReadRequestMessage = - [1666952247.579543][5523:5523] CHIP:DMG: { - [1666952247.579625][5523:5523] CHIP:DMG: AttributePathIBs = - [1666952247.579691][5523:5523] CHIP:DMG: [ - [1666952247.579753][5523:5523] CHIP:DMG: AttributePathIB = - [1666952247.579830][5523:5523] CHIP:DMG: { - [1666952247.579928][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952247.580019][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952247.580119][5523:5523] CHIP:DMG: Attribute = 0x0000_001C, - [1666952247.580201][5523:5523] CHIP:DMG: } - [1666952247.580299][5523:5523] CHIP:DMG: - [1666952247.580370][5523:5523] CHIP:DMG: ], - [1666952247.580440][5523:5523] CHIP:DMG: - [1666952247.580529][5523:5523] CHIP:DMG: isFabricFiltered = true, - [1666952247.580594][5523:5523] CHIP:DMG: InteractionModelRevision = 1 - [1666952247.580673][5523:5523] CHIP:DMG: }, - [1666952247.580869][5523:5523] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952247.581075][5523:5523] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952247.581171][5523:5523] CHIP:DMG: Cluster 201, Attribute 1c is dirty - [1666952247.581228][5523:5523] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_001C (expanded=0) - [1666952247.581294][5523:5523] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666952247.581397][5523:5523] CHIP:DMG: AccessControl: allowed - [1666952247.581509][5523:5523] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952247.582161][5523:5523] CHIP:EM: <<< [E:50210r M:165064456 (Ack:89022834)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952247.582273][5523:5523] CHIP:IN: (S) Sending msg 165064456 on secure session with LSID: 58859 - [1666952247.583141][5523:5523] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:56721 | 165064456 | [Interaction Model (1) / Report Data (0x05) / Session = 58238 / Exchange = 50210] - [1666952247.583242][5523:5523] CHIP:DMG: Header Flags = - [1666952247.583300][5523:5523] CHIP:DMG: { - [1666952247.583392][5523:5523] CHIP:DMG: Exchange (0x06) = - [1666952247.583448][5523:5523] CHIP:DMG: { - [1666952247.583508][5523:5523] CHIP:DMG: AckMsg = 89022834 - [1666952247.583592][5523:5523] CHIP:DMG: NeedsAck = true - [1666952247.583647][5523:5523] CHIP:DMG: } - [1666952247.583720][5523:5523] CHIP:DMG: } - [1666952247.583798][5523:5523] CHIP:DMG: - [1666952247.583867][5523:5523] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952247.583923][5523:5523] CHIP:DMG: { - [1666952247.584002][5523:5523] CHIP:DMG: data = 007ee30008afd6097d214467e50b2d76866fd8607b4ce9b1edf46c7178b36f801076b9660a84298c1205a215dd5fb346203daaadd1d55a849de8778e02811b15cba9abdf49bdc8 - [1666952247.584060][5523:5523] CHIP:DMG: buffer_ptr = 187651103269840 - [1666952247.584114][5523:5523] CHIP:DMG: } - [1666952247.584190][5523:5523] CHIP:DMG: - [1666952247.584385][5523:5523] CHIP:DMG: ReportDataMessage = - [1666952247.584453][5523:5523] CHIP:DMG: { - [1666952247.584529][5523:5523] CHIP:DMG: AttributeReportIBs = - [1666952247.584610][5523:5523] CHIP:DMG: [ - [1666952247.584673][5523:5523] CHIP:DMG: AttributeReportIB = - [1666952247.584758][5523:5523] CHIP:DMG: { - [1666952247.584848][5523:5523] CHIP:DMG: AttributeDataIB = - [1666952247.584930][5523:5523] CHIP:DMG: { - [1666952247.585036][5523:5523] CHIP:DMG: DataVersion = 0x20b42cf7, - [1666952247.585118][5523:5523] CHIP:DMG: AttributePathIB = - [1666952247.585237][5523:5523] CHIP:DMG: { - [1666952247.585335][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952247.585448][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952247.585537][5523:5523] CHIP:DMG: Attribute = 0x0000_001C, - [1666952247.585654][5523:5523] CHIP:DMG: } - [1666952247.585765][5523:5523] CHIP:DMG: - [1666952247.585856][5523:5523] CHIP:DMG: Data = 1, - [1666952247.585957][5523:5523] CHIP:DMG: }, - [1666952247.586053][5523:5523] CHIP:DMG: - [1666952247.586145][5523:5523] CHIP:DMG: }, - [1666952247.586229][5523:5523] CHIP:DMG: - [1666952247.586291][5523:5523] CHIP:DMG: ], - disabled: true - - - label: - "Step 2: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: TSTAT.C.AO-READ - verification: | - Most of optional attribute is not implemented in SDK - - - https://github.com/project-chip/connectedhomeip/issues/15626 - disabled: true - - - label: - "Step 3: DUT writes a suitable value to all supported mandatory - attributes on the TH one at a time in a manufacturer specific order" - PICS: TSTAT.C.AM-WRITE - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - ./chip-tool thermostat write system-mode 2 1 1 - - Verify the WriteRequestMessage on TH(thermostat-app) - - [1666952315.223166][5547:5547] CHIP:EM: Handling via exchange: 40014r, Delegate: 0xaaaabacd6d38 - [1666952315.223290][5547:5547] CHIP:IM: Received Write request - [1666952315.223349][5547:5547] CHIP:DMG: IM WH moving to [Initialized] - [1666952315.223501][5547:5547] CHIP:DMG: WriteRequestMessage = - [1666952315.223587][5547:5547] CHIP:DMG: { - [1666952315.223647][5547:5547] CHIP:DMG: suppressResponse = false, - [1666952315.223715][5547:5547] CHIP:DMG: timedRequest = false, - [1666952315.223799][5547:5547] CHIP:DMG: AttributeDataIBs = - [1666952315.223876][5547:5547] CHIP:DMG: [ - [1666952315.223938][5547:5547] CHIP:DMG: AttributeDataIB = - [1666952315.224046][5547:5547] CHIP:DMG: { - [1666952315.224118][5547:5547] CHIP:DMG: AttributePathIB = - [1666952315.224237][5547:5547] CHIP:DMG: { - [1666952315.224344][5547:5547] CHIP:DMG: Endpoint = 0x1, - [1666952315.224434][5547:5547] CHIP:DMG: Cluster = 0x201, - [1666952315.224548][5547:5547] CHIP:DMG: Attribute = 0x0000_001C, - [1666952315.224630][5547:5547] CHIP:DMG: } - [1666952315.224735][5547:5547] CHIP:DMG: - [1666952315.224822][5547:5547] CHIP:DMG: Data = 2, - [1666952315.224916][5547:5547] CHIP:DMG: }, - [1666952315.224999][5547:5547] CHIP:DMG: - [1666952315.225061][5547:5547] CHIP:DMG: ], - [1666952315.225156][5547:5547] CHIP:DMG: - [1666952315.225407][5547:5547] CHIP:DMG: moreChunkedMessages = false, - [1666952315.225499][5547:5547] CHIP:DMG: InteractionModelRevision = 1 - [1666952315.225558][5547:5547] CHIP:DMG: }, - [1666952315.225770][5547:5547] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=m - [1666952315.225877][5547:5547] CHIP:DMG: AccessControl: allowed - [1666952315.225993][5547:5547] CHIP:DMG: Endpoint 1, Cluster 0x0000_0201 update version to 26951d9b - [1666952315.226108][5547:5547] CHIP:DMG: IM WH moving to [AddStatus] - [1666952315.226827][5547:5547] CHIP:EM: <<< [E:40014r M:9653961 (Ack:42468606)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:07 (IM:WriteResponse) - [1666952315.226938][5547:5547] CHIP:IN: (S) Sending msg 9653961 on secure session with LSID: 64565 - [1666952315.227822][5547:5547] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:33368 | 9653961 | [Interaction Model (1) / Write Response (0x07) / Session = 53259 / Exchange = 40014] - [1666952315.227925][5547:5547] CHIP:DMG: Header Flags = - [1666952315.227983][5547:5547] CHIP:DMG: { - [1666952315.228073][5547:5547] CHIP:DMG: Exchange (0x06) = - [1666952315.228130][5547:5547] CHIP:DMG: { - [1666952315.228190][5547:5547] CHIP:DMG: AckMsg = 42468606 - [1666952315.228270][5547:5547] CHIP:DMG: NeedsAck = true - [1666952315.228327][5547:5547] CHIP:DMG: } - [1666952315.228402][5547:5547] CHIP:DMG: } - [1666952315.228485][5547:5547] CHIP:DMG: - [1666952315.228556][5547:5547] CHIP:DMG: Encrypted Payload (63 bytes) = - [1666952315.228614][5547:5547] CHIP:DMG: { - [1666952315.228693][5547:5547] CHIP:DMG: data = 000bd000c94e9300ba13b443ba129f21dda5c76aca803ace28abeb29f3026e08be154db2f5f310a70ad76121537736e6e5554a952c9b1180fec8c1c3660be6 - [1666952315.228751][5547:5547] CHIP:DMG: buffer_ptr = 187650847962096 - [1666952315.228805][5547:5547] CHIP:DMG: } - [1666952315.228878][5547:5547] CHIP:DMG: - [1666952315.229004][5547:5547] CHIP:DMG: WriteResponseMessage = - [1666952315.229073][5547:5547] CHIP:DMG: { - [1666952315.229127][5547:5547] CHIP:DMG: AttributeStatusIBs = - [1666952315.229206][5547:5547] CHIP:DMG: [ - [1666952315.229267][5547:5547] CHIP:DMG: AttributeStatusIB = - [1666952315.229349][5547:5547] CHIP:DMG: { - [1666952315.229424][5547:5547] CHIP:DMG: AttributePathIB = - [1666952315.229506][5547:5547] CHIP:DMG: { - [1666952315.229591][5547:5547] CHIP:DMG: Endpoint = 0x1, - [1666952315.229677][5547:5547] CHIP:DMG: Cluster = 0x201, - [1666952315.229764][5547:5547] CHIP:DMG: Attribute = 0x0000_001C, - [1666952315.229844][5547:5547] CHIP:DMG: } - [1666952315.229937][5547:5547] CHIP:DMG: - [1666952315.230015][5547:5547] CHIP:DMG: StatusIB = - [1666952315.230098][5547:5547] CHIP:DMG: { - [1666952315.230179][5547:5547] CHIP:DMG: status = 0x00 (SUCCESS), - [1666952315.230260][5547:5547] CHIP:DMG: }, - [1666952315.230340][5547:5547] CHIP:DMG: - [1666952315.230412][5547:5547] CHIP:DMG: }, - - - - - ./chip-tool thermostat write control-sequence-of-operation 1 1 1 - Verify the WriteRequestMessage on TH(thermostat-app) - - [1666952355.926940][5547:5547] CHIP:EM: Handling via exchange: 19955r, Delegate: 0xaaaabacd6d38 - [1666952355.927042][5547:5547] CHIP:IM: Received Write request - [1666952355.927101][5547:5547] CHIP:DMG: IM WH moving to [Initialized] - [1666952355.927258][5547:5547] CHIP:DMG: WriteRequestMessage = - [1666952355.927347][5547:5547] CHIP:DMG: { - [1666952355.927407][5547:5547] CHIP:DMG: suppressResponse = false, - [1666952355.927476][5547:5547] CHIP:DMG: timedRequest = false, - [1666952355.927563][5547:5547] CHIP:DMG: AttributeDataIBs = - [1666952355.927643][5547:5547] CHIP:DMG: [ - [1666952355.927706][5547:5547] CHIP:DMG: AttributeDataIB = - [1666952355.927789][5547:5547] CHIP:DMG: { - [1666952355.927859][5547:5547] CHIP:DMG: AttributePathIB = - [1666952355.927982][5547:5547] CHIP:DMG: { - [1666952355.928078][5547:5547] CHIP:DMG: Endpoint = 0x1, - [1666952355.928193][5547:5547] CHIP:DMG: Cluster = 0x201, - [1666952355.928292][5547:5547] CHIP:DMG: Attribute = 0x0000_001B, - [1666952355.928406][5547:5547] CHIP:DMG: } - [1666952355.928493][5547:5547] CHIP:DMG: - [1666952355.928610][5547:5547] CHIP:DMG: Data = 1, - [1666952355.928698][5547:5547] CHIP:DMG: }, - [1666952355.928802][5547:5547] CHIP:DMG: - [1666952355.928866][5547:5547] CHIP:DMG: ], - [1666952355.928940][5547:5547] CHIP:DMG: - [1666952355.929027][5547:5547] CHIP:DMG: moreChunkedMessages = false, - [1666952355.929092][5547:5547] CHIP:DMG: InteractionModelRevision = 1 - [1666952355.929179][5547:5547] CHIP:DMG: }, - [1666952355.929392][5547:5547] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=m - [1666952355.929479][5547:5547] CHIP:DMG: AccessControl: allowed - [1666952355.929592][5547:5547] CHIP:DMG: Endpoint 1, Cluster 0x0000_0201 update version to 26951d9c - [1666952355.929708][5547:5547] CHIP:DMG: IM WH moving to [AddStatus] - [1666952355.930385][5547:5547] CHIP:EM: <<< [E:19955r M:206996235 (Ack:164787467)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:07 (IM:WriteResponse) - [1666952355.930495][5547:5547] CHIP:IN: (S) Sending msg 206996235 on secure session with LSID: 64566 - [1666952355.931306][5547:5547] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:50950 | 206996235 | [Interaction Model (1) / Write Response (0x07) / Session = 54514 / Exchange = 19955] - [1666952355.931417][5547:5547] CHIP:DMG: Header Flags = - [1666952355.931476][5547:5547] CHIP:DMG: { - [1666952355.931566][5547:5547] CHIP:DMG: Exchange (0x06) = - [1666952355.931625][5547:5547] CHIP:DMG: { - [1666952355.931686][5547:5547] CHIP:DMG: AckMsg = 164787467 - [1666952355.931742][5547:5547] CHIP:DMG: NeedsAck = true - [1666952355.931797][5547:5547] CHIP:DMG: } - [1666952355.931897][5547:5547] CHIP:DMG: } - [1666952355.931954][5547:5547] CHIP:DMG: - [1666952355.932046][5547:5547] CHIP:DMG: Encrypted Payload (63 bytes) = - [1666952355.932104][5547:5547] CHIP:DMG: { - [1666952355.932160][5547:5547] CHIP:DMG: data = 00f2d4000b83560c39c00c331a1baabb444bf9962b11291cbd1d92449cb00ebf401dd998b1d4f268a51ad2591f11215b2592b676fe2d53587ad6c5c6b6722a - [1666952355.932217][5547:5547] CHIP:DMG: buffer_ptr = 187650847961312 - [1666952355.932272][5547:5547] CHIP:DMG: } - [1666952355.932351][5547:5547] CHIP:DMG: - [1666952355.932482][5547:5547] CHIP:DMG: WriteResponseMessage = - [1666952355.932573][5547:5547] CHIP:DMG: { - [1666952355.932628][5547:5547] CHIP:DMG: AttributeStatusIBs = - [1666952355.932729][5547:5547] CHIP:DMG: [ - [1666952355.932795][5547:5547] CHIP:DMG: AttributeStatusIB = - [1666952355.932877][5547:5547] CHIP:DMG: { - [1666952355.932972][5547:5547] CHIP:DMG: AttributePathIB = - [1666952355.933067][5547:5547] CHIP:DMG: { - [1666952355.933182][5547:5547] CHIP:DMG: Endpoint = 0x1, - [1666952355.933281][5547:5547] CHIP:DMG: Cluster = 0x201, - [1666952355.933404][5547:5547] CHIP:DMG: Attribute = 0x0000_001B, - [1666952355.933494][5547:5547] CHIP:DMG: } - [1666952355.933617][5547:5547] CHIP:DMG: - [1666952355.933707][5547:5547] CHIP:DMG: StatusIB = - [1666952355.933815][5547:5547] CHIP:DMG: { - [1666952355.933909][5547:5547] CHIP:DMG: status = 0x00 (SUCCESS), - [1666952355.934025][5547:5547] CHIP:DMG: }, - [1666952355.934117][5547:5547] CHIP:DMG: - [1666952355.934189][5547:5547] CHIP:DMG: }, - [1666952355.934304][5547:5547] CHIP:DMG: - [1666952355.934366][5547:5547] CHIP:DMG: ], - disabled: true - - - label: - "Step 4: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: TSTAT.C.AO-WRITE - verification: | - Verify by sending the optional attribute which is mentioned in spec - - Most of optional attribute is not implemented in SDK - disabled: true - - - label: - "Step 5: Configure TH such that it implements mandatory and none of - the optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - To verify all below steps use all-clusters-minimal-app - - ./chip-tool thermostat read feature-map 1 1 - verify on TH(all-cluster-minimal-app) receives the Read Request Message - - [1666952645.116645][5988:5988] CHIP:EM: Handling via exchange: 48700r, Delegate: 0xaaaad96680e0 - [1666952645.116825][5988:5988] CHIP:IM: Received Read request - [1666952645.117083][5988:5988] CHIP:DMG: ReadRequestMessage = - [1666952645.117235][5988:5988] CHIP:DMG: { - [1666952645.117363][5988:5988] CHIP:DMG: AttributePathIBs = - [1666952645.117611][5988:5988] CHIP:DMG: [ - [1666952645.117805][5988:5988] CHIP:DMG: AttributePathIB = - [1666952645.118031][5988:5988] CHIP:DMG: { - [1666952645.118263][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952645.118526][5988:5988] CHIP:DMG: Cluster = 0x201, - [1666952645.118930][5988:5988] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666952645.119197][5988:5988] CHIP:DMG: } - [1666952645.119429][5988:5988] CHIP:DMG: - [1666952645.119654][5988:5988] CHIP:DMG: ], - [1666952645.119856][5988:5988] CHIP:DMG: - [1666952645.120055][5988:5988] CHIP:DMG: isFabricFiltered = true, - [1666952645.120246][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666952645.120432][5988:5988] CHIP:DMG: }, - [1666952645.120684][5988:5988] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952645.121016][5988:5988] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952645.121177][5988:5988] CHIP:DMG: Cluster 201, Attribute fffc is dirty - [1666952645.121309][5988:5988] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1666952645.121454][5988:5988] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666952645.121605][5988:5988] CHIP:DMG: AccessControl: allowed - [1666952645.121808][5988:5988] CHIP:DMG: Sending report (payload has 38 bytes)... - [1666952645.122505][5988:5988] CHIP:EM: <<< [E:48700r M:122322767 (Ack:59445400)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952645.122637][5988:5988] CHIP:IN: (S) Sending msg 122322767 on secure session with LSID: 10696 - [1666952645.123579][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:59359 | 122322767 | [Interaction Model (1) / Report Data (0x05) / Session = 64481 / Exchange = 48700] - [1666952645.123699][5988:5988] CHIP:DMG: Header Flags = - [1666952645.123761][5988:5988] CHIP:DMG: { - [1666952645.123855][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666952645.123914][5988:5988] CHIP:DMG: { - [1666952645.123976][5988:5988] CHIP:DMG: AckMsg = 59445400 - [1666952645.124033][5988:5988] CHIP:DMG: NeedsAck = true - [1666952645.124088][5988:5988] CHIP:DMG: } - [1666952645.124163][5988:5988] CHIP:DMG: } - [1666952645.124211][5988:5988] CHIP:DMG: - [1666952645.124282][5988:5988] CHIP:DMG: Encrypted Payload (72 bytes) = - [1666952645.124340][5988:5988] CHIP:DMG: { - [1666952645.124398][5988:5988] CHIP:DMG: data = 00e1fb004f7f4a074bda6ee4183c1a50a28662f1c9f84586706ba9e4e4898ff69072838a343d12fad2c257b8a73bcc5eef3a63ce34c7450b8c51c12db004a68eafd1afa8c88ff6ca - [1666952645.124459][5988:5988] CHIP:DMG: buffer_ptr = 187650777052944 - [1666952645.124514][5988:5988] CHIP:DMG: } - [1666952645.124568][5988:5988] CHIP:DMG: - [1666952645.124742][5988:5988] CHIP:DMG: ReportDataMessage = - [1666952645.124814][5988:5988] CHIP:DMG: { - [1666952645.124872][5988:5988] CHIP:DMG: AttributeReportIBs = - [1666952645.124951][5988:5988] CHIP:DMG: [ - [1666952645.125016][5988:5988] CHIP:DMG: AttributeReportIB = - [1666952645.125107][5988:5988] CHIP:DMG: { - [1666952645.125181][5988:5988] CHIP:DMG: AttributeDataIB = - [1666952645.125272][5988:5988] CHIP:DMG: { - [1666952645.125367][5988:5988] CHIP:DMG: DataVersion = 0xdc2e5914, - [1666952645.125460][5988:5988] CHIP:DMG: AttributePathIB = - [1666952645.125554][5988:5988] CHIP:DMG: { - [1666952645.125652][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952645.125753][5988:5988] CHIP:DMG: Cluster = 0x201, - [1666952645.125836][5988:5988] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666952645.125935][5988:5988] CHIP:DMG: } - [1666952645.126035][5988:5988] CHIP:DMG: - [1666952645.126134][5988:5988] CHIP:DMG: Data = 1, - [1666952645.126223][5988:5988] CHIP:DMG: }, - [1666952645.126310][5988:5988] CHIP:DMG: - [1666952645.126383][5988:5988] CHIP:DMG: }, - [1666952645.126467][5988:5988] CHIP:DMG: - - - ./chip-tool thermostat read attribute-list 1 1 - verify on TH(all-cluster-minimal-app) receives the Read Request Message - - [1666951258.078426][5466:5466] CHIP:EM: Handling via exchange: 13120r, Delegate: 0xaaaab26280e0 - [1666951258.078521][5466:5466] CHIP:IM: Received Read request - [1666951258.078689][5466:5466] CHIP:DMG: ReadRequestMessage = - [1666951258.078833][5466:5466] CHIP:DMG: { - [1666951258.078894][5466:5466] CHIP:DMG: AttributePathIBs = - [1666951258.078961][5466:5466] CHIP:DMG: [ - [1666951258.079023][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.079105][5466:5466] CHIP:DMG: { - [1666951258.079178][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.079268][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.079356][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.079438][5466:5466] CHIP:DMG: } - [1666951258.079517][5466:5466] CHIP:DMG: - [1666951258.079587][5466:5466] CHIP:DMG: ], - [1666951258.079658][5466:5466] CHIP:DMG: - [1666951258.079725][5466:5466] CHIP:DMG: isFabricFiltered = true, - [1666951258.079791][5466:5466] CHIP:DMG: InteractionModelRevision = 1 - [1666951258.079850][5466:5466] CHIP:DMG: }, - [1666951258.080022][5466:5466] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666951258.080237][5466:5466] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666951258.080310][5466:5466] CHIP:DMG: Cluster 201, Attribute fffb is dirty - [1666951258.080366][5466:5466] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - [1666951258.080430][5466:5466] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666951258.080506][5466:5466] CHIP:DMG: AccessControl: allowed - [1666951258.080690][5466:5466] CHIP:DMG: Sending report (payload has 313 bytes)... - [1666951258.081302][5466:5466] CHIP:EM: <<< [E:13120r M:26460859 (Ack:143052534)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666951258.081405][5466:5466] CHIP:IN: (S) Sending msg 26460859 on secure session with LSID: 45983 - [1666951258.082333][5466:5466] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:59536 | 26460859 | [Interaction Model (1) / Report Data (0x05) / Session = 40269 / Exchange = 13120] - [1666951258.082432][5466:5466] CHIP:DMG: Header Flags = - [1666951258.082490][5466:5466] CHIP:DMG: { - [1666951258.082577][5466:5466] CHIP:DMG: Exchange (0x06) = - [1666951258.082634][5466:5466] CHIP:DMG: { - [1666951258.082695][5466:5466] CHIP:DMG: AckMsg = 143052534 - [1666951258.082792][5466:5466] CHIP:DMG: NeedsAck = true - [1666951258.082848][5466:5466] CHIP:DMG: } - [1666951258.082920][5466:5466] CHIP:DMG: } - [1666951258.082976][5466:5466] CHIP:DMG: - [1666951258.083045][5466:5466] CHIP:DMG: Encrypted Payload (347 bytes) = - [1666951258.083100][5466:5466] CHIP:DMG: { - [1666951258.083155][5466:5466] CHIP:DMG: data = 004d9d00bbc29301194a6d83521606e6f1531417acbf717a18722f6d5200bc788506e7b07690cd42f23c3731f427415d294482395bd940ded7d98438041ae9fe5042d90a883bab2a9ca2a4b96ca2c3aa64508a6a50d819db68f58e17b5e011bad06e9302c05ba7682596074c05029edf4f5b1433230c16b709f683e2d88333867528db1bd800de3c563f83dc7afccf2b965d4864d8370028cadb90e438275fb34268d9493a76cdcfec3c2eeec55b3a986dcea555fbfeb44aba1393925b5e07181d612f24be3170a87a46f86398dc2a9cbeac3b338cea029e0eb23490aec479668569ba2d3ca12a8eecbd05ab26dedc4dcda11aba7a4ba9d8d36b2690a01b190f0627f4ba8f59ca2301c7ec7b8e3d5ac43fb73eeec6ccb1bf00c4d25a1fcd9838c2294da6ff9995b3bc059b873169d3fc6572eeda760f7f3c4cd72f813169afc7d1c3b2586833eff3c9f1f684606ebfa7e02a950b6d5d84ce8c9dcb - [1666951258.083229][5466:5466] CHIP:DMG: buffer_ptr = 187651008656048 - [1666951258.083282][5466:5466] CHIP:DMG: } - [1666951258.083334][5466:5466] CHIP:DMG: - [1666951258.083929][5466:5466] CHIP:DMG: ReportDataMessage = - [1666951258.084001][5466:5466] CHIP:DMG: { - [1666951258.084057][5466:5466] CHIP:DMG: AttributeReportIBs = - [1666951258.084145][5466:5466] CHIP:DMG: [ - [1666951258.084209][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.084295][5466:5466] CHIP:DMG: { - [1666951258.084367][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.084452][5466:5466] CHIP:DMG: { - [1666951258.084534][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.084624][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.084717][5466:5466] CHIP:DMG: { - [1666951258.084801][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.084894][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.085060][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.085153][5466:5466] CHIP:DMG: } - [1666951258.085242][5466:5466] CHIP:DMG: - [1666951258.085318][5466:5466] CHIP:DMG: Data = [ - [1666951258.085401][5466:5466] CHIP:DMG: - [1666951258.085497][5466:5466] CHIP:DMG: ], - [1666951258.085577][5466:5466] CHIP:DMG: }, - [1666951258.085664][5466:5466] CHIP:DMG: - [1666951258.085734][5466:5466] CHIP:DMG: }, - [1666951258.085831][5466:5466] CHIP:DMG: - [1666951258.085893][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.085977][5466:5466] CHIP:DMG: { - [1666951258.086049][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.086127][5466:5466] CHIP:DMG: { - [1666951258.086218][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.086306][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.086397][5466:5466] CHIP:DMG: { - [1666951258.086483][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.086582][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.086679][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.086889][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.086978][5466:5466] CHIP:DMG: } - [1666951258.087075][5466:5466] CHIP:DMG: - [1666951258.087171][5466:5466] CHIP:DMG: Data = 0, - [1666951258.087250][5466:5466] CHIP:DMG: }, - [1666951258.087331][5466:5466] CHIP:DMG: - [1666951258.087400][5466:5466] CHIP:DMG: }, - [1666951258.087497][5466:5466] CHIP:DMG: - [1666951258.087559][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.087644][5466:5466] CHIP:DMG: { - [1666951258.087723][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.087809][5466:5466] CHIP:DMG: { - [1666951258.087896][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.087978][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.088060][5466:5466] CHIP:DMG: { - [1666951258.088146][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.088245][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.088337][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.088428][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.088521][5466:5466] CHIP:DMG: } - [1666951258.088608][5466:5466] CHIP:DMG: - [1666951258.088695][5466:5466] CHIP:DMG: Data = 18, - [1666951258.088773][5466:5466] CHIP:DMG: }, - [1666951258.088860][5466:5466] CHIP:DMG: - [1666951258.088930][5466:5466] CHIP:DMG: }, - [1666951258.089026][5466:5466] CHIP:DMG: - [1666951258.089087][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.089171][5466:5466] CHIP:DMG: { - [1666951258.089323][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.089416][5466:5466] CHIP:DMG: { - [1666951258.089499][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.089573][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.089663][5466:5466] CHIP:DMG: { - [1666951258.089748][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.089837][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.089927][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.090013][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.090098][5466:5466] CHIP:DMG: } - [1666951258.090186][5466:5466] CHIP:DMG: - [1666951258.090273][5466:5466] CHIP:DMG: Data = 27, - [1666951258.090345][5466:5466] CHIP:DMG: }, - [1666951258.090431][5466:5466] CHIP:DMG: - [1666951258.090502][5466:5466] CHIP:DMG: }, - [1666951258.090607][5466:5466] CHIP:DMG: - [1666951258.090675][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.090788][5466:5466] CHIP:DMG: { - [1666951258.090941][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.091026][5466:5466] CHIP:DMG: { - [1666951258.091116][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.091190][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.091272][5466:5466] CHIP:DMG: { - [1666951258.091585][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.091690][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.091840][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.091924][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.092005][5466:5466] CHIP:DMG: } - [1666951258.092090][5466:5466] CHIP:DMG: - [1666951258.092176][5466:5466] CHIP:DMG: Data = 28, - [1666951258.092263][5466:5466] CHIP:DMG: }, - [1666951258.092351][5466:5466] CHIP:DMG: - [1666951258.092422][5466:5466] CHIP:DMG: }, - [1666951258.092519][5466:5466] CHIP:DMG: - [1666951258.092582][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.092668][5466:5466] CHIP:DMG: { - [1666951258.092740][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.092820][5466:5466] CHIP:DMG: { - [1666951258.092903][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.092984][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.093068][5466:5466] CHIP:DMG: { - [1666951258.093161][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.093253][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.093342][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.093429][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.093522][5466:5466] CHIP:DMG: } - [1666951258.093610][5466:5466] CHIP:DMG: - [1666951258.093696][5466:5466] CHIP:DMG: Data = 65528, - [1666951258.093776][5466:5466] CHIP:DMG: }, - [1666951258.094154][5466:5466] CHIP:DMG: - [1666951258.094233][5466:5466] CHIP:DMG: }, - [1666951258.094331][5466:5466] CHIP:DMG: - [1666951258.094476][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.094566][5466:5466] CHIP:DMG: { - [1666951258.094639][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.094799][5466:5466] CHIP:DMG: { - [1666951258.094888][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.095033][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.095133][5466:5466] CHIP:DMG: { - [1666951258.095220][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.095319][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.095416][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.095506][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.095654][5466:5466] CHIP:DMG: } - [1666951258.095742][5466:5466] CHIP:DMG: - [1666951258.095882][5466:5466] CHIP:DMG: Data = 65529, - [1666951258.095975][5466:5466] CHIP:DMG: }, - [1666951258.096063][5466:5466] CHIP:DMG: - [1666951258.096142][5466:5466] CHIP:DMG: }, - [1666951258.096242][5466:5466] CHIP:DMG: - [1666951258.096304][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.096397][5466:5466] CHIP:DMG: { - [1666951258.096477][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.096627][5466:5466] CHIP:DMG: { - [1666951258.096718][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.096799][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.096884][5466:5466] CHIP:DMG: { - [1666951258.096977][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.097069][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.097162][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.097248][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.097335][5466:5466] CHIP:DMG: } - [1666951258.097430][5466:5466] CHIP:DMG: - [1666951258.097516][5466:5466] CHIP:DMG: Data = 65531, - [1666951258.097661][5466:5466] CHIP:DMG: }, - [1666951258.097748][5466:5466] CHIP:DMG: - [1666951258.097818][5466:5466] CHIP:DMG: }, - [1666951258.097914][5466:5466] CHIP:DMG: - [1666951258.097976][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.098059][5466:5466] CHIP:DMG: { - [1666951258.098139][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.098218][5466:5466] CHIP:DMG: { - [1666951258.098292][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.098373][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.098457][5466:5466] CHIP:DMG: { - [1666951258.098542][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.098640][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.098758][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.098845][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.098928][5466:5466] CHIP:DMG: } - [1666951258.099017][5466:5466] CHIP:DMG: - [1666951258.099103][5466:5466] CHIP:DMG: Data = 65532, - [1666951258.099188][5466:5466] CHIP:DMG: }, - [1666951258.099274][5466:5466] CHIP:DMG: - [1666951258.099344][5466:5466] CHIP:DMG: }, - [1666951258.099438][5466:5466] CHIP:DMG: - [1666951258.099499][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.099582][5466:5466] CHIP:DMG: { - [1666951258.099653][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.099739][5466:5466] CHIP:DMG: { - [1666951258.099818][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.099899][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.099989][5466:5466] CHIP:DMG: { - [1666951258.100073][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.100171][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.100259][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.100353][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.100443][5466:5466] CHIP:DMG: } - [1666951258.100538][5466:5466] CHIP:DMG: - [1666951258.100623][5466:5466] CHIP:DMG: Data = 65533, - [1666951258.100709][5466:5466] CHIP:DMG: }, - [1666951258.100795][5466:5466] CHIP:DMG: - [1666951258.100863][5466:5466] CHIP:DMG: }, - [1666951258.100940][5466:5466] CHIP:DMG: - [1666951258.101000][5466:5466] CHIP:DMG: ], - - - - - ./chip-tool thermostat read local-temperature 1 1 - verify on TH(all-cluster-minimal-app) receives the Read Request Message - - [1666951485.740766][5466:5466] CHIP:EM: Handling via exchange: 11893r, Delegate: 0xaaaab26280e0 - [1666951485.740865][5466:5466] CHIP:IM: Received Read request - [1666951485.741040][5466:5466] CHIP:DMG: ReadRequestMessage = - [1666951485.741108][5466:5466] CHIP:DMG: { - [1666951485.741163][5466:5466] CHIP:DMG: AttributePathIBs = - [1666951485.741229][5466:5466] CHIP:DMG: [ - [1666951485.741400][5466:5466] CHIP:DMG: AttributePathIB = - [1666951485.741488][5466:5466] CHIP:DMG: { - [1666951485.741569][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951485.741667][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951485.741750][5466:5466] CHIP:DMG: Attribute = 0x0000_0000, - [1666951485.741827][5466:5466] CHIP:DMG: } - [1666951485.742035][5466:5466] CHIP:DMG: - [1666951485.742115][5466:5466] CHIP:DMG: ], - [1666951485.742188][5466:5466] CHIP:DMG: - [1666951485.742258][5466:5466] CHIP:DMG: isFabricFiltered = true, - [1666951485.742324][5466:5466] CHIP:DMG: InteractionModelRevision = 1 - [1666951485.742383][5466:5466] CHIP:DMG: }, - [1666951485.742555][5466:5466] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666951485.743017][5466:5466] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666951485.743101][5466:5466] CHIP:DMG: Cluster 201, Attribute 0 is dirty - [1666951485.743158][5466:5466] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666951485.743310][5466:5466] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666951485.743387][5466:5466] CHIP:DMG: AccessControl: allowed - [1666951485.743510][5466:5466] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666951485.744094][5466:5466] CHIP:EM: <<< [E:11893r M:246688943 (Ack:135368864)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666951485.744209][5466:5466] CHIP:IN: (S) Sending msg 246688943 on secure session with LSID: 45984 - [1666951485.744932][5466:5466] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:40236 | 246688943 | [Interaction Model (1) / Report Data (0x05) / Session = 16201 / Exchange = 11893] - [1666951485.745037][5466:5466] CHIP:DMG: Header Flags = - [1666951485.745096][5466:5466] CHIP:DMG: { - [1666951485.745187][5466:5466] CHIP:DMG: Exchange (0x06) = - [1666951485.745244][5466:5466] CHIP:DMG: { - [1666951485.745304][5466:5466] CHIP:DMG: AckMsg = 135368864 - [1666951485.745360][5466:5466] CHIP:DMG: NeedsAck = true - [1666951485.745414][5466:5466] CHIP:DMG: } - [1666951485.745487][5466:5466] CHIP:DMG: } - [1666951485.745542][5466:5466] CHIP:DMG: - [1666951485.745610][5466:5466] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666951485.745665][5466:5466] CHIP:DMG: { - [1666951485.745720][5466:5466] CHIP:DMG: data = 00493f00af2cb40e068c846db1feac48acc0f7d42291e7ab0758921068f9eea40375dc80ba3edc283a193f288e8820bcdd707b47b1bc1ac105ea01e423d92bfed065447dc3bb21 - [1666951485.745778][5466:5466] CHIP:DMG: buffer_ptr = 187651008656224 - [1666951485.745832][5466:5466] CHIP:DMG: } - [1666951485.745884][5466:5466] CHIP:DMG: - [1666951485.746048][5466:5466] CHIP:DMG: ReportDataMessage = - [1666951485.746117][5466:5466] CHIP:DMG: { - [1666951485.746172][5466:5466] CHIP:DMG: AttributeReportIBs = - [1666951485.746250][5466:5466] CHIP:DMG: [ - [1666951485.746312][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951485.746404][5466:5466] CHIP:DMG: { - [1666951485.746480][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951485.746564][5466:5466] CHIP:DMG: { - [1666951485.746776][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951485.746862][5466:5466] CHIP:DMG: AttributePathIB = - [1666951485.746950][5466:5466] CHIP:DMG: { - [1666951485.747041][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951485.747133][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951485.747224][5466:5466] CHIP:DMG: Attribute = 0x0000_0000, - [1666951485.747423][5466:5466] CHIP:DMG: } - [1666951485.747523][5466:5466] CHIP:DMG: - [1666951485.747617][5466:5466] CHIP:DMG: Data = 0, - [1666951485.747699][5466:5466] CHIP:DMG: }, - [1666951485.747786][5466:5466] CHIP:DMG: - [1666951485.747860][5466:5466] CHIP:DMG: }, - [1666951485.747945][5466:5466] CHIP:DMG: - [1666951485.748008][5466:5466] CHIP:DMG: ], - - - - ./chip-tool thermostat read control-sequence-of-operation 1 1 - - Verify the ReadRequestMessage on TH(all-cluster-minimal-app) - - [1666951649.029221][5466:5466] CHIP:EM: Handling via exchange: 52404r, Delegate: 0xaaaab26280e0 - [1666951649.029318][5466:5466] CHIP:IM: Received Read request - [1666951649.029488][5466:5466] CHIP:DMG: ReadRequestMessage = - [1666951649.029555][5466:5466] CHIP:DMG: { - [1666951649.029609][5466:5466] CHIP:DMG: AttributePathIBs = - [1666951649.029674][5466:5466] CHIP:DMG: [ - [1666951649.029736][5466:5466] CHIP:DMG: AttributePathIB = - [1666951649.029823][5466:5466] CHIP:DMG: { - [1666951649.029896][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951649.029985][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951649.030072][5466:5466] CHIP:DMG: Attribute = 0x0000_001B, - [1666951649.030149][5466:5466] CHIP:DMG: } - [1666951649.030227][5466:5466] CHIP:DMG: - [1666951649.030297][5466:5466] CHIP:DMG: ], - [1666951649.030369][5466:5466] CHIP:DMG: - [1666951649.030437][5466:5466] CHIP:DMG: isFabricFiltered = true, - [1666951649.030501][5466:5466] CHIP:DMG: InteractionModelRevision = 1 - [1666951649.030560][5466:5466] CHIP:DMG: }, - [1666951649.030781][5466:5466] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666951649.030999][5466:5466] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666951649.031072][5466:5466] CHIP:DMG: Cluster 201, Attribute 1b is dirty - [1666951649.031131][5466:5466] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_001B (expanded=0) - [1666951649.031199][5466:5466] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666951649.031275][5466:5466] CHIP:DMG: AccessControl: allowed - [1666951649.031392][5466:5466] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666951649.031898][5466:5466] CHIP:EM: <<< [E:52404r M:80802549 (Ack:174395409)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666951649.032001][5466:5466] CHIP:IN: (S) Sending msg 80802549 on secure session with LSID: 45985 - [1666951649.032653][5466:5466] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:37686 | 80802549 | [Interaction Model (1) / Report Data (0x05) / Session = 45395 / Exchange = 52404] - [1666951649.032750][5466:5466] CHIP:DMG: Header Flags = - [1666951649.032807][5466:5466] CHIP:DMG: { - [1666951649.032895][5466:5466] CHIP:DMG: Exchange (0x06) = - [1666951649.032951][5466:5466] CHIP:DMG: { - [1666951649.033010][5466:5466] CHIP:DMG: AckMsg = 174395409 - [1666951649.033065][5466:5466] CHIP:DMG: NeedsAck = true - [1666951649.033118][5466:5466] CHIP:DMG: } - [1666951649.033190][5466:5466] CHIP:DMG: } - [1666951649.033245][5466:5466] CHIP:DMG: - [1666951649.033310][5466:5466] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666951649.033365][5466:5466] CHIP:DMG: { - [1666951649.033419][5466:5466] CHIP:DMG: data = 0053b100f5f2d004f96a4d70c4b16122f251e4d299237245e6542fab668c2571f0b7aa5c4900c9af4e4f8c3e609ce74aa50968f953121b25ac374736a62e348ae61a263128350d - [1666951649.033477][5466:5466] CHIP:DMG: buffer_ptr = 187651008663600 - [1666951649.033529][5466:5466] CHIP:DMG: } - [1666951649.033581][5466:5466] CHIP:DMG: - [1666951649.033735][5466:5466] CHIP:DMG: ReportDataMessage = - [1666951649.033959][5466:5466] CHIP:DMG: { - [1666951649.034017][5466:5466] CHIP:DMG: AttributeReportIBs = - [1666951649.034097][5466:5466] CHIP:DMG: [ - [1666951649.034159][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951649.034246][5466:5466] CHIP:DMG: { - [1666951649.034318][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951649.034406][5466:5466] CHIP:DMG: { - [1666951649.034490][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951649.034572][5466:5466] CHIP:DMG: AttributePathIB = - [1666951649.034657][5466:5466] CHIP:DMG: { - [1666951649.034782][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951649.034885][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951649.034982][5466:5466] CHIP:DMG: Attribute = 0x0000_001B, - [1666951649.035068][5466:5466] CHIP:DMG: } - [1666951649.035157][5466:5466] CHIP:DMG: - [1666951649.035244][5466:5466] CHIP:DMG: Data = 4, - [1666951649.035323][5466:5466] CHIP:DMG: }, - [1666951649.035416][5466:5466] CHIP:DMG: - [1666951649.035486][5466:5466] CHIP:DMG: }, - [1666951649.035567][5466:5466] CHIP:DMG: - [1666951649.035629][5466:5466] CHIP:DMG: ], - - - ./chip-tool thermostat read system-mode 1 1 - - Verify the ReadRequestMessage on TH(all-clusters-app) - - [1666951722.178349][5466:5466] CHIP:EM: Handling via exchange: 21521r, Delegate: 0xaaaab26280e0 - [1666951722.178443][5466:5466] CHIP:IM: Received Read request - [1666951722.178611][5466:5466] CHIP:DMG: ReadRequestMessage = - [1666951722.178678][5466:5466] CHIP:DMG: { - [1666951722.178800][5466:5466] CHIP:DMG: AttributePathIBs = - [1666951722.178878][5466:5466] CHIP:DMG: [ - [1666951722.178950][5466:5466] CHIP:DMG: AttributePathIB = - [1666951722.179021][5466:5466] CHIP:DMG: { - [1666951722.179094][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951722.179322][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951722.179408][5466:5466] CHIP:DMG: Attribute = 0x0000_001C, - [1666951722.179490][5466:5466] CHIP:DMG: } - [1666951722.179572][5466:5466] CHIP:DMG: - [1666951722.179644][5466:5466] CHIP:DMG: ], - [1666951722.179715][5466:5466] CHIP:DMG: - [1666951722.179782][5466:5466] CHIP:DMG: isFabricFiltered = true, - [1666951722.179846][5466:5466] CHIP:DMG: InteractionModelRevision = 1 - [1666951722.179905][5466:5466] CHIP:DMG: }, - [1666951722.180070][5466:5466] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666951722.180283][5466:5466] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666951722.180355][5466:5466] CHIP:DMG: Cluster 201, Attribute 1c is dirty - [1666951722.180410][5466:5466] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_001C (expanded=0) - [1666951722.180477][5466:5466] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666951722.180552][5466:5466] CHIP:DMG: AccessControl: allowed - [1666951722.180666][5466:5466] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666951722.181184][5466:5466] CHIP:EM: <<< [E:21521r M:214108728 (Ack:40689834)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666951722.181285][5466:5466] CHIP:IN: (S) Sending msg 214108728 on secure session with LSID: 45986 - [1666951722.181932][5466:5466] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:34735 | 214108728 | [Interaction Model (1) / Report Data (0x05) / Session = 17453 / Exchange = 21521] - [1666951722.182029][5466:5466] CHIP:DMG: Header Flags = - [1666951722.182087][5466:5466] CHIP:DMG: { - [1666951722.182176][5466:5466] CHIP:DMG: Exchange (0x06) = - [1666951722.182232][5466:5466] CHIP:DMG: { - [1666951722.182292][5466:5466] CHIP:DMG: AckMsg = 40689834 - [1666951722.182348][5466:5466] CHIP:DMG: NeedsAck = true - [1666951722.182412][5466:5466] CHIP:DMG: } - [1666951722.182485][5466:5466] CHIP:DMG: } - [1666951722.182540][5466:5466] CHIP:DMG: - [1666951722.182609][5466:5466] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666951722.182665][5466:5466] CHIP:DMG: { - [1666951722.182755][5466:5466] CHIP:DMG: data = 002d4400380ac30cae2c21e379f109decb71da8dc524b60de5152814b3d68a18cd13cf300991a58665898f260bcf99b588f9b77f2d11ee591b91ac16c48364267779b65ccd7eb8 - [1666951722.182819][5466:5466] CHIP:DMG: buffer_ptr = 187651008665008 - [1666951722.182872][5466:5466] CHIP:DMG: } - [1666951722.182924][5466:5466] CHIP:DMG: - [1666951722.183085][5466:5466] CHIP:DMG: ReportDataMessage = - [1666951722.183151][5466:5466] CHIP:DMG: { - [1666951722.183205][5466:5466] CHIP:DMG: AttributeReportIBs = - [1666951722.183288][5466:5466] CHIP:DMG: [ - [1666951722.183350][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951722.183436][5466:5466] CHIP:DMG: { - [1666951722.183510][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951722.183583][5466:5466] CHIP:DMG: { - [1666951722.183672][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951722.183754][5466:5466] CHIP:DMG: AttributePathIB = - [1666951722.183838][5466:5466] CHIP:DMG: { - [1666951722.183926][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951722.184024][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951722.184115][5466:5466] CHIP:DMG: Attribute = 0x0000_001C, - [1666951722.184208][5466:5466] CHIP:DMG: } - [1666951722.184306][5466:5466] CHIP:DMG: - [1666951722.184402][5466:5466] CHIP:DMG: Data = 1, - [1666951722.184482][5466:5466] CHIP:DMG: }, - [1666951722.184575][5466:5466] CHIP:DMG: - [1666951722.184646][5466:5466] CHIP:DMG: }, - [1666951722.184726][5466:5466] CHIP:DMG: - [1666951722.184788][5466:5466] CHIP:DMG: ], - disabled: true - - - label: - "Step 6: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: TSTAT.C.AO-READ - verification: | - Verify by sending the optional attribute which is mentioned in spec - - Most of optional attribute is not implemented in SDK - disabled: true - - - label: - "Step 7: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: TSTAT.C.AO-WRITE - verification: | - Verify by sending the optional attribute which is mentioned in spec - - Most of optional attribute is not implemented in SDK - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_3_1_Simulated.yaml deleted file mode 100644 index dd1aa9b26296bb..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_3_1_Simulated.yaml +++ /dev/null @@ -1,635 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 12.3.1. [TC-TSUIC-3.1] Attributes with client as DUT - -PICS: - - TSUIC.C - - TSUIC.C.AM-READ - - TSUIC.C.AO-READ - - TSUIC.C.AM-WRITE - - TSUIC.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Thermostat User Interface Configuration" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads TemperatureDisplayMode attribute from TH" - wait: "readAttribute" - attribute: "TemperatureDisplayMode" - - - label: "DUT reads KeypadLockout attribute from TH" - wait: "readAttribute" - attribute: "KeypadLockout" - - - label: "DUT reads ScheduleProgrammingVisibility attribute from TH" - wait: "readAttribute" - attribute: "ScheduleProgrammingVisibility" - - - label: "DUT writes TemperatureDisplayMode attribute from TH" - wait: "writeAttribute" - attribute: "TemperatureDisplayMode" - arguments: - value: - - - label: "DUT writes KeypadLockout attribute from TH" - wait: "writeAttribute" - attribute: "KeypadLockout" - arguments: - value: - - - label: "DUT writes ScheduleProgrammingVisibility attribute from TH" - wait: "writeAttribute" - attribute: "ScheduleProgrammingVisibility" - arguments: - value: - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool thermostatuserinterfaceconfiguration read temperature-display-mode 1 1 - Verify DUT receives temperature-display-mode attribute response on the TH(all-clusters-minimal-app) Log: - - [1666952907.484910][5988:5988] CHIP:EM: Handling via exchange: 55230r, Delegate: 0xaaaad96680e0 - [1666952907.485012][5988:5988] CHIP:IM: Received Read request - [1666952907.485181][5988:5988] CHIP:DMG: ReadRequestMessage = - [1666952907.485247][5988:5988] CHIP:DMG: { - [1666952907.485298][5988:5988] CHIP:DMG: AttributePathIBs = - [1666952907.485363][5988:5988] CHIP:DMG: [ - [1666952907.485425][5988:5988] CHIP:DMG: AttributePathIB = - [1666952907.485499][5988:5988] CHIP:DMG: { - [1666952907.485577][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952907.485654][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666952907.485743][5988:5988] CHIP:DMG: Attribute = 0x0000_0000, - [1666952907.485825][5988:5988] CHIP:DMG: } - [1666952907.485957][5988:5988] CHIP:DMG: - [1666952907.486032][5988:5988] CHIP:DMG: ], - [1666952907.486105][5988:5988] CHIP:DMG: - [1666952907.486173][5988:5988] CHIP:DMG: isFabricFiltered = true, - [1666952907.486237][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666952907.486296][5988:5988] CHIP:DMG: }, - [1666952907.486459][5988:5988] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952907.486859][5988:5988] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952907.486933][5988:5988] CHIP:DMG: Cluster 204, Attribute 0 is dirty - [1666952907.486988][5988:5988] CHIP:DMG: Reading attribute: Cluster=0x0000_0204 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666952907.487056][5988:5988] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=v - [1666952907.487130][5988:5988] CHIP:DMG: AccessControl: allowed - [1666952907.487245][5988:5988] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952907.487768][5988:5988] CHIP:EM: <<< [E:55230r M:41825397 (Ack:212794457)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952907.487871][5988:5988] CHIP:IN: (S) Sending msg 41825397 on secure session with LSID: 10697 - [1666952907.488513][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:53323 | 41825397 | [Interaction Model (1) / Report Data (0x05) / Session = 25917 / Exchange = 55230] - [1666952907.488608][5988:5988] CHIP:DMG: Header Flags = - [1666952907.488665][5988:5988] CHIP:DMG: { - [1666952907.488754][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666952907.488810][5988:5988] CHIP:DMG: { - [1666952907.488871][5988:5988] CHIP:DMG: AckMsg = 212794457 - [1666952907.488927][5988:5988] CHIP:DMG: NeedsAck = true - [1666952907.488980][5988:5988] CHIP:DMG: } - [1666952907.489052][5988:5988] CHIP:DMG: } - [1666952907.489107][5988:5988] CHIP:DMG: - [1666952907.489174][5988:5988] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952907.489229][5988:5988] CHIP:DMG: { - [1666952907.489284][5988:5988] CHIP:DMG: data = 003d650075347e020776c6e49e846255494afb7162d53375ec47e3a81865d9dfed7bd0d3b81c282e6d345a46b6f7188f38a62af2bf68f61d7a2e93bdb8b638416d20b1afe793b1 - [1666952907.489342][5988:5988] CHIP:DMG: buffer_ptr = 187650777049920 - [1666952907.489395][5988:5988] CHIP:DMG: } - [1666952907.489446][5988:5988] CHIP:DMG: - [1666952907.489604][5988:5988] CHIP:DMG: ReportDataMessage = - [1666952907.489670][5988:5988] CHIP:DMG: { - [1666952907.489724][5988:5988] CHIP:DMG: AttributeReportIBs = - [1666952907.489807][5988:5988] CHIP:DMG: [ - [1666952907.489869][5988:5988] CHIP:DMG: AttributeReportIB = - [1666952907.489948][5988:5988] CHIP:DMG: { - [1666952907.490153][5988:5988] CHIP:DMG: AttributeDataIB = - [1666952907.490246][5988:5988] CHIP:DMG: { - [1666952907.490331][5988:5988] CHIP:DMG: DataVersion = 0x97fedc88, - [1666952907.490412][5988:5988] CHIP:DMG: AttributePathIB = - [1666952907.490496][5988:5988] CHIP:DMG: { - [1666952907.490583][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952907.490681][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666952907.490841][5988:5988] CHIP:DMG: Attribute = 0x0000_0000, - [1666952907.490919][5988:5988] CHIP:DMG: } - [1666952907.491017][5988:5988] CHIP:DMG: - [1666952907.491104][5988:5988] CHIP:DMG: Data = 0, - [1666952907.491182][5988:5988] CHIP:DMG: }, - [1666952907.491276][5988:5988] CHIP:DMG: - [1666952907.491346][5988:5988] CHIP:DMG: }, - - - - ./chip-tool thermostatuserinterfaceconfiguration read keypad-lockout 1 1 - Verify DUT receives keypad-lockout attribute response on the TH(all-clusters-minimal-app) Log: - - [1666952951.992449][5988:5988] CHIP:EM: Handling via exchange: 31337r, Delegate: 0xaaaad96680e0 - [1666952951.992544][5988:5988] CHIP:IM: Received Read request - [1666952951.992711][5988:5988] CHIP:DMG: ReadRequestMessage = - [1666952951.992778][5988:5988] CHIP:DMG: { - [1666952951.992824][5988:5988] CHIP:DMG: AttributePathIBs = - [1666952951.992880][5988:5988] CHIP:DMG: [ - [1666952951.992950][5988:5988] CHIP:DMG: AttributePathIB = - [1666952951.993026][5988:5988] CHIP:DMG: { - [1666952951.993105][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952951.993195][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666952951.993284][5988:5988] CHIP:DMG: Attribute = 0x0000_0001, - [1666952951.993366][5988:5988] CHIP:DMG: } - [1666952951.993444][5988:5988] CHIP:DMG: - [1666952951.993509][5988:5988] CHIP:DMG: ], - [1666952951.993592][5988:5988] CHIP:DMG: - [1666952951.993660][5988:5988] CHIP:DMG: isFabricFiltered = true, - [1666952951.993724][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666952951.993783][5988:5988] CHIP:DMG: }, - [1666952951.993951][5988:5988] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952951.994166][5988:5988] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952951.994239][5988:5988] CHIP:DMG: Cluster 204, Attribute 1 is dirty - [1666952951.994294][5988:5988] CHIP:DMG: Reading attribute: Cluster=0x0000_0204 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) - [1666952951.994363][5988:5988] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=v - [1666952951.994439][5988:5988] CHIP:DMG: AccessControl: allowed - [1666952951.994556][5988:5988] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952951.995160][5988:5988] CHIP:EM: <<< [E:31337r M:163238133 (Ack:50767302)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952951.995264][5988:5988] CHIP:IN: (S) Sending msg 163238133 on secure session with LSID: 10698 - [1666952951.995933][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58247 | 163238133 | [Interaction Model (1) / Report Data (0x05) / Session = 7537 / Exchange = 31337] - [1666952951.996031][5988:5988] CHIP:DMG: Header Flags = - [1666952951.996088][5988:5988] CHIP:DMG: { - [1666952951.996177][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666952951.996234][5988:5988] CHIP:DMG: { - [1666952951.996294][5988:5988] CHIP:DMG: AckMsg = 50767302 - [1666952951.996350][5988:5988] CHIP:DMG: NeedsAck = true - [1666952951.996404][5988:5988] CHIP:DMG: } - [1666952951.996477][5988:5988] CHIP:DMG: } - [1666952951.996533][5988:5988] CHIP:DMG: - [1666952951.996599][5988:5988] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952951.996655][5988:5988] CHIP:DMG: { - [1666952951.996711][5988:5988] CHIP:DMG: data = 00711d00f5d0ba0905d1ce49007c130f1c76302873da95826c5bbbadebfad86b93a5b9a743e3a29b5dd500582640433c06f3f22159b09129938868c073478e30209ebdbeddc96b - [1666952951.996932][5988:5988] CHIP:DMG: buffer_ptr = 187650777054064 - [1666952951.996990][5988:5988] CHIP:DMG: } - [1666952951.997042][5988:5988] CHIP:DMG: - [1666952951.997203][5988:5988] CHIP:DMG: ReportDataMessage = - [1666952951.997270][5988:5988] CHIP:DMG: { - [1666952951.997325][5988:5988] CHIP:DMG: AttributeReportIBs = - [1666952951.997400][5988:5988] CHIP:DMG: [ - [1666952951.997462][5988:5988] CHIP:DMG: AttributeReportIB = - [1666952951.997549][5988:5988] CHIP:DMG: { - [1666952951.997615][5988:5988] CHIP:DMG: AttributeDataIB = - [1666952951.997692][5988:5988] CHIP:DMG: { - [1666952951.997781][5988:5988] CHIP:DMG: DataVersion = 0x97fedc88, - [1666952951.997856][5988:5988] CHIP:DMG: AttributePathIB = - [1666952951.997946][5988:5988] CHIP:DMG: { - [1666952951.998041][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952951.998132][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666952951.998227][5988:5988] CHIP:DMG: Attribute = 0x0000_0001, - [1666952951.998319][5988:5988] CHIP:DMG: } - [1666952951.998414][5988:5988] CHIP:DMG: - [1666952951.998503][5988:5988] CHIP:DMG: Data = 0, - [1666952951.998582][5988:5988] CHIP:DMG: }, - [1666952951.998666][5988:5988] CHIP:DMG: - [1666952951.998772][5988:5988] CHIP:DMG: }, - [1666952951.998858][5988:5988] CHIP:DMG: - [1666952951.998925][5988:5988] CHIP:DMG: ], - - - ./chip-tool thermostatuserinterfaceconfiguration read feature-map 1 1 - Verify DUT receives feature-map attribute response on the TH(all-clusters-minimal-app) Log: - - [1666953011.987486][5988:5988] CHIP:EM: Handling via exchange: 41581r, Delegate: 0xaaaad96680e0 - [1666953011.987582][5988:5988] CHIP:IM: Received Read request - [1666953011.987754][5988:5988] CHIP:DMG: ReadRequestMessage = - [1666953011.987820][5988:5988] CHIP:DMG: { - [1666953011.987875][5988:5988] CHIP:DMG: AttributePathIBs = - [1666953011.987940][5988:5988] CHIP:DMG: [ - [1666953011.988002][5988:5988] CHIP:DMG: AttributePathIB = - [1666953011.988140][5988:5988] CHIP:DMG: { - [1666953011.988218][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953011.988315][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953011.988399][5988:5988] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666953011.988476][5988:5988] CHIP:DMG: } - [1666953011.988557][5988:5988] CHIP:DMG: - [1666953011.988630][5988:5988] CHIP:DMG: ], - [1666953011.988703][5988:5988] CHIP:DMG: - [1666953011.988771][5988:5988] CHIP:DMG: isFabricFiltered = true, - [1666953011.988837][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666953011.988895][5988:5988] CHIP:DMG: }, - [1666953011.989066][5988:5988] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666953011.989956][5988:5988] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666953011.990037][5988:5988] CHIP:DMG: Cluster 204, Attribute fffc is dirty - [1666953011.990096][5988:5988] CHIP:DMG: Reading attribute: Cluster=0x0000_0204 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1666953011.990167][5988:5988] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=v - [1666953011.990245][5988:5988] CHIP:DMG: AccessControl: allowed - [1666953011.990366][5988:5988] CHIP:DMG: Sending report (payload has 38 bytes)... - [1666953011.991110][5988:5988] CHIP:EM: <<< [E:41581r M:126419151 (Ack:121750119)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666953011.991234][5988:5988] CHIP:IN: (S) Sending msg 126419151 on secure session with LSID: 10699 - [1666953011.991978][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:51918 | 126419151 | [Interaction Model (1) / Report Data (0x05) / Session = 4917 / Exchange = 41581] - [1666953011.992080][5988:5988] CHIP:DMG: Header Flags = - [1666953011.992141][5988:5988] CHIP:DMG: { - [1666953011.992223][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666953011.992270][5988:5988] CHIP:DMG: { - [1666953011.992334][5988:5988] CHIP:DMG: AckMsg = 121750119 - [1666953011.992393][5988:5988] CHIP:DMG: NeedsAck = true - [1666953011.992449][5988:5988] CHIP:DMG: } - [1666953011.992523][5988:5988] CHIP:DMG: } - [1666953011.992578][5988:5988] CHIP:DMG: - [1666953011.992648][5988:5988] CHIP:DMG: Encrypted Payload (72 bytes) = - [1666953011.992704][5988:5988] CHIP:DMG: { - [1666953011.992760][5988:5988] CHIP:DMG: data = 00351300cf0089075485011d70effa9c929aff24c827bbf7a3c248a568ad130358506703e7b2bab3a825a30775202aee61f0ac21a9f3de9f2d64cb1cb4f9fa2fb10449d125921408 - [1666953011.992818][5988:5988] CHIP:DMG: buffer_ptr = 187650777054672 - [1666953011.992872][5988:5988] CHIP:DMG: } - [1666953011.993094][5988:5988] CHIP:DMG: - [1666953011.993274][5988:5988] CHIP:DMG: ReportDataMessage = - [1666953011.993332][5988:5988] CHIP:DMG: { - [1666953011.993378][5988:5988] CHIP:DMG: AttributeReportIBs = - [1666953011.993663][5988:5988] CHIP:DMG: [ - [1666953011.993735][5988:5988] CHIP:DMG: AttributeReportIB = - [1666953011.993827][5988:5988] CHIP:DMG: { - [1666953011.993903][5988:5988] CHIP:DMG: AttributeDataIB = - [1666953011.993986][5988:5988] CHIP:DMG: { - [1666953011.994072][5988:5988] CHIP:DMG: DataVersion = 0x97fedc88, - [1666953011.994156][5988:5988] CHIP:DMG: AttributePathIB = - [1666953011.994242][5988:5988] CHIP:DMG: { - [1666953011.994331][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953011.994423][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953011.994515][5988:5988] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666953011.994599][5988:5988] CHIP:DMG: } - [1666953011.994690][5988:5988] CHIP:DMG: - [1666953011.994825][5988:5988] CHIP:DMG: Data = 0, - [1666953011.994908][5988:5988] CHIP:DMG: }, - [1666953011.995069][5988:5988] CHIP:DMG: - [1666953011.995147][5988:5988] CHIP:DMG: }, - [1666953011.995233][5988:5988] CHIP:DMG: - [1666953011.995296][5988:5988] CHIP:DMG: ], - - - ./chip-tool thermostatuserinterfaceconfiguration read attribute-list 1 1 - Verify DUT receives attribute-list attribute response on the TH(all-clusters-minimal-app) Log: - - [1676893524.772970][14579:14579] CHIP:DMG: ReportDataMessage = - [1676893524.772985][14579:14579] CHIP:DMG: { - [1676893524.772995][14579:14579] CHIP:DMG: AttributeReportIBs = - [1676893524.773014][14579:14579] CHIP:DMG: [ - [1676893524.773026][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.773046][14579:14579] CHIP:DMG: { - [1676893524.773060][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.773075][14579:14579] CHIP:DMG: { - [1676893524.773092][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.773109][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.773126][14579:14579] CHIP:DMG: { - [1676893524.773143][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.773160][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.773180][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.773197][14579:14579] CHIP:DMG: } - [1676893524.773216][14579:14579] CHIP:DMG: - [1676893524.773232][14579:14579] CHIP:DMG: Data = [ - [1676893524.773251][14579:14579] CHIP:DMG: - [1676893524.773268][14579:14579] CHIP:DMG: ], - [1676893524.773283][14579:14579] CHIP:DMG: }, - [1676893524.773303][14579:14579] CHIP:DMG: - [1676893524.773316][14579:14579] CHIP:DMG: }, - [1676893524.773345][14579:14579] CHIP:DMG: - [1676893524.773358][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.773381][14579:14579] CHIP:DMG: { - [1676893524.773394][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.773409][14579:14579] CHIP:DMG: { - [1676893524.773425][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.773439][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.773455][14579:14579] CHIP:DMG: { - [1676893524.773471][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.773488][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.773505][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.773521][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.773536][14579:14579] CHIP:DMG: } - [1676893524.773558][14579:14579] CHIP:DMG: - [1676893524.773575][14579:14579] CHIP:DMG: Data = 0, - [1676893524.773589][14579:14579] CHIP:DMG: }, - [1676893524.773609][14579:14579] CHIP:DMG: - [1676893524.773623][14579:14579] CHIP:DMG: }, - [1676893524.773651][14579:14579] CHIP:DMG: - [1676893524.773665][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.773686][14579:14579] CHIP:DMG: { - [1676893524.773699][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.773714][14579:14579] CHIP:DMG: { - [1676893524.773729][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.773744][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.773760][14579:14579] CHIP:DMG: { - [1676893524.773775][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.773792][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.773809][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.773826][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.773841][14579:14579] CHIP:DMG: } - [1676893524.773860][14579:14579] CHIP:DMG: - [1676893524.773877][14579:14579] CHIP:DMG: Data = 1, - [1676893524.773893][14579:14579] CHIP:DMG: }, - [1676893524.773915][14579:14579] CHIP:DMG: - [1676893524.773928][14579:14579] CHIP:DMG: }, - [1676893524.773955][14579:14579] CHIP:DMG: - [1676893524.773968][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.773989][14579:14579] CHIP:DMG: { - [1676893524.774002][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.774018][14579:14579] CHIP:DMG: { - [1676893524.774032][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.774047][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.774063][14579:14579] CHIP:DMG: { - [1676893524.774079][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.774095][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.774111][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.774127][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.774142][14579:14579] CHIP:DMG: } - [1676893524.774161][14579:14579] CHIP:DMG: - [1676893524.774177][14579:14579] CHIP:DMG: Data = 65528, - [1676893524.774193][14579:14579] CHIP:DMG: }, - [1676893524.774212][14579:14579] CHIP:DMG: - [1676893524.774227][14579:14579] CHIP:DMG: }, - [1676893524.774255][14579:14579] CHIP:DMG: - [1676893524.774268][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.774288][14579:14579] CHIP:DMG: { - [1676893524.774301][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.774316][14579:14579] CHIP:DMG: { - [1676893524.774331][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.774346][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.774361][14579:14579] CHIP:DMG: { - [1676893524.774377][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.774395][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.774412][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.774428][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.774443][14579:14579] CHIP:DMG: } - [1676893524.774464][14579:14579] CHIP:DMG: - [1676893524.774480][14579:14579] CHIP:DMG: Data = 65529, - [1676893524.774494][14579:14579] CHIP:DMG: }, - [1676893524.774514][14579:14579] CHIP:DMG: - [1676893524.774528][14579:14579] CHIP:DMG: }, - [1676893524.774555][14579:14579] CHIP:DMG: - [1676893524.774568][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.774589][14579:14579] CHIP:DMG: { - [1676893524.774602][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.774617][14579:14579] CHIP:DMG: { - [1676893524.774633][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.774648][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.774664][14579:14579] CHIP:DMG: { - [1676893524.774679][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.774695][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.774713][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.774729][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.774744][14579:14579] CHIP:DMG: } - [1676893524.774763][14579:14579] CHIP:DMG: - [1676893524.774779][14579:14579] CHIP:DMG: Data = 65530, - [1676893524.774794][14579:14579] CHIP:DMG: }, - [1676893524.774813][14579:14579] CHIP:DMG: - [1676893524.774827][14579:14579] CHIP:DMG: }, - [1676893524.774854][14579:14579] CHIP:DMG: - [1676893524.774867][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.774887][14579:14579] CHIP:DMG: { - [1676893524.774900][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.774915][14579:14579] CHIP:DMG: { - [1676893524.774955][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.774971][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.774987][14579:14579] CHIP:DMG: { - [1676893524.775002][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.775018][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.775038][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.775054][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.775070][14579:14579] CHIP:DMG: } - [1676893524.775088][14579:14579] CHIP:DMG: - [1676893524.775105][14579:14579] CHIP:DMG: Data = 65531, - [1676893524.775120][14579:14579] CHIP:DMG: }, - [1676893524.775139][14579:14579] CHIP:DMG: - [1676893524.775153][14579:14579] CHIP:DMG: }, - [1676893524.775180][14579:14579] CHIP:DMG: - [1676893524.775194][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.775214][14579:14579] CHIP:DMG: { - [1676893524.775227][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.775242][14579:14579] CHIP:DMG: { - [1676893524.775258][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.775273][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.775290][14579:14579] CHIP:DMG: { - [1676893524.775306][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.775321][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.775338][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.775355][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.775371][14579:14579] CHIP:DMG: } - [1676893524.775390][14579:14579] CHIP:DMG: - [1676893524.775406][14579:14579] CHIP:DMG: Data = 65532, - [1676893524.775421][14579:14579] CHIP:DMG: }, - [1676893524.775440][14579:14579] CHIP:DMG: - [1676893524.775454][14579:14579] CHIP:DMG: }, - [1676893524.775480][14579:14579] CHIP:DMG: - [1676893524.775493][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.775513][14579:14579] CHIP:DMG: { - [1676893524.775526][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.775542][14579:14579] CHIP:DMG: { - [1676893524.775557][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.775572][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.775588][14579:14579] CHIP:DMG: { - [1676893524.775604][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.775623][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.775640][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.775656][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.775672][14579:14579] CHIP:DMG: } - [1676893524.775691][14579:14579] CHIP:DMG: - [1676893524.775707][14579:14579] CHIP:DMG: Data = 65533, - [1676893524.775722][14579:14579] CHIP:DMG: }, - [1676893524.775745][14579:14579] CHIP:DMG: - [1676893524.775759][14579:14579] CHIP:DMG: }, - [1676893524.775778][14579:14579] CHIP:DMG: - [1676893524.775791][14579:14579] CHIP:DMG: ], - [1676893524.775862][14579:14579] CHIP:DMG: - [1676893524.775877][14579:14579] CHIP:DMG: SuppressResponse = true, - [1676893524.775891][14579:14579] CHIP:DMG: InteractionModelRevision = 1 - [1676893524.775903][14579:14579] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool thermostatuserinterfaceconfiguration read schedule-programming-visibility 1 1 - - Verify DUT receives schedule-programming-visibility attribute response on the TH(all-clusters-minimal-app) Log: - - [1666953130.730282][5988:5988] CHIP:EM: Handling via exchange: 19762r, Delegate: 0xaaaad96680e0 - [1666953130.730438][5988:5988] CHIP:IM: Received Read request - [1666953130.730662][5988:5988] CHIP:DMG: ReadRequestMessage = - [1666953130.730769][5988:5988] CHIP:DMG: { - [1666953130.730828][5988:5988] CHIP:DMG: AttributePathIBs = - [1666953130.730893][5988:5988] CHIP:DMG: [ - [1666953130.730955][5988:5988] CHIP:DMG: AttributePathIB = - [1666953130.731032][5988:5988] CHIP:DMG: { - [1666953130.731110][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953130.731200][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953130.731287][5988:5988] CHIP:DMG: Attribute = 0x0000_0002, - [1666953130.731370][5988:5988] CHIP:DMG: } - [1666953130.731447][5988:5988] CHIP:DMG: - [1666953130.731512][5988:5988] CHIP:DMG: ], - [1666953130.731582][5988:5988] CHIP:DMG: - [1666953130.731649][5988:5988] CHIP:DMG: isFabricFiltered = true, - [1666953130.731714][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666953130.731772][5988:5988] CHIP:DMG: }, - [1666953130.731937][5988:5988] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666953130.732148][5988:5988] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666953130.732219][5988:5988] CHIP:DMG: Cluster 204, Attribute 2 is dirty - [1666953130.732275][5988:5988] CHIP:DMG: Reading attribute: Cluster=0x0000_0204 Endpoint=1 AttributeId=0x0000_0002 (expanded=0) - [1666953130.732383][5988:5988] CHIP:DMG: Sending report (payload has 34 bytes)... - [1666953130.732896][5988:5988] CHIP:EM: <<< [E:19762r M:73354864 (Ack:39436104)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666953130.732993][5988:5988] CHIP:IN: (S) Sending msg 73354864 on secure session with LSID: 10701 - [1666953130.733819][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:39423 | 73354864 | [Interaction Model (1) / Report Data (0x05) / Session = 51855 / Exchange = 19762] - [1666953130.733918][5988:5988] CHIP:DMG: Header Flags = - [1666953130.733975][5988:5988] CHIP:DMG: { - [1666953130.734062][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666953130.734120][5988:5988] CHIP:DMG: { - [1666953130.734180][5988:5988] CHIP:DMG: AckMsg = 39436104 - [1666953130.734237][5988:5988] CHIP:DMG: NeedsAck = true - [1666953130.734295][5988:5988] CHIP:DMG: } - [1666953130.734367][5988:5988] CHIP:DMG: } - [1666953130.734422][5988:5988] CHIP:DMG: - [1666953130.734490][5988:5988] CHIP:DMG: Encrypted Payload (68 bytes) = - [1666953130.734545][5988:5988] CHIP:DMG: { - [1666953130.734600][5988:5988] CHIP:DMG: data = 008fca00704e5f040d933cd2a06139a038a30bdd479e10884e5b1d470d816f6dedc00aa71193a9ad3702ed39ea7c8d8d9b99ca1fe4c24cfdc365fa24300f32d9a8bcefde - [1666953130.734659][5988:5988] CHIP:DMG: buffer_ptr = 187650777059872 - [1666953130.734712][5988:5988] CHIP:DMG: } - [1666953130.734817][5988:5988] CHIP:DMG: - [1666953130.734969][5988:5988] CHIP:DMG: ReportDataMessage = - [1666953130.735035][5988:5988] CHIP:DMG: { - [1666953130.735089][5988:5988] CHIP:DMG: AttributeReportIBs = - [1666953130.735166][5988:5988] CHIP:DMG: [ - [1666953130.735228][5988:5988] CHIP:DMG: AttributeReportIB = - [1666953130.735318][5988:5988] CHIP:DMG: { - [1666953130.735389][5988:5988] CHIP:DMG: AttributeStatusIB = - [1666953130.735478][5988:5988] CHIP:DMG: { - [1666953130.735556][5988:5988] CHIP:DMG: AttributePathIB = - [1666953130.735640][5988:5988] CHIP:DMG: { - [1666953130.735729][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953130.735819][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953130.735917][5988:5988] CHIP:DMG: Attribute = 0x0000_0002, - [1666953130.736010][5988:5988] CHIP:DMG: } - [1666953130.736104][5988:5988] CHIP:DMG: - [1666953130.736187][5988:5988] CHIP:DMG: StatusIB = - [1666953130.736272][5988:5988] CHIP:DMG: { - [1666953130.736366][5988:5988] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1666953130.736449][5988:5988] CHIP:DMG: }, - [1666953130.736533][5988:5988] CHIP:DMG: - [1666953130.736616][5988:5988] CHIP:DMG: }, - [1666953130.736709][5988:5988] CHIP:DMG: - [1666953130.736927][5988:5988] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool thermostatuserinterfaceconfiguration write schedule-programming-visibility 1 1 1 - - Verify DUT receives schedule-programming-visibility attribute write response on the TH(all-clusters-minimal-app) Log: - - [1666953180.787649][5988:5988] CHIP:EM: Handling via exchange: 274r, Delegate: 0xaaaad96680e0 - [1666953180.787747][5988:5988] CHIP:IM: Received Write request - [1666953180.787806][5988:5988] CHIP:DMG: IM WH moving to [Initialized] - [1666953180.787936][5988:5988] CHIP:DMG: WriteRequestMessage = - [1666953180.788002][5988:5988] CHIP:DMG: { - [1666953180.788061][5988:5988] CHIP:DMG: suppressResponse = false, - [1666953180.788128][5988:5988] CHIP:DMG: timedRequest = false, - [1666953180.788191][5988:5988] CHIP:DMG: AttributeDataIBs = - [1666953180.788266][5988:5988] CHIP:DMG: [ - [1666953180.788329][5988:5988] CHIP:DMG: AttributeDataIB = - [1666953180.788479][5988:5988] CHIP:DMG: { - [1666953180.788565][5988:5988] CHIP:DMG: AttributePathIB = - [1666953180.788700][5988:5988] CHIP:DMG: { - [1666953180.788844][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953180.788939][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953180.789077][5988:5988] CHIP:DMG: Attribute = 0x0000_0002, - [1666953180.789216][5988:5988] CHIP:DMG: } - [1666953180.789355][5988:5988] CHIP:DMG: - [1666953180.789498][5988:5988] CHIP:DMG: Data = 1, - [1666953180.789630][5988:5988] CHIP:DMG: }, - [1666953180.789717][5988:5988] CHIP:DMG: - [1666953180.789780][5988:5988] CHIP:DMG: ], - [1666953180.789855][5988:5988] CHIP:DMG: - [1666953180.789918][5988:5988] CHIP:DMG: moreChunkedMessages = false, - [1666953180.789984][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666953180.790043][5988:5988] CHIP:DMG: }, - [1666953180.790251][5988:5988] CHIP:DMG: IM WH moving to [AddStatus] - [1666953180.790936][5988:5988] CHIP:EM: <<< [E:274r M:42261800 (Ack:75748820)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:07 (IM:WriteResponse) - [1666953180.791049][5988:5988] CHIP:IN: (S) Sending msg 42261800 on secure session with LSID: 10702 - [1666953180.791742][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58417 | 42261800 | [Interaction Model (1) / Write Response (0x07) / Session = 57550 / Exchange = 274] - [1666953180.791843][5988:5988] CHIP:DMG: Header Flags = - [1666953180.791900][5988:5988] CHIP:DMG: { - [1666953180.791986][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666953180.792043][5988:5988] CHIP:DMG: { - [1666953180.792104][5988:5988] CHIP:DMG: AckMsg = 75748820 - [1666953180.792161][5988:5988] CHIP:DMG: NeedsAck = true - [1666953180.792215][5988:5988] CHIP:DMG: } - [1666953180.792288][5988:5988] CHIP:DMG: } - [1666953180.792343][5988:5988] CHIP:DMG: - [1666953180.792410][5988:5988] CHIP:DMG: Encrypted Payload (63 bytes) = - [1666953180.792466][5988:5988] CHIP:DMG: { - [1666953180.792521][5988:5988] CHIP:DMG: data = 00cee00028dd84020da296796a531f41d840f78b8736adc0b9e024d7096618010c89ca2aaa0435215f2f43aff228e1c004bf0fe22f4c42b20602d0e9d683ce - [1666953180.792580][5988:5988] CHIP:DMG: buffer_ptr = 187650777059872 - [1666953180.792634][5988:5988] CHIP:DMG: } - [1666953180.792685][5988:5988] CHIP:DMG: - [1666953180.792805][5988:5988] CHIP:DMG: WriteResponseMessage = - [1666953180.792871][5988:5988] CHIP:DMG: { - [1666953180.792924][5988:5988] CHIP:DMG: AttributeStatusIBs = - [1666953180.793003][5988:5988] CHIP:DMG: [ - [1666953180.793066][5988:5988] CHIP:DMG: AttributeStatusIB = - [1666953180.793150][5988:5988] CHIP:DMG: { - [1666953180.793217][5988:5988] CHIP:DMG: AttributePathIB = - [1666953180.793300][5988:5988] CHIP:DMG: { - [1666953180.793385][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953180.793472][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953180.793558][5988:5988] CHIP:DMG: Attribute = 0x0000_0002, - [1666953180.793639][5988:5988] CHIP:DMG: } - [1666953180.793731][5988:5988] CHIP:DMG: - [1666953180.793810][5988:5988] CHIP:DMG: StatusIB = - [1666953180.793892][5988:5988] CHIP:DMG: { - [1666953180.793975][5988:5988] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1666953180.794124][5988:5988] CHIP:DMG: }, - [1666953180.794221][5988:5988] CHIP:DMG: - [1666953180.794294][5988:5988] CHIP:DMG: }, - [1666953180.794379][5988:5988] CHIP:DMG: - [1666953180.794440][5988:5988] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml index 4b27410e01e79f..4dfe7de1773721 100644 --- a/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: TVOCCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !TVOCCONC.S.F00 && !TVOCCONC.S.F01 && !TVOCCONC.S.F02 && + !TVOCCONC.S.F03 && !TVOCCONC.S.F04 && !TVOCCONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F00 + PICS: TVOCCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F00 + PICS: " !TVOCCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F01 + PICS: TVOCCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F01 + PICS: " !TVOCCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F02 + PICS: TVOCCONC.S.F02 && TVOCCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F02 + PICS: " !TVOCCONC.S.F02 && !TVOCCONC.S.F01 " response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F03 + PICS: TVOCCONC.S.F03 && TVOCCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F03 + PICS: " !TVOCCONC.S.F03 && !TVOCCONC.S.F01" response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F04 + PICS: TVOCCONC.S.F04 && TVOCCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F04 + PICS: " !TVOCCONC.S.F04 && !TVOCCONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F05 + PICS: TVOCCONC.S.F05 && TVOCCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F05 + PICS: " !TVOCCONC.S.F05 && !TVOCCONC.S.F00 " response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && TVOCCONC.S.A0007 && TVOCCONC.S.F00 + PICS: TVOCCONC.S.A0007 && TVOCCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when TVOCCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && !TVOCCONC.S.A0007 + PICS: " !TVOCCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && TVOCCONC.S.F00 + PICS: TVOCCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when TVOCCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && !TVOCCONC.S.F00 + PICS: " !TVOCCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && TVOCCONC.S.F04 + PICS: TVOCCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when TVOCCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && !TVOCCONC.S.F04 + PICS: " !TVOCCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && TVOCCONC.S.F05 + PICS: TVOCCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: TVOCCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && !TVOCCONC.S.F05 + PICS: " !TVOCCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && TVOCCONC.S.F01 + PICS: TVOCCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: TVOCCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && !TVOCCONC.S.F01 + PICS: " !TVOCCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5l: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: TVOCCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: TVOCCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml deleted file mode 100644 index 87a9a977a1a714..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 95.3.1. [TC-ULABEL-3.1] User label cluster [DUT-client] - -PICS: - - ULABEL.C - -config: - nodeId: 0x12344321 - cluster: "User Label" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Step 1: Read attribute: LabelList" - PICS: ULABEL.C.A0000 - wait: "readAttribute" - attribute: "LabelList" - - - label: "Step 2: write attribute: LabelList" - PICS: ULABEL.C.A0000 - wait: "writeAttribute" - attribute: "LabelList" - arguments: - value: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 4267b90a2388dc..24826e89021967 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -340,6 +340,8 @@ DISHM.S.A0003=1 DISHM.S.C00.Rsp=1 DISHM.S.C01.Tx=1 +PIXIT.DISHM.CAN_TEST_MODE_FAILURE=1 + # MEDIA CLUSTER # App Launcher APPLAUNCHER.S=1 @@ -673,6 +675,10 @@ G.S.C04.Rsp=0 S.S.AM=0 S.S.AO=0 S.S.F00=0 +S.S.F01=0 +S.S.F02=0 +S.S.F03=0 +PICS_SC_RECALL_SCENE_TRANSITION_TIME=1 S.C=0 S.C.C00.Tx=0 @@ -775,6 +781,8 @@ LWM.S.F00=1 LWM.S.C00.Rsp=1 LWM.S.C01.Tx=1 +PIXIT.LWM.CAN_TEST_MODE_FAILURE=1 + # Time Format Localization Cluster LTIME.S=1 LTIME.S.A0000=1 @@ -1950,6 +1958,7 @@ TSTAT.S.F02=0 TSTAT.S.F03=0 TSTAT.S.F04=0 TSTAT.S.F05=1 +TSTAT.S.F06=0 TSTAT.S.A0000=1 TSTAT.S.A0001=0 @@ -2082,13 +2091,7 @@ DESC.S.A0000=1 DESC.S.A0001=1 DESC.S.A0002=1 DESC.S.A0003=1 - -DESC.S.Afffd=1 -DESC.S.Afffc=1 -DESC.S.Afffb=1 -DESC.S.Afffa=1 -DESC.S.Afff9=1 -DESC.S.Afff8=1 +DESC.S.A0004=1 DESC.C=1 DESC.C.A0000=1 @@ -2181,6 +2184,7 @@ BRBINFO.C.E02=1 BRBINFO.C.E03=1 # Interaction Data Model +ICDM.S=1 MCORE.IDM.C=1 MCORE.IDM.C.InvokeRequest=1 MCORE.IDM.C.ReadRequest=1 @@ -2325,12 +2329,6 @@ CDOCONC.S.A0007=1 CDOCONC.S.A0008=1 CDOCONC.S.A0009=1 CDOCONC.S.A000a=1 -CDOCONC.S.Afff8=1 -CDOCONC.S.Afff9=1 -CDOCONC.S.Afffa=1 -CDOCONC.S.Afffb=1 -CDOCONC.S.Afffc=1 -CDOCONC.S.Afffd=1 CMOCONC.C=0 CMOCONC.S=1 @@ -2351,12 +2349,6 @@ CMOCONC.S.A0007=1 CMOCONC.S.A0008=1 CMOCONC.S.A0009=1 CMOCONC.S.A000a=1 -CMOCONC.S.Afff8=1 -CMOCONC.S.Afff9=1 -CMOCONC.S.Afffa=1 -CMOCONC.S.Afffb=1 -CMOCONC.S.Afffc=1 -CMOCONC.S.Afffd=1 NDOCONC.C=0 NDOCONC.S=1 @@ -2377,12 +2369,6 @@ NDOCONC.S.A0007=1 NDOCONC.S.A0008=1 NDOCONC.S.A0009=1 NDOCONC.S.A000a=1 -NDOCONC.S.Afff8=1 -NDOCONC.S.Afff9=1 -NDOCONC.S.Afffa=1 -NDOCONC.S.Afffb=1 -NDOCONC.S.Afffc=1 -NDOCONC.S.Afffd=1 OZCONC.C=0 OZCONC.S=1 @@ -2403,12 +2389,6 @@ OZCONC.S.A0007=1 OZCONC.S.A0008=1 OZCONC.S.A0009=1 OZCONC.S.A000a=1 -OZCONC.S.Afff8=1 -OZCONC.S.Afff9=1 -OZCONC.S.Afffa=1 -OZCONC.S.Afffb=1 -OZCONC.S.Afffc=1 -OZCONC.S.Afffd=1 PMICONC.C=0 PMICONC.S=1 @@ -2429,12 +2409,6 @@ PMICONC.S.A0007=1 PMICONC.S.A0008=1 PMICONC.S.A0009=1 PMICONC.S.A000a=1 -PMICONC.S.Afff8=1 -PMICONC.S.Afff9=1 -PMICONC.S.Afffa=1 -PMICONC.S.Afffb=1 -PMICONC.S.Afffc=1 -PMICONC.S.Afffd=1 FLDCONC.C=0 FLDCONC.S=1 @@ -2455,12 +2429,6 @@ FLDCONC.S.A0007=1 FLDCONC.S.A0008=1 FLDCONC.S.A0009=1 FLDCONC.S.A000a=1 -FLDCONC.S.Afff8=1 -FLDCONC.S.Afff9=1 -FLDCONC.S.Afffa=1 -FLDCONC.S.Afffb=1 -FLDCONC.S.Afffc=1 -FLDCONC.S.Afffd=1 PMHCONC.C=0 PMHCONC.S=1 @@ -2481,12 +2449,6 @@ PMHCONC.S.A0007=1 PMHCONC.S.A0008=1 PMHCONC.S.A0009=1 PMHCONC.S.A000a=1 -PMHCONC.S.Afff8=1 -PMHCONC.S.Afff9=1 -PMHCONC.S.Afffa=1 -PMHCONC.S.Afffb=1 -PMHCONC.S.Afffc=1 -PMHCONC.S.Afffd=1 PMKCONC.C=0 PMKCONC.S=1 @@ -2507,12 +2469,6 @@ PMKCONC.S.A0007=1 PMKCONC.S.A0008=1 PMKCONC.S.A0009=1 PMKCONC.S.A000a=1 -PMKCONC.S.Afff8=1 -PMKCONC.S.Afff9=1 -PMKCONC.S.Afffa=1 -PMKCONC.S.Afffb=1 -PMKCONC.S.Afffc=1 -PMKCONC.S.Afffd=1 TVOCCONC.C=0 TVOCCONC.S=1 @@ -2533,12 +2489,6 @@ TVOCCONC.S.A0007=1 TVOCCONC.S.A0008=1 TVOCCONC.S.A0009=1 TVOCCONC.S.A000a=1 -TVOCCONC.S.Afff8=1 -TVOCCONC.S.Afff9=1 -TVOCCONC.S.Afffa=1 -TVOCCONC.S.Afffb=1 -TVOCCONC.S.Afffc=1 -TVOCCONC.S.Afffd=1 # TEMPERATURE CONTROL CLUSTER @@ -2582,12 +2532,6 @@ RNCONC.S.A0007=1 RNCONC.S.A0008=1 RNCONC.S.A0009=1 RNCONC.S.A000a=1 -RNCONC.S.Afff8=1 -RNCONC.S.Afff9=1 -RNCONC.S.Afffa=1 -RNCONC.S.Afffb=1 -RNCONC.S.Afffc=1 -RNCONC.S.Afffd=1 # REFRIGERATOR ALARM CLUSTER REFALM.S=1 @@ -2623,6 +2567,8 @@ RVCCLEANM.S.F00=1 RVCCLEANM.S.C00.Rsp=1 RVCCLEANM.S.C01.Tx=1 +PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE=1 + # RVC OPERATIONAL STATE CLUSTER RVCOPSTATE.S=1 RVCOPSTATE.C=1 @@ -2641,8 +2587,8 @@ RVCOPSTATE.S.A0005=1 #Commands RVCOPSTATE.S.C00.Rsp=1 -RVCOPSTATE.S.C01.Rsp=1 -RVCOPSTATE.S.C02.Rsp=1 +RVCOPSTATE.S.C01.Rsp=0 +RVCOPSTATE.S.C02.Rsp=0 RVCOPSTATE.S.C03.Rsp=1 RVCOPSTATE.S.C04.Tx=1 RVCOPSTATE.C.C00.Tx=1 @@ -2666,6 +2612,8 @@ RVCRUNM.S.Afffa=1 RVCRUNM.S.C00.Rsp=1 RVCRUNM.S.C01.Tx=1 +PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE=1 + #Refrigerator and Temperature Controlled Cabinet Mode Cluster(TCCM) TCCM.S=1 @@ -2737,19 +2685,8 @@ ICDM.S.C03.Rsp=1 ICDM.C.C00.Rsp=1 ICDM.S.C01.Tx=1 -#RVC Clean Mode Select -RVCCLEANMS.S.F00=1 -RVCCLEANMS.S.F01=0 -RVCCLEANMS.S.F02=0 -#Attributes: -RVCCLEANMS.S.A0004=1 -RVCCLEANMS.S.A0005=1 -#Commands: -RVCCLEANMS.S.C00.Rsp=1 -RVCCLEANMS.S.C01.Rsp=1 -RVCCLEANMS.S.C03.Tx=1 # Smoke CO Alarm Cluster SMOKECO.S=1 @@ -2797,6 +2734,8 @@ TCCM.S.A0003=1 TCCM.S.C00.Rsp=1 TCCM.S.C01.Tx=1 +PIXIT.TCCM.CAN_TEST_MODE_FAILURE=1 + #Temperature Control TCTL.S=1 TCTL.C=1 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 30f793e64c6f46..25ba9a6b338a2b 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -73,6 +73,7 @@ ], "GeneralCommissioning": ["Test_TC_CGEN_1_1", "Test_TC_CGEN_2_1"], "GeneralDiagnostics": ["Test_TC_DGGEN_1_1", "Test_TC_DGGEN_2_1"], + "GroupKeyManagement": ["Test_TC_GRPKEY_1_1"], "IcdManagement": ["Test_TC_ICDM_1_1", "Test_TC_ICDM_2_1"], "Identify": [ "Test_TC_I_1_1", @@ -301,6 +302,7 @@ "Test_TC_G_2_1" ], "Scenes": ["Test_TC_S_1_1"], + "RVCOperationalState": ["Test_TC_RVCOPSTATE_1_1"], "ResourceMonitoring": [ "TestActivatedCarbonFilterMonitoring", "TestHepaFilterMonitoring", @@ -351,6 +353,7 @@ "FanControl", "GeneralCommissioning", "GeneralDiagnostics", + "GroupKeyManagement", "IcdManagement", "Identify", "IlluminanceMeasurement", @@ -373,6 +376,7 @@ "SecureChannel", "SmokeCOAlarm", "Switch", + "RVCOperationalState", "TemperatureMeasurement", "Thermostat", "ThermostatUserConfiguration", diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index cde28a356d9e97..c57af2d95df63d 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -40,6 +40,7 @@ "TestGroupDemoConfig", "Test_TC_G_2_2", "Test_TC_G_2_3", + "Test_TC_G_2_4", "Test_TC_G_3_2" ], "BulkDataExchangeProtocol": [ @@ -102,9 +103,6 @@ "Test_TC_CNET_4_14", "Test_TC_CNET_4_15", "Test_TC_CNET_4_16", - "Test_TC_CNET_4_17", - "Test_TC_CNET_4_18", - "Test_TC_CNET_4_19", "Test_TC_CNET_4_20", "Test_TC_CNET_4_21", "Test_TC_CNET_4_22" @@ -115,13 +113,9 @@ "Test_TC_DLOG_3_1" ], "Descriptor": ["Test_TC_DESC_2_1"], - "FanControl": ["Test_TC_FAN_3_3", "Test_TC_FAN_3_5"], + "FanControl": [], "GeneralCommissioning": ["Test_TC_CGEN_2_2"], - "GeneralDiagnostics": [ - "Test_TC_DGGEN_2_2", - "Test_TC_DGGEN_2_3", - "Test_TC_DGGEN_3_1" - ], + "GeneralDiagnostics": ["Test_TC_DGGEN_2_2", "Test_TC_DGGEN_2_3"], "Identify": ["Test_TC_I_3_2"], "IcdManagement": ["Test_TC_ICDM_2_2", "Test_TC_ICDM_2_3"], "IlluminanceMeasurement": [], @@ -142,7 +136,9 @@ "Test_TC_IDM_6_3", "Test_TC_IDM_6_4", "Test_TC_IDM_7_1", - "Test_TC_IDM_8_1" + "Test_TC_IDM_8_1", + "Test_TC_IDM_10_1", + "Test_TC_IDM_11_1" ], "MediaControl": [ "Test_TC_LOWPOWER_2_2", @@ -191,7 +187,9 @@ "Test_TC_CADMIN_1_10", "Test_TC_CADMIN_1_13", "Test_TC_CADMIN_1_23", - "Test_TC_CADMIN_1_24" + "Test_TC_CADMIN_1_24", + "Test_TC_CADMIN_1_25", + "Test_TC_CADMIN_1_26" ], "ModeSelect": [ "Test_TC_MOD_1_2", @@ -267,9 +265,9 @@ "Test_TC_CC_9_2", "Test_TC_CC_9_3" ], - "DoorLock": ["Test_TC_DRLK_2_10", "Test_TC_DRLK_3_2", "Test_TC_DRLK_3_3"], + "DoorLock": ["Test_TC_DRLK_2_10", "Test_TC_DRLK_3_2"], "LocalizationConfiguration": ["Test_TC_LCFG_2_1"], - "LevelControl": ["Test_TC_LVL_8_1"], + "LevelControl": [], "LaundryWasherMode": [ "Test_TC_LWM_1_1", "Test_TC_LWM_1_2", @@ -331,23 +329,19 @@ "Test_TC_TCTL_3_3" ], "TemperatureMeasurement": ["Test_TC_TMP_2_2"], - "Thermostat": ["Test_TC_TSTAT_3_1", "Test_TC_TSTAT_3_2"], + "Thermostat": ["Test_TC_TSTAT_3_2"], "ThermostatUserConfiguration": [], "ThreadNetworkDiagnostics": ["Test_TC_DGTHREAD_2_5"], "Actions": ["Test_TC_ACT_2_1", "Test_TC_ACT_2_2", "Test_TC_ACT_3_2"], - "TimeFormatLocalization": ["Test_TC_LTIME_2_1", "Test_TC_LTIME_3_1"], - "TimeSynchronization": ["Test_TC_TIMESYNC_2_15"], + "TimeFormatLocalization": ["Test_TC_LTIME_3_1"], + "TimeSynchronization": [], "UnitLocalization": [], "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], "Scenes": [ "Test_TC_S_1_1", "Test_TC_S_2_1", - "Test_TC_S_2_2", - "Test_TC_S_2_3", - "Test_TC_S_2_4", "Test_TC_S_2_5", - "Test_TC_S_2_6", - "Test_TC_S_3_1" + "Test_TC_S_2_6" ], "PumpConfigurationControl": [], "AccessControl": [], diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index babc6688ad45c1..8cb41b167169cc 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -129,15 +129,6 @@ CHIP_ERROR DeviceController::Init(ControllerInitParams params) if (params.operationalKeypair != nullptr || !params.controllerNOC.empty() || !params.controllerRCAC.empty()) { ReturnErrorOnFailure(InitControllerNOCChain(params)); - - if (params.enableServerInteractions) - { - // - // Advertise our operational identity on the network to facilitate discovery by clients that look to - // establish CASE with a controller that is also offering server-side capabilities (e.g an OTA provider). - // - app::DnssdServer::Instance().AdvertiseOperational(); - } } mSystemState = params.systemState->Retain(); @@ -239,6 +230,9 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & CHIP_ERROR err = CHIP_NO_ERROR; + auto advertiseOperational = + params.enableServerInteractions ? FabricTable::AdvertiseIdentity::Yes : FabricTable::AdvertiseIdentity::No; + // // We permit colliding fabrics when multiple controllers are present on the same logical fabric // since each controller is associated with a unique FabricInfo 'identity' object and consequently, @@ -261,7 +255,7 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & if (fabricFoundInTable) { err = fabricTable->UpdatePendingFabricWithProvidedOpKey(fabricIndex, nocSpan, icacSpan, externalOperationalKeypair, - hasExternallyOwnedKeypair); + hasExternallyOwnedKeypair, advertiseOperational); } else // CASE 2: New fabric with injected key @@ -269,8 +263,9 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & err = fabricTable->AddNewPendingTrustedRootCert(rcacSpan); if (err == CHIP_NO_ERROR) { - err = fabricTable->AddNewPendingFabricWithProvidedOpKey( - nocSpan, icacSpan, newFabricVendorId, externalOperationalKeypair, hasExternallyOwnedKeypair, &fabricIndex); + err = fabricTable->AddNewPendingFabricWithProvidedOpKey(nocSpan, icacSpan, newFabricVendorId, + externalOperationalKeypair, hasExternallyOwnedKeypair, + &fabricIndex, advertiseOperational); } } } @@ -283,7 +278,7 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & { VerifyOrReturnError(fabricTable->HasOperationalKeyForFabric(fabricIndex), CHIP_ERROR_KEY_NOT_FOUND); - err = fabricTable->UpdatePendingFabricWithOperationalKeystore(fabricIndex, nocSpan, icacSpan); + err = fabricTable->UpdatePendingFabricWithOperationalKeystore(fabricIndex, nocSpan, icacSpan, advertiseOperational); } else // CASE 4: New fabric with operational keystore @@ -291,7 +286,8 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & err = fabricTable->AddNewPendingTrustedRootCert(rcacSpan); if (err == CHIP_NO_ERROR) { - err = fabricTable->AddNewPendingFabricWithOperationalKeystore(nocSpan, icacSpan, newFabricVendorId, &fabricIndex); + err = fabricTable->AddNewPendingFabricWithOperationalKeystore(nocSpan, icacSpan, newFabricVendorId, &fabricIndex, + advertiseOperational); } if (err == CHIP_NO_ERROR) diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 2d85fdce3068e4..b328ef68d9a47c 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -702,6 +702,8 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, mDeviceAttestationVerifier = deviceAttestationVerifier; } + Credentials::DeviceAttestationVerifier * GetDeviceAttestationVerifier() const { return mDeviceAttestationVerifier; } + Optional GetCommissioningParameters() { return mDefaultCommissioner == nullptr ? NullOptional : MakeOptional(mDefaultCommissioner->GetCommissioningParameters()); diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index c57cb9a57dd28c..e6392e8440739a 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -256,13 +256,6 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) // Consequently, reach in set the fabric table pointer to point to the right version. // app::DnssdServer::Instance().SetFabricTable(stateParams.fabricTable); - - // - // Start up the DNS-SD server. We are not giving it a - // CommissioningModeProvider, so it will not claim we are in - // commissioning mode. - // - chip::app::DnssdServer::Instance().StartServer(); } stateParams.sessionSetupPool = Platform::New(); @@ -315,6 +308,18 @@ void DeviceControllerFactory::PopulateInitParams(ControllerInitParams & controll controllerParams.enableServerInteractions = params.enableServerInteractions; } +void DeviceControllerFactory::ControllerInitialized(const DeviceController & controller) +{ + if (mEnableServerInteractions && controller.GetFabricIndex() != kUndefinedFabricIndex) + { + // Restart DNS-SD advertising, because initialization of this controller could + // have modified whether a particular fabric identity should be + // advertised. Just calling AdvertiseOperational() is not good enough + // here, since we might be removing advertising. + app::DnssdServer::Instance().StartServer(); + } +} + CHIP_ERROR DeviceControllerFactory::SetupController(SetupParams params, DeviceController & controller) { VerifyOrReturnError(mSystemState != nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -326,6 +331,12 @@ CHIP_ERROR DeviceControllerFactory::SetupController(SetupParams params, DeviceCo PopulateInitParams(controllerParams, params); CHIP_ERROR err = controller.Init(controllerParams); + + if (err == CHIP_NO_ERROR) + { + ControllerInitialized(controller); + } + return err; } @@ -347,6 +358,12 @@ CHIP_ERROR DeviceControllerFactory::SetupCommissioner(SetupParams params, Device commissionerParams.deviceAttestationVerifier = params.deviceAttestationVerifier; CHIP_ERROR err = commissioner.Init(commissionerParams); + + if (err == CHIP_NO_ERROR) + { + ControllerInitialized(commissioner); + } + return err; } diff --git a/src/controller/CHIPDeviceControllerFactory.h b/src/controller/CHIPDeviceControllerFactory.h index 04855d62cfc3d2..ad1376eca9d301 100644 --- a/src/controller/CHIPDeviceControllerFactory.h +++ b/src/controller/CHIPDeviceControllerFactory.h @@ -252,6 +252,7 @@ class DeviceControllerFactory void PopulateInitParams(ControllerInitParams & controllerParams, const SetupParams & params); CHIP_ERROR InitSystemState(FactoryInitParams params); CHIP_ERROR InitSystemState(); + void ControllerInitialized(const DeviceController & controller); uint16_t mListenPort; DeviceControllerSystemState * mSystemState = nullptr; diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index ee227cf1cf4c06..e967b0bd007936 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -300,8 +300,43 @@ kotlin_library("onboardingpayload_qr_code_test") { kotlinc_flags = [ "-Xlint:deprecation" ] } +kotlin_library("chipcluster") { + import( + "${chip_root}/src/controller/java/src/chip/devicecontroller/cluster/files.gni") + + output_name = "CHIPClusters.jar" + + deps = [ ":tlv" ] + + sources = [ "src/chip/devicecontroller/cluster/TlvReaderExtension.kt" ] + + sources += structs_sources + sources += eventstructs_sources + + kotlinc_flags = [ "-Xlint:deprecation" ] +} + +kotlin_library("chipcluster_test") { + output_name = "CHIPClustersTest.jar" + + deps = [ + ":chipcluster", + ":tlv", + "${chip_root}/third_party/java_deps:junit-4", + "${chip_root}/third_party/java_deps:truth", + ] + + sources = [ + "tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt", + "tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt", + ] + + kotlinc_flags = [ "-Xlint:deprecation" ] +} + group("unit_tests") { deps = [ + ":chipcluster_test", ":json_to_tlv_to_json_test", ":onboardingpayload_manual_code_test", ":onboardingpayload_qr_code_test", @@ -311,10 +346,26 @@ group("unit_tests") { ] } +android_library("chipclusterID") { + output_name = "CHIPClusterID.jar" + + sources = [ + "generated/java/chip/devicecontroller/ClusterIDMapping.java", + "src/chip/devicecontroller/ChipIdLookup.java", + ] + + javac_flags = [ + "-Xlint:deprecation", + "-parameters", # Store infomation about method parameters + ] +} + android_library("java") { output_name = "CHIPController.jar" deps = [ + ":chipcluster", + ":chipclusterID", ":tlv", "${chip_root}/third_party/java_deps:annotation", ] @@ -322,7 +373,6 @@ android_library("java") { data_deps = [ ":jni" ] sources = [ - "generated/java/chip/devicecontroller/ClusterIDMapping.java", "src/chip/devicecontroller/AttestationInfo.java", "src/chip/devicecontroller/AttestationTrustStoreDelegate.java", "src/chip/devicecontroller/CSRInfo.java", @@ -330,7 +380,6 @@ android_library("java") { "src/chip/devicecontroller/ChipCommandType.java", "src/chip/devicecontroller/ChipDeviceController.java", "src/chip/devicecontroller/ChipDeviceControllerException.java", - "src/chip/devicecontroller/ChipIdLookup.java", "src/chip/devicecontroller/ControllerParams.java", "src/chip/devicecontroller/DeviceAttestationDelegate.java", "src/chip/devicecontroller/DiscoveredDevice.java", diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt new file mode 100644 index 00000000000000..e926e70d861c20 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt @@ -0,0 +1,115 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AccessControlClusterAccessControlEntryChangedEvent( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlEntryChangedEvent {\n") + append("\tadminNodeID : $adminNodeID\n") + append("\tadminPasscodeID : $adminPasscodeID\n") + append("\tchangeType : $changeType\n") + append("\tlatestValue : $latestValue\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (adminNodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } + if (adminPasscodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } + put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) + if (latestValue != null) { + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ADMIN_NODE_I_D = 1 + private const val TAG_ADMIN_PASSCODE_I_D = 2 + private const val TAG_CHANGE_TYPE = 3 + private const val TAG_LATEST_VALUE = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlEntryChangedEvent { + tlvReader.enterStructure(tag) + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } + val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) + val latestValue = + if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlEntryChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt new file mode 100644 index 00000000000000..e01b81cec705bb --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt @@ -0,0 +1,115 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AccessControlClusterAccessControlExtensionChangedEvent( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlExtensionChangedEvent {\n") + append("\tadminNodeID : $adminNodeID\n") + append("\tadminPasscodeID : $adminPasscodeID\n") + append("\tchangeType : $changeType\n") + append("\tlatestValue : $latestValue\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (adminNodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } + if (adminPasscodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } + put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) + if (latestValue != null) { + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ADMIN_NODE_I_D = 1 + private const val TAG_ADMIN_PASSCODE_I_D = 2 + private const val TAG_CHANGE_TYPE = 3 + private const val TAG_LATEST_VALUE = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlExtensionChangedEvent { + tlvReader.enterStructure(tag) + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } + val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) + val latestValue = + if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlExtensionChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt new file mode 100644 index 00000000000000..d2e375338f705d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ActionsClusterActionFailedEvent( + val actionID: Int, + val invokeID: Long, + val newState: Int, + val error: Int +) { + override fun toString(): String = buildString { + append("ActionsClusterActionFailedEvent {\n") + append("\tactionID : $actionID\n") + append("\tinvokeID : $invokeID\n") + append("\tnewState : $newState\n") + append("\terror : $error\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTION_I_D), actionID) + put(ContextSpecificTag(TAG_INVOKE_I_D), invokeID) + put(ContextSpecificTag(TAG_NEW_STATE), newState) + put(ContextSpecificTag(TAG_ERROR), error) + endStructure() + } + } + + companion object { + private const val TAG_ACTION_I_D = 0 + private const val TAG_INVOKE_I_D = 1 + private const val TAG_NEW_STATE = 2 + private const val TAG_ERROR = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent { + tlvReader.enterStructure(tag) + val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) + val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) + val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) + val error = tlvReader.getInt(ContextSpecificTag(TAG_ERROR)) + + tlvReader.exitContainer() + + return ActionsClusterActionFailedEvent(actionID, invokeID, newState, error) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt new file mode 100644 index 00000000000000..05ad68aae272ea --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val newState: Int) { + override fun toString(): String = buildString { + append("ActionsClusterStateChangedEvent {\n") + append("\tactionID : $actionID\n") + append("\tinvokeID : $invokeID\n") + append("\tnewState : $newState\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTION_I_D), actionID) + put(ContextSpecificTag(TAG_INVOKE_I_D), invokeID) + put(ContextSpecificTag(TAG_NEW_STATE), newState) + endStructure() + } + } + + companion object { + private const val TAG_ACTION_I_D = 0 + private const val TAG_INVOKE_I_D = 1 + private const val TAG_NEW_STATE = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterStateChangedEvent { + tlvReader.enterStructure(tag) + val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) + val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) + val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) + + tlvReader.exitContainer() + + return ActionsClusterStateChangedEvent(actionID, invokeID, newState) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt new file mode 100644 index 00000000000000..962ed26cddb40d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BasicInformationClusterLeaveEvent(val fabricIndex: Int) { + override fun toString(): String = buildString { + append("BasicInformationClusterLeaveEvent {\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_INDEX = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { + tlvReader.enterStructure(tag) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return BasicInformationClusterLeaveEvent(fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt new file mode 100644 index 00000000000000..c40211aa617dcc --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { + override fun toString(): String = buildString { + append("BasicInformationClusterReachableChangedEvent {\n") + append("\treachableNewValue : $reachableNewValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE), reachableNewValue) + endStructure() + } + } + + companion object { + private const val TAG_REACHABLE_NEW_VALUE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { + tlvReader.enterStructure(tag) + val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) + + tlvReader.exitContainer() + + return BasicInformationClusterReachableChangedEvent(reachableNewValue) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt new file mode 100644 index 00000000000000..23082666b05cae --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BasicInformationClusterStartUpEvent(val softwareVersion: Long) { + override fun toString(): String = buildString { + append("BasicInformationClusterStartUpEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { + tlvReader.enterStructure(tag) + val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + + tlvReader.exitContainer() + + return BasicInformationClusterStartUpEvent(softwareVersion) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt new file mode 100644 index 00000000000000..a0ecfb76141580 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { + override fun toString(): String = buildString { + append("BooleanStateClusterStateChangeEvent {\n") + append("\tstateValue : $stateValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_STATE_VALUE), stateValue) + endStructure() + } + } + + companion object { + private const val TAG_STATE_VALUE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { + tlvReader.enterStructure(tag) + val stateValue = tlvReader.getBoolean(ContextSpecificTag(TAG_STATE_VALUE)) + + tlvReader.exitContainer() + + return BooleanStateClusterStateChangeEvent(stateValue) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt new file mode 100644 index 00000000000000..e75b2f7af96f93 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { + override fun toString(): String = buildString { + append("BridgedDeviceBasicInformationClusterReachableChangedEvent {\n") + append("\treachableNewValue : $reachableNewValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE), reachableNewValue) + endStructure() + } + } + + companion object { + private const val TAG_REACHABLE_NEW_VALUE = 0 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterReachableChangedEvent { + tlvReader.enterStructure(tag) + val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) + + tlvReader.exitContainer() + + return BridgedDeviceBasicInformationClusterReachableChangedEvent(reachableNewValue) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt new file mode 100644 index 00000000000000..80c60be6847056 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: Long) { + override fun toString(): String = buildString { + append("BridgedDeviceBasicInformationClusterStartUpEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BridgedDeviceBasicInformationClusterStartUpEvent { + tlvReader.enterStructure(tag) + val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + + tlvReader.exitContainer() + + return BridgedDeviceBasicInformationClusterStartUpEvent(softwareVersion) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt new file mode 100644 index 00000000000000..0b7206788e842a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DishwasherAlarmClusterNotifyEvent( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long +) { + override fun toString(): String = buildString { + append("DishwasherAlarmClusterNotifyEvent {\n") + append("\tactive : $active\n") + append("\tinactive : $inactive\n") + append("\tstate : $state\n") + append("\tmask : $mask\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTIVE), active) + put(ContextSpecificTag(TAG_INACTIVE), inactive) + put(ContextSpecificTag(TAG_STATE), state) + put(ContextSpecificTag(TAG_MASK), mask) + endStructure() + } + } + + companion object { + private const val TAG_ACTIVE = 0 + private const val TAG_INACTIVE = 1 + private const val TAG_STATE = 2 + private const val TAG_MASK = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherAlarmClusterNotifyEvent { + tlvReader.enterStructure(tag) + val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) + val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) + val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) + val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) + + tlvReader.exitContainer() + + return DishwasherAlarmClusterNotifyEvent(active, inactive, state, mask) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt new file mode 100644 index 00000000000000..6417fb85009e88 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DoorLockClusterDoorLockAlarmEvent(val alarmCode: Int) { + override fun toString(): String = buildString { + append("DoorLockClusterDoorLockAlarmEvent {\n") + append("\talarmCode : $alarmCode\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_CODE), alarmCode) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_CODE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { + tlvReader.enterStructure(tag) + val alarmCode = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_CODE)) + + tlvReader.exitContainer() + + return DoorLockClusterDoorLockAlarmEvent(alarmCode) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt new file mode 100644 index 00000000000000..d0b6acbe7ea227 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DoorLockClusterDoorStateChangeEvent(val doorState: Int) { + override fun toString(): String = buildString { + append("DoorLockClusterDoorStateChangeEvent {\n") + append("\tdoorState : $doorState\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_DOOR_STATE), doorState) + endStructure() + } + } + + companion object { + private const val TAG_DOOR_STATE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { + tlvReader.enterStructure(tag) + val doorState = tlvReader.getInt(ContextSpecificTag(TAG_DOOR_STATE)) + + tlvReader.exitContainer() + + return DoorLockClusterDoorStateChangeEvent(doorState) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt new file mode 100644 index 00000000000000..59e38fa054dd87 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt @@ -0,0 +1,159 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class DoorLockClusterLockOperationErrorEvent( + val lockOperationType: Int, + val operationSource: Int, + val operationError: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { + append("DoorLockClusterLockOperationErrorEvent {\n") + append("\tlockOperationType : $lockOperationType\n") + append("\toperationSource : $operationSource\n") + append("\toperationError : $operationError\n") + append("\tuserIndex : $userIndex\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tsourceNode : $sourceNode\n") + append("\tcredentials : $credentials\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) + put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) + put(ContextSpecificTag(TAG_OPERATION_ERROR), operationError) + if (userIndex != null) { + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } + if (fabricIndex != null) { + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } + if (sourceNode != null) { + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } + if (credentials != null) { + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } + endStructure() + } + } + + companion object { + private const val TAG_LOCK_OPERATION_TYPE = 0 + private const val TAG_OPERATION_SOURCE = 1 + private const val TAG_OPERATION_ERROR = 2 + private const val TAG_USER_INDEX = 3 + private const val TAG_FABRIC_INDEX = 4 + private const val TAG_SOURCE_NODE = 5 + private const val TAG_CREDENTIALS = 6 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationErrorEvent { + tlvReader.enterStructure(tag) + val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) + val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + val operationError = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_ERROR)) + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + + tlvReader.exitContainer() + + return DoorLockClusterLockOperationErrorEvent( + lockOperationType, + operationSource, + operationError, + userIndex, + fabricIndex, + sourceNode, + credentials + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt new file mode 100644 index 00000000000000..4fbf71082c7adc --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt @@ -0,0 +1,153 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class DoorLockClusterLockOperationEvent( + val lockOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { + append("DoorLockClusterLockOperationEvent {\n") + append("\tlockOperationType : $lockOperationType\n") + append("\toperationSource : $operationSource\n") + append("\tuserIndex : $userIndex\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tsourceNode : $sourceNode\n") + append("\tcredentials : $credentials\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) + put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) + if (userIndex != null) { + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } + if (fabricIndex != null) { + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } + if (sourceNode != null) { + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } + if (credentials != null) { + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } + endStructure() + } + } + + companion object { + private const val TAG_LOCK_OPERATION_TYPE = 0 + private const val TAG_OPERATION_SOURCE = 1 + private const val TAG_USER_INDEX = 2 + private const val TAG_FABRIC_INDEX = 3 + private const val TAG_SOURCE_NODE = 4 + private const val TAG_CREDENTIALS = 5 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationEvent { + tlvReader.enterStructure(tag) + val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) + val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + + tlvReader.exitContainer() + + return DoorLockClusterLockOperationEvent( + lockOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + credentials + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt new file mode 100644 index 00000000000000..6fc562b39959ff --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt @@ -0,0 +1,132 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DoorLockClusterLockUserChangeEvent( + val lockDataType: Int, + val dataOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val dataIndex: Int? +) { + override fun toString(): String = buildString { + append("DoorLockClusterLockUserChangeEvent {\n") + append("\tlockDataType : $lockDataType\n") + append("\tdataOperationType : $dataOperationType\n") + append("\toperationSource : $operationSource\n") + append("\tuserIndex : $userIndex\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tsourceNode : $sourceNode\n") + append("\tdataIndex : $dataIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LOCK_DATA_TYPE), lockDataType) + put(ContextSpecificTag(TAG_DATA_OPERATION_TYPE), dataOperationType) + put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) + if (userIndex != null) { + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } + if (fabricIndex != null) { + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } + if (sourceNode != null) { + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } + if (dataIndex != null) { + put(ContextSpecificTag(TAG_DATA_INDEX), dataIndex) + } else { + putNull(ContextSpecificTag(TAG_DATA_INDEX)) + } + endStructure() + } + } + + companion object { + private const val TAG_LOCK_DATA_TYPE = 0 + private const val TAG_DATA_OPERATION_TYPE = 1 + private const val TAG_OPERATION_SOURCE = 2 + private const val TAG_USER_INDEX = 3 + private const val TAG_FABRIC_INDEX = 4 + private const val TAG_SOURCE_NODE = 5 + private const val TAG_DATA_INDEX = 6 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockUserChangeEvent { + tlvReader.enterStructure(tag) + val lockDataType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_DATA_TYPE)) + val dataOperationType = tlvReader.getInt(ContextSpecificTag(TAG_DATA_OPERATION_TYPE)) + val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val dataIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) + null + } + + tlvReader.exitContainer() + + return DoorLockClusterLockUserChangeEvent( + lockDataType, + dataOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + dataIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt new file mode 100644 index 00000000000000..3d743983f1a00f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: Int) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterBootReasonEvent {\n") + append("\tbootReason : $bootReason\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_BOOT_REASON), bootReason) + endStructure() + } + } + + companion object { + private const val TAG_BOOT_REASON = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { + tlvReader.enterStructure(tag) + val bootReason = tlvReader.getInt(ContextSpecificTag(TAG_BOOT_REASON)) + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterBootReasonEvent(bootReason) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt new file mode 100644 index 00000000000000..1287eba322b742 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralDiagnosticsClusterHardwareFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterHardwareFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterHardwareFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterHardwareFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt new file mode 100644 index 00000000000000..f9fc3cadc8b934 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralDiagnosticsClusterNetworkFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterNetworkFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterNetworkFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt new file mode 100644 index 00000000000000..35daf8dd691bf5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralDiagnosticsClusterRadioFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterRadioFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterRadioFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt new file mode 100644 index 00000000000000..092e062784a118 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt @@ -0,0 +1,103 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class OperationalStateClusterOperationCompletionEvent( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { + append("OperationalStateClusterOperationCompletionEvent {\n") + append("\tcompletionErrorCode : $completionErrorCode\n") + append("\ttotalOperationalTime : $totalOperationalTime\n") + append("\tpausedTime : $pausedTime\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) + if (totalOperationalTime != null) { + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } + if (pausedTime != null) { + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } + endStructure() + } + } + + companion object { + private const val TAG_COMPLETION_ERROR_CODE = 0 + private const val TAG_TOTAL_OPERATIONAL_TIME = 1 + private const val TAG_PAUSED_TIME = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationCompletionEvent { + tlvReader.enterStructure(tag) + val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + + tlvReader.exitContainer() + + return OperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt new file mode 100644 index 00000000000000..b5623a0d701579 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt @@ -0,0 +1,58 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OperationalStateClusterOperationalErrorEvent( + val errorState: chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct +) { + override fun toString(): String = buildString { + append("OperationalStateClusterOperationalErrorEvent {\n") + append("\terrorState : $errorState\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + errorState.toTlv(ContextSpecificTag(TAG_ERROR_STATE), this) + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { + tlvReader.enterStructure(tag) + val errorState = + chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + + tlvReader.exitContainer() + + return OperationalStateClusterOperationalErrorEvent(errorState) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt new file mode 100644 index 00000000000000..8a82cbf93c9f1f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt @@ -0,0 +1,97 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + val softwareVersion: Long, + val bytesDownloaded: Long, + val progressPercent: Int?, + val platformCode: Long? +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterDownloadErrorEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("\tbytesDownloaded : $bytesDownloaded\n") + append("\tprogressPercent : $progressPercent\n") + append("\tplatformCode : $platformCode\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + put(ContextSpecificTag(TAG_BYTES_DOWNLOADED), bytesDownloaded) + if (progressPercent != null) { + put(ContextSpecificTag(TAG_PROGRESS_PERCENT), progressPercent) + } else { + putNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } + if (platformCode != null) { + put(ContextSpecificTag(TAG_PLATFORM_CODE), platformCode) + } else { + putNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + } + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + private const val TAG_BYTES_DOWNLOADED = 1 + private const val TAG_PROGRESS_PERCENT = 2 + private const val TAG_PLATFORM_CODE = 3 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { + tlvReader.enterStructure(tag) + val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + val bytesDownloaded = tlvReader.getLong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) + val progressPercent = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + null + } + val platformCode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + null + } + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + softwareVersion, + bytesDownloaded, + progressPercent, + platformCode + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt new file mode 100644 index 00000000000000..b0b075689fc3be --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt @@ -0,0 +1,87 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + val previousState: Int, + val newState: Int, + val reason: Int, + val targetSoftwareVersion: Long? +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterStateTransitionEvent {\n") + append("\tpreviousState : $previousState\n") + append("\tnewState : $newState\n") + append("\treason : $reason\n") + append("\ttargetSoftwareVersion : $targetSoftwareVersion\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PREVIOUS_STATE), previousState) + put(ContextSpecificTag(TAG_NEW_STATE), newState) + put(ContextSpecificTag(TAG_REASON), reason) + if (targetSoftwareVersion != null) { + put(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION), targetSoftwareVersion) + } else { + putNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_STATE = 0 + private const val TAG_NEW_STATE = 1 + private const val TAG_REASON = 2 + private const val TAG_TARGET_SOFTWARE_VERSION = 3 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterStateTransitionEvent { + tlvReader.enterStructure(tag) + val previousState = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_STATE)) + val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) + val reason = tlvReader.getInt(ContextSpecificTag(TAG_REASON)) + val targetSoftwareVersion = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + null + } + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + previousState, + newState, + reason, + targetSoftwareVersion + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt new file mode 100644 index 00000000000000..ff1034ace97e31 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( + val softwareVersion: Long, + val productID: Int +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterVersionAppliedEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("\tproductID : $productID\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + put(ContextSpecificTag(TAG_PRODUCT_I_D), productID) + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + private const val TAG_PRODUCT_I_D = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { + tlvReader.enterStructure(tag) + val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + val productID = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_I_D)) + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterVersionAppliedEvent(softwareVersion, productID) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt new file mode 100644 index 00000000000000..c3eb0d1e658b56 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterBatChargeFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatChargeFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatChargeFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt new file mode 100644 index 00000000000000..c010184156ecb3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt new file mode 100644 index 00000000000000..8a06b36fba61d0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterWiredFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterWiredFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt new file mode 100644 index 00000000000000..c116f16ac73229 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class RefrigeratorAlarmClusterNotifyEvent( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long +) { + override fun toString(): String = buildString { + append("RefrigeratorAlarmClusterNotifyEvent {\n") + append("\tactive : $active\n") + append("\tinactive : $inactive\n") + append("\tstate : $state\n") + append("\tmask : $mask\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTIVE), active) + put(ContextSpecificTag(TAG_INACTIVE), inactive) + put(ContextSpecificTag(TAG_STATE), state) + put(ContextSpecificTag(TAG_MASK), mask) + endStructure() + } + } + + companion object { + private const val TAG_ACTIVE = 0 + private const val TAG_INACTIVE = 1 + private const val TAG_STATE = 2 + private const val TAG_MASK = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RefrigeratorAlarmClusterNotifyEvent { + tlvReader.enterStructure(tag) + val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) + val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) + val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) + val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) + + tlvReader.exitContainer() + + return RefrigeratorAlarmClusterNotifyEvent(active, inactive, state, mask) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt new file mode 100644 index 00000000000000..c6afaa9750adf8 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt @@ -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. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RvcOperationalStateClusterOperationCompletionEvent( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterOperationCompletionEvent {\n") + append("\tcompletionErrorCode : $completionErrorCode\n") + append("\ttotalOperationalTime : $totalOperationalTime\n") + append("\tpausedTime : $pausedTime\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) + if (totalOperationalTime != null) { + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } + if (pausedTime != null) { + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } + endStructure() + } + } + + companion object { + private const val TAG_COMPLETION_ERROR_CODE = 0 + private const val TAG_TOTAL_OPERATIONAL_TIME = 1 + private const val TAG_PAUSED_TIME = 2 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationCompletionEvent { + tlvReader.enterStructure(tag) + val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + + tlvReader.exitContainer() + + return RvcOperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt new file mode 100644 index 00000000000000..bf6fed9817f60f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt @@ -0,0 +1,58 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class RvcOperationalStateClusterOperationalErrorEvent( + val errorState: chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterOperationalErrorEvent {\n") + append("\terrorState : $errorState\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + errorState.toTlv(ContextSpecificTag(TAG_ERROR_STATE), this) + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalErrorEvent { + tlvReader.enterStructure(tag) + val errorState = + chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + + tlvReader.exitContainer() + + return RvcOperationalStateClusterOperationalErrorEvent(errorState) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt new file mode 100644 index 00000000000000..2bc948e2a667b1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterCOAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { + tlvReader.enterStructure(tag) + val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterCOAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt new file mode 100644 index 00000000000000..19223606c4685d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterInterconnectCOAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { + tlvReader.enterStructure(tag) + val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterInterconnectCOAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt new file mode 100644 index 00000000000000..38e2fe872915f7 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterInterconnectSmokeAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { + tlvReader.enterStructure(tag) + val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt new file mode 100644 index 00000000000000..ce2d9ad47341d0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterLowBatteryEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { + tlvReader.enterStructure(tag) + val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterLowBatteryEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt new file mode 100644 index 00000000000000..324a5d4461a225 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterSmokeAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { + tlvReader.enterStructure(tag) + val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterSmokeAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt new file mode 100644 index 00000000000000..50b455842e538f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class SoftwareDiagnosticsClusterSoftwareFaultEvent( + val id: Long, + val name: Optional, + val faultRecording: Optional +) { + override fun toString(): String = buildString { + append("SoftwareDiagnosticsClusterSoftwareFaultEvent {\n") + append("\tid : $id\n") + append("\tname : $name\n") + append("\tfaultRecording : $faultRecording\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ID), id) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (faultRecording.isPresent) { + val optfaultRecording = faultRecording.get() + put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) + } + endStructure() + } + } + + companion object { + private const val TAG_ID = 0 + private const val TAG_NAME = 1 + private const val TAG_FAULT_RECORDING = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterSoftwareFaultEvent { + tlvReader.enterStructure(tag) + val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val faultRecording = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return SoftwareDiagnosticsClusterSoftwareFaultEvent(id, name, faultRecording) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt new file mode 100644 index 00000000000000..893412c1f25322 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterInitialPressEvent(val newPosition: Int) { + override fun toString(): String = buildString { + append("SwitchClusterInitialPressEvent {\n") + append("\tnewPosition : $newPosition\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { + tlvReader.enterStructure(tag) + val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterInitialPressEvent(newPosition) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt new file mode 100644 index 00000000000000..3fa420f46ddec3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterLongPressEvent(val newPosition: Int) { + override fun toString(): String = buildString { + append("SwitchClusterLongPressEvent {\n") + append("\tnewPosition : $newPosition\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { + tlvReader.enterStructure(tag) + val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterLongPressEvent(newPosition) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt new file mode 100644 index 00000000000000..eb90698fc735ab --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterLongReleaseEvent(val previousPosition: Int) { + override fun toString(): String = buildString { + append("SwitchClusterLongReleaseEvent {\n") + append("\tpreviousPosition : $previousPosition\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_POSITION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { + tlvReader.enterStructure(tag) + val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterLongReleaseEvent(previousPosition) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt new file mode 100644 index 00000000000000..81141e17424fbb --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterMultiPressCompleteEvent( + val previousPosition: Int, + val totalNumberOfPressesCounted: Int +) { + override fun toString(): String = buildString { + append("SwitchClusterMultiPressCompleteEvent {\n") + append("\tpreviousPosition : $previousPosition\n") + append("\ttotalNumberOfPressesCounted : $totalNumberOfPressesCounted\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) + put(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED), totalNumberOfPressesCounted) + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_POSITION = 0 + private const val TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { + tlvReader.enterStructure(tag) + val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + val totalNumberOfPressesCounted = + tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) + + tlvReader.exitContainer() + + return SwitchClusterMultiPressCompleteEvent(previousPosition, totalNumberOfPressesCounted) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt new file mode 100644 index 00000000000000..11fab26fdfce8e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterMultiPressOngoingEvent( + val newPosition: Int, + val currentNumberOfPressesCounted: Int +) { + override fun toString(): String = buildString { + append("SwitchClusterMultiPressOngoingEvent {\n") + append("\tnewPosition : $newPosition\n") + append("\tcurrentNumberOfPressesCounted : $currentNumberOfPressesCounted\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + put(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED), currentNumberOfPressesCounted) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + private const val TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { + tlvReader.enterStructure(tag) + val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + val currentNumberOfPressesCounted = + tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) + + tlvReader.exitContainer() + + return SwitchClusterMultiPressOngoingEvent(newPosition, currentNumberOfPressesCounted) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt new file mode 100644 index 00000000000000..0eeb9e2841fd7c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterShortReleaseEvent(val previousPosition: Int) { + override fun toString(): String = buildString { + append("SwitchClusterShortReleaseEvent {\n") + append("\tpreviousPosition : $previousPosition\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_POSITION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { + tlvReader.enterStructure(tag) + val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterShortReleaseEvent(previousPosition) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt new file mode 100644 index 00000000000000..2b921b37ac6c2b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterSwitchLatchedEvent(val newPosition: Int) { + override fun toString(): String = buildString { + append("SwitchClusterSwitchLatchedEvent {\n") + append("\tnewPosition : $newPosition\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { + tlvReader.enterStructure(tag) + val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterSwitchLatchedEvent(newPosition) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt new file mode 100644 index 00000000000000..ffdc72b1e54c89 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterConnectionStatusEvent {\n") + append("\tconnectionStatus : $connectionStatus\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CONNECTION_STATUS), connectionStatus) + endStructure() + } + } + + companion object { + private const val TAG_CONNECTION_STATUS = 0 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterConnectionStatusEvent { + tlvReader.enterStructure(tag) + val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt new file mode 100644 index 00000000000000..f9110c39fa1d40 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt new file mode 100644 index 00000000000000..53090f750b4e06 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterDSTStatusEvent {\n") + append("\tDSTOffsetActive : $DSTOffsetActive\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE), DSTOffsetActive) + endStructure() + } + } + + companion object { + private const val TAG_D_S_T_OFFSET_ACTIVE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { + tlvReader.enterStructure(tag) + val DSTOffsetActive = tlvReader.getBoolean(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE)) + + tlvReader.exitContainer() + + return TimeSynchronizationClusterDSTStatusEvent(DSTOffsetActive) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt new file mode 100644 index 00000000000000..452e9d902c4767 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: Optional) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterTimeZoneStatusEvent {\n") + append("\toffset : $offset\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OFFSET), offset) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + endStructure() + } + } + + companion object { + private const val TAG_OFFSET = 0 + private const val TAG_NAME = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { + tlvReader.enterStructure(tag) + val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return TimeSynchronizationClusterTimeZoneStatusEvent(offset, name) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt new file mode 100644 index 00000000000000..8c2e410ab80f6d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt @@ -0,0 +1,111 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterTestEventEvent( + val arg1: Int, + val arg2: Int, + val arg3: Boolean, + val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, + val arg5: List, + val arg6: List +) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestEventEvent {\n") + append("\targ1 : $arg1\n") + append("\targ2 : $arg2\n") + append("\targ3 : $arg3\n") + append("\targ4 : $arg4\n") + append("\targ5 : $arg5\n") + append("\targ6 : $arg6\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ARG1), arg1) + put(ContextSpecificTag(TAG_ARG2), arg2) + put(ContextSpecificTag(TAG_ARG3), arg3) + arg4.toTlv(ContextSpecificTag(TAG_ARG4), this) + startList(ContextSpecificTag(TAG_ARG5)) + for (item in arg5.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + startList(ContextSpecificTag(TAG_ARG6)) + for (item in arg6.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_ARG1 = 1 + private const val TAG_ARG2 = 2 + private const val TAG_ARG3 = 3 + private const val TAG_ARG4 = 4 + private const val TAG_ARG5 = 5 + private const val TAG_ARG6 = 6 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { + tlvReader.enterStructure(tag) + val arg1 = tlvReader.getInt(ContextSpecificTag(TAG_ARG1)) + val arg2 = tlvReader.getInt(ContextSpecificTag(TAG_ARG2)) + val arg3 = tlvReader.getBoolean(ContextSpecificTag(TAG_ARG3)) + val arg4 = + chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_ARG4), + tlvReader + ) + val arg5 = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + val arg6 = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return UnitTestingClusterTestEventEvent(arg1, arg2, arg3, arg4, arg5, arg6) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt new file mode 100644 index 00000000000000..d746c65d5ea1f1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: Int) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestFabricScopedEventEvent {\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { + tlvReader.enterStructure(tag) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestFabricScopedEventEvent(fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt new file mode 100644 index 00000000000000..087484ef1bfa7b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( + val associationFailure: Int, + val status: Int +) { + override fun toString(): String = buildString { + append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n") + append("\tassociationFailure : $associationFailure\n") + append("\tstatus : $status\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ASSOCIATION_FAILURE), associationFailure) + put(ContextSpecificTag(TAG_STATUS), status) + endStructure() + } + } + + companion object { + private const val TAG_ASSOCIATION_FAILURE = 0 + private const val TAG_STATUS = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { + tlvReader.enterStructure(tag) + val associationFailure = tlvReader.getInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) + val status = tlvReader.getInt(ContextSpecificTag(TAG_STATUS)) + + tlvReader.exitContainer() + + return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailure, status) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt new file mode 100644 index 00000000000000..3599597c99b152 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { + override fun toString(): String = buildString { + append("WiFiNetworkDiagnosticsClusterConnectionStatusEvent {\n") + append("\tconnectionStatus : $connectionStatus\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CONNECTION_STATUS), connectionStatus) + endStructure() + } + } + + companion object { + private const val TAG_CONNECTION_STATUS = 0 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterConnectionStatusEvent { + tlvReader.enterStructure(tag) + val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) + + tlvReader.exitContainer() + + return WiFiNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt new file mode 100644 index 00000000000000..6d54ae4f2bfdcd --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: Int) { + override fun toString(): String = buildString { + append("WiFiNetworkDiagnosticsClusterDisconnectionEvent {\n") + append("\treasonCode : $reasonCode\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_REASON_CODE), reasonCode) + endStructure() + } + } + + companion object { + private const val TAG_REASON_CODE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): WiFiNetworkDiagnosticsClusterDisconnectionEvent { + tlvReader.enterStructure(tag) + val reasonCode = tlvReader.getInt(ContextSpecificTag(TAG_REASON_CODE)) + + tlvReader.exitContainer() + + return WiFiNetworkDiagnosticsClusterDisconnectionEvent(reasonCode) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt new file mode 100644 index 00000000000000..6daac4451c1833 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt @@ -0,0 +1,121 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AccessControlClusterAccessControlEntryStruct( + val privilege: Int, + val authMode: Int, + val subjects: List?, + val targets: List?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlEntryStruct {\n") + append("\tprivilege : $privilege\n") + append("\tauthMode : $authMode\n") + append("\tsubjects : $subjects\n") + append("\ttargets : $targets\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRIVILEGE), privilege) + put(ContextSpecificTag(TAG_AUTH_MODE), authMode) + if (subjects != null) { + startList(ContextSpecificTag(TAG_SUBJECTS)) + for (item in subjects.iterator()) { + put(AnonymousTag, item) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_SUBJECTS)) + } + if (targets != null) { + startList(ContextSpecificTag(TAG_TARGETS)) + for (item in targets.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_TARGETS)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_PRIVILEGE = 1 + private const val TAG_AUTH_MODE = 2 + private const val TAG_SUBJECTS = 3 + private const val TAG_TARGETS = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlEntryStruct { + tlvReader.enterStructure(tag) + val privilege = tlvReader.getInt(ContextSpecificTag(TAG_PRIVILEGE)) + val authMode = tlvReader.getInt(ContextSpecificTag(TAG_AUTH_MODE)) + val subjects = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SUBJECTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) + null + } + val targets = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) + while (!tlvReader.isEndOfContainer()) { + add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) + null + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlEntryStruct( + privilege, + authMode, + subjects, + targets, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt new file mode 100644 index 00000000000000..4a1d95221d816c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val fabricIndex: Int) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlExtensionStruct {\n") + append("\tdata : $data\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_DATA), data) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_DATA = 1 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlExtensionStruct { + tlvReader.enterStructure(tag) + val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlExtensionStruct(data, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt new file mode 100644 index 00000000000000..e721aa3fefe91d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt @@ -0,0 +1,94 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AccessControlClusterAccessControlTargetStruct( + val cluster: Long?, + val endpoint: Int?, + val deviceType: Long? +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlTargetStruct {\n") + append("\tcluster : $cluster\n") + append("\tendpoint : $endpoint\n") + append("\tdeviceType : $deviceType\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (cluster != null) { + put(ContextSpecificTag(TAG_CLUSTER), cluster) + } else { + putNull(ContextSpecificTag(TAG_CLUSTER)) + } + if (endpoint != null) { + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + } else { + putNull(ContextSpecificTag(TAG_ENDPOINT)) + } + if (deviceType != null) { + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + } else { + putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + } + endStructure() + } + } + + companion object { + private const val TAG_CLUSTER = 0 + private const val TAG_ENDPOINT = 1 + private const val TAG_DEVICE_TYPE = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { + tlvReader.enterStructure(tag) + val cluster = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) + null + } + val endpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) + null + } + val deviceType = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + null + } + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlTargetStruct(cluster, endpoint, deviceType) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt new file mode 100644 index 00000000000000..2ed7a3f08152be --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt @@ -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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ActionsClusterActionStruct( + val actionID: Int, + val name: String, + val type: Int, + val endpointListID: Int, + val supportedCommands: Int, + val state: Int +) { + override fun toString(): String = buildString { + append("ActionsClusterActionStruct {\n") + append("\tactionID : $actionID\n") + append("\tname : $name\n") + append("\ttype : $type\n") + append("\tendpointListID : $endpointListID\n") + append("\tsupportedCommands : $supportedCommands\n") + append("\tstate : $state\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTION_I_D), actionID) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_TYPE), type) + put(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D), endpointListID) + put(ContextSpecificTag(TAG_SUPPORTED_COMMANDS), supportedCommands) + put(ContextSpecificTag(TAG_STATE), state) + endStructure() + } + } + + companion object { + private const val TAG_ACTION_I_D = 0 + private const val TAG_NAME = 1 + private const val TAG_TYPE = 2 + private const val TAG_ENDPOINT_LIST_I_D = 3 + private const val TAG_SUPPORTED_COMMANDS = 4 + private const val TAG_STATE = 5 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { + tlvReader.enterStructure(tag) + val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) + val supportedCommands = tlvReader.getInt(ContextSpecificTag(TAG_SUPPORTED_COMMANDS)) + val state = tlvReader.getInt(ContextSpecificTag(TAG_STATE)) + + tlvReader.exitContainer() + + return ActionsClusterActionStruct( + actionID, + name, + type, + endpointListID, + supportedCommands, + state + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt new file mode 100644 index 00000000000000..b714e693156957 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ActionsClusterEndpointListStruct( + val endpointListID: Int, + val name: String, + val type: Int, + val endpoints: List +) { + override fun toString(): String = buildString { + append("ActionsClusterEndpointListStruct {\n") + append("\tendpointListID : $endpointListID\n") + append("\tname : $name\n") + append("\ttype : $type\n") + append("\tendpoints : $endpoints\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D), endpointListID) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_TYPE), type) + startList(ContextSpecificTag(TAG_ENDPOINTS)) + for (item in endpoints.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_ENDPOINT_LIST_I_D = 0 + private const val TAG_NAME = 1 + private const val TAG_TYPE = 2 + private const val TAG_ENDPOINTS = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { + tlvReader.enterStructure(tag) + val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + val endpoints = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ActionsClusterEndpointListStruct(endpointListID, name, type, endpoints) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..68a44d37dfff0f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("ActivatedCarbonFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt new file mode 100644 index 00000000000000..21649a8ecc73df --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ApplicationBasicClusterApplicationStruct( + val catalogVendorID: Int, + val applicationID: String +) { + override fun toString(): String = buildString { + append("ApplicationBasicClusterApplicationStruct {\n") + append("\tcatalogVendorID : $catalogVendorID\n") + append("\tapplicationID : $applicationID\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D), catalogVendorID) + put(ContextSpecificTag(TAG_APPLICATION_I_D), applicationID) + endStructure() + } + } + + companion object { + private const val TAG_CATALOG_VENDOR_I_D = 0 + private const val TAG_APPLICATION_I_D = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { + tlvReader.enterStructure(tag) + val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) + val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) + + tlvReader.exitContainer() + + return ApplicationBasicClusterApplicationStruct(catalogVendorID, applicationID) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt new file mode 100644 index 00000000000000..f710204737cb52 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ApplicationLauncherClusterApplicationEPStruct( + val application: ApplicationLauncherClusterApplicationStruct, + val endpoint: Optional +) { + override fun toString(): String = buildString { + append("ApplicationLauncherClusterApplicationEPStruct {\n") + append("\tapplication : $application\n") + append("\tendpoint : $endpoint\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + application.toTlv(ContextSpecificTag(TAG_APPLICATION), this) + if (endpoint.isPresent) { + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } + endStructure() + } + } + + companion object { + private const val TAG_APPLICATION = 0 + private const val TAG_ENDPOINT = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { + tlvReader.enterStructure(tag) + val application = + ApplicationLauncherClusterApplicationStruct.fromTlv( + ContextSpecificTag(TAG_APPLICATION), + tlvReader + ) + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ApplicationLauncherClusterApplicationEPStruct(application, endpoint) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt new file mode 100644 index 00000000000000..68e78e31084c04 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ApplicationLauncherClusterApplicationStruct( + val catalogVendorID: Int, + val applicationID: String +) { + override fun toString(): String = buildString { + append("ApplicationLauncherClusterApplicationStruct {\n") + append("\tcatalogVendorID : $catalogVendorID\n") + append("\tapplicationID : $applicationID\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D), catalogVendorID) + put(ContextSpecificTag(TAG_APPLICATION_I_D), applicationID) + endStructure() + } + } + + companion object { + private const val TAG_CATALOG_VENDOR_I_D = 0 + private const val TAG_APPLICATION_I_D = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { + tlvReader.enterStructure(tag) + val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) + val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) + + tlvReader.exitContainer() + + return ApplicationLauncherClusterApplicationStruct(catalogVendorID, applicationID) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt new file mode 100644 index 00000000000000..aef8596f19a83c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, val name: String) { + override fun toString(): String = buildString { + append("AudioOutputClusterOutputInfoStruct {\n") + append("\tindex : $index\n") + append("\toutputType : $outputType\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_INDEX), index) + put(ContextSpecificTag(TAG_OUTPUT_TYPE), outputType) + put(ContextSpecificTag(TAG_NAME), name) + endStructure() + } + } + + companion object { + private const val TAG_INDEX = 0 + private const val TAG_OUTPUT_TYPE = 1 + private const val TAG_NAME = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): AudioOutputClusterOutputInfoStruct { + tlvReader.enterStructure(tag) + val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) + val outputType = tlvReader.getInt(ContextSpecificTag(TAG_OUTPUT_TYPE)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + + tlvReader.exitContainer() + + return AudioOutputClusterOutputInfoStruct(index, outputType, name) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt new file mode 100644 index 00000000000000..e4f323b6321541 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BasicInformationClusterCapabilityMinimaStruct( + val caseSessionsPerFabric: Int, + val subscriptionsPerFabric: Int +) { + override fun toString(): String = buildString { + append("BasicInformationClusterCapabilityMinimaStruct {\n") + append("\tcaseSessionsPerFabric : $caseSessionsPerFabric\n") + append("\tsubscriptionsPerFabric : $subscriptionsPerFabric\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC), caseSessionsPerFabric) + put(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC), subscriptionsPerFabric) + endStructure() + } + } + + companion object { + private const val TAG_CASE_SESSIONS_PER_FABRIC = 0 + private const val TAG_SUBSCRIPTIONS_PER_FABRIC = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { + tlvReader.enterStructure(tag) + val caseSessionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) + val subscriptionsPerFabric = + tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) + + tlvReader.exitContainer() + + return BasicInformationClusterCapabilityMinimaStruct( + caseSessionsPerFabric, + subscriptionsPerFabric + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt new file mode 100644 index 00000000000000..3678494c7b90fb --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primaryColor: Int?) { + override fun toString(): String = buildString { + append("BasicInformationClusterProductAppearanceStruct {\n") + append("\tfinish : $finish\n") + append("\tprimaryColor : $primaryColor\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FINISH), finish) + if (primaryColor != null) { + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } + endStructure() + } + } + + companion object { + private const val TAG_FINISH = 0 + private const val TAG_PRIMARY_COLOR = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { + tlvReader.enterStructure(tag) + val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + + tlvReader.exitContainer() + + return BasicInformationClusterProductAppearanceStruct(finish, primaryColor) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt new file mode 100644 index 00000000000000..8ab0146b8e95f3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt @@ -0,0 +1,107 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class BindingClusterTargetStruct( + val node: Optional, + val group: Optional, + val endpoint: Optional, + val cluster: Optional, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("BindingClusterTargetStruct {\n") + append("\tnode : $node\n") + append("\tgroup : $group\n") + append("\tendpoint : $endpoint\n") + append("\tcluster : $cluster\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (node.isPresent) { + val optnode = node.get() + put(ContextSpecificTag(TAG_NODE), optnode) + } + if (group.isPresent) { + val optgroup = group.get() + put(ContextSpecificTag(TAG_GROUP), optgroup) + } + if (endpoint.isPresent) { + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } + if (cluster.isPresent) { + val optcluster = cluster.get() + put(ContextSpecificTag(TAG_CLUSTER), optcluster) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_NODE = 1 + private const val TAG_GROUP = 2 + private const val TAG_ENDPOINT = 3 + private const val TAG_CLUSTER = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { + tlvReader.enterStructure(tag) + val node = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) + } else { + Optional.empty() + } + val group = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) + } else { + Optional.empty() + } + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + val cluster = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) + } else { + Optional.empty() + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return BindingClusterTargetStruct(node, group, endpoint, cluster, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt new file mode 100644 index 00000000000000..d1426bc0828631 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BridgedDeviceBasicInformationClusterProductAppearanceStruct( + val finish: Int, + val primaryColor: Int? +) { + override fun toString(): String = buildString { + append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n") + append("\tfinish : $finish\n") + append("\tprimaryColor : $primaryColor\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FINISH), finish) + if (primaryColor != null) { + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } + endStructure() + } + } + + companion object { + private const val TAG_FINISH = 0 + private const val TAG_PRIMARY_COLOR = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterProductAppearanceStruct { + tlvReader.enterStructure(tag) + val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + + tlvReader.exitContainer() + + return BridgedDeviceBasicInformationClusterProductAppearanceStruct(finish, primaryColor) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..391f4d7ed01f40 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class CeramicFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("CeramicFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): CeramicFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return CeramicFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt new file mode 100644 index 00000000000000..9d10bf6f24e5fa --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt @@ -0,0 +1,105 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ChannelClusterChannelInfoStruct( + val majorNumber: Int, + val minorNumber: Int, + val name: Optional, + val callSign: Optional, + val affiliateCallSign: Optional +) { + override fun toString(): String = buildString { + append("ChannelClusterChannelInfoStruct {\n") + append("\tmajorNumber : $majorNumber\n") + append("\tminorNumber : $minorNumber\n") + append("\tname : $name\n") + append("\tcallSign : $callSign\n") + append("\taffiliateCallSign : $affiliateCallSign\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_MAJOR_NUMBER), majorNumber) + put(ContextSpecificTag(TAG_MINOR_NUMBER), minorNumber) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (callSign.isPresent) { + val optcallSign = callSign.get() + put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) + } + if (affiliateCallSign.isPresent) { + val optaffiliateCallSign = affiliateCallSign.get() + put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) + } + endStructure() + } + } + + companion object { + private const val TAG_MAJOR_NUMBER = 0 + private const val TAG_MINOR_NUMBER = 1 + private const val TAG_NAME = 2 + private const val TAG_CALL_SIGN = 3 + private const val TAG_AFFILIATE_CALL_SIGN = 4 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterChannelInfoStruct { + tlvReader.enterStructure(tag) + val majorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MAJOR_NUMBER)) + val minorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MINOR_NUMBER)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val callSign = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) + } else { + Optional.empty() + } + val affiliateCallSign = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ChannelClusterChannelInfoStruct( + majorNumber, + minorNumber, + name, + callSign, + affiliateCallSign + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt new file mode 100644 index 00000000000000..edc8f9157db120 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt @@ -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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ChannelClusterLineupInfoStruct( + val operatorName: String, + val lineupName: Optional, + val postalCode: Optional, + val lineupInfoType: Int +) { + override fun toString(): String = buildString { + append("ChannelClusterLineupInfoStruct {\n") + append("\toperatorName : $operatorName\n") + append("\tlineupName : $lineupName\n") + append("\tpostalCode : $postalCode\n") + append("\tlineupInfoType : $lineupInfoType\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OPERATOR_NAME), operatorName) + if (lineupName.isPresent) { + val optlineupName = lineupName.get() + put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) + } + if (postalCode.isPresent) { + val optpostalCode = postalCode.get() + put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) + } + put(ContextSpecificTag(TAG_LINEUP_INFO_TYPE), lineupInfoType) + endStructure() + } + } + + companion object { + private const val TAG_OPERATOR_NAME = 0 + private const val TAG_LINEUP_NAME = 1 + private const val TAG_POSTAL_CODE = 2 + private const val TAG_LINEUP_INFO_TYPE = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterLineupInfoStruct { + tlvReader.enterStructure(tag) + val operatorName = tlvReader.getString(ContextSpecificTag(TAG_OPERATOR_NAME)) + val lineupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) + } else { + Optional.empty() + } + val postalCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) + } else { + Optional.empty() + } + val lineupInfoType = tlvReader.getInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) + + tlvReader.exitContainer() + + return ChannelClusterLineupInfoStruct(operatorName, lineupName, postalCode, lineupInfoType) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt new file mode 100644 index 00000000000000..0e1ebee9f97df2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: String) { + override fun toString(): String = buildString { + append("ContentLauncherClusterAdditionalInfoStruct {\n") + append("\tname : $name\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_NAME = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { + tlvReader.enterStructure(tag) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return ContentLauncherClusterAdditionalInfoStruct(name, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt new file mode 100644 index 00000000000000..5f4719e9c00ef8 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt @@ -0,0 +1,152 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ContentLauncherClusterBrandingInformationStruct( + val providerName: String, + val background: Optional, + val logo: Optional, + val progressBar: Optional, + val splash: Optional, + val waterMark: Optional +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterBrandingInformationStruct {\n") + append("\tproviderName : $providerName\n") + append("\tbackground : $background\n") + append("\tlogo : $logo\n") + append("\tprogressBar : $progressBar\n") + append("\tsplash : $splash\n") + append("\twaterMark : $waterMark\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName) + if (background.isPresent) { + val optbackground = background.get() + optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) + } + if (logo.isPresent) { + val optlogo = logo.get() + optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) + } + if (progressBar.isPresent) { + val optprogressBar = progressBar.get() + optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) + } + if (splash.isPresent) { + val optsplash = splash.get() + optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) + } + if (waterMark.isPresent) { + val optwaterMark = waterMark.get() + optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) + } + endStructure() + } + } + + companion object { + private const val TAG_PROVIDER_NAME = 0 + private const val TAG_BACKGROUND = 1 + private const val TAG_LOGO = 2 + private const val TAG_PROGRESS_BAR = 3 + private const val TAG_SPLASH = 4 + private const val TAG_WATER_MARK = 5 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterBrandingInformationStruct { + tlvReader.enterStructure(tag) + val providerName = tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME)) + val background = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_BACKGROUND), + tlvReader + ) + ) + } else { + Optional.empty() + } + val logo = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_LOGO), + tlvReader + ) + ) + } else { + Optional.empty() + } + val progressBar = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_PROGRESS_BAR), + tlvReader + ) + ) + } else { + Optional.empty() + } + val splash = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_SPLASH), + tlvReader + ) + ) + } else { + Optional.empty() + } + val waterMark = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_WATER_MARK), + tlvReader + ) + ) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterBrandingInformationStruct( + providerName, + background, + logo, + progressBar, + splash, + waterMark + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt new file mode 100644 index 00000000000000..9457b03907a4fb --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ContentLauncherClusterContentSearchStruct( + val parameterList: List +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterContentSearchStruct {\n") + append("\tparameterList : $parameterList\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_PARAMETER_LIST)) + for (item in parameterList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_PARAMETER_LIST = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { + tlvReader.enterStructure(tag) + val parameterList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterContentSearchStruct(parameterList) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt new file mode 100644 index 00000000000000..a38245918bb476 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ContentLauncherClusterDimensionStruct( + val width: Double, + val height: Double, + val metric: Int +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterDimensionStruct {\n") + append("\twidth : $width\n") + append("\theight : $height\n") + append("\tmetric : $metric\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_WIDTH), width) + put(ContextSpecificTag(TAG_HEIGHT), height) + put(ContextSpecificTag(TAG_METRIC), metric) + endStructure() + } + } + + companion object { + private const val TAG_WIDTH = 0 + private const val TAG_HEIGHT = 1 + private const val TAG_METRIC = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterDimensionStruct { + tlvReader.enterStructure(tag) + val width = tlvReader.getDouble(ContextSpecificTag(TAG_WIDTH)) + val height = tlvReader.getDouble(ContextSpecificTag(TAG_HEIGHT)) + val metric = tlvReader.getInt(ContextSpecificTag(TAG_METRIC)) + + tlvReader.exitContainer() + + return ContentLauncherClusterDimensionStruct(width, height, metric) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt new file mode 100644 index 00000000000000..caf0f99848c93c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt @@ -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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ContentLauncherClusterParameterStruct( + val type: Int, + val value: String, + val externalIDList: Optional> +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterParameterStruct {\n") + append("\ttype : $type\n") + append("\tvalue : $value\n") + append("\texternalIDList : $externalIDList\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_TYPE), type) + put(ContextSpecificTag(TAG_VALUE), value) + if (externalIDList.isPresent) { + val optexternalIDList = externalIDList.get() + startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + for (item in optexternalIDList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } + endStructure() + } + } + + companion object { + private const val TAG_TYPE = 0 + private const val TAG_VALUE = 1 + private const val TAG_EXTERNAL_I_D_LIST = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterParameterStruct { + tlvReader.enterStructure(tag) + val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + val externalIDList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterParameterStruct(type, value, externalIDList) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt new file mode 100644 index 00000000000000..d5e686bbb5ac45 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ContentLauncherClusterStyleInformationStruct( + val imageURL: Optional, + val color: Optional, + val size: Optional +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterStyleInformationStruct {\n") + append("\timageURL : $imageURL\n") + append("\tcolor : $color\n") + append("\tsize : $size\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (imageURL.isPresent) { + val optimageURL = imageURL.get() + put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) + } + if (color.isPresent) { + val optcolor = color.get() + put(ContextSpecificTag(TAG_COLOR), optcolor) + } + if (size.isPresent) { + val optsize = size.get() + optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) + } + endStructure() + } + } + + companion object { + private const val TAG_IMAGE_U_R_L = 0 + private const val TAG_COLOR = 1 + private const val TAG_SIZE = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterStyleInformationStruct { + tlvReader.enterStructure(tag) + val imageURL = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) + } else { + Optional.empty() + } + val color = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) + } else { + Optional.empty() + } + val size = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { + Optional.of( + ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader) + ) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterStyleInformationStruct(imageURL, color, size) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt new file mode 100644 index 00000000000000..75fed36957e726 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) { + override fun toString(): String = buildString { + append("DescriptorClusterDeviceTypeStruct {\n") + append("\tdeviceType : $deviceType\n") + append("\trevision : $revision\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + put(ContextSpecificTag(TAG_REVISION), revision) + endStructure() + } + } + + companion object { + private const val TAG_DEVICE_TYPE = 0 + private const val TAG_REVISION = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterDeviceTypeStruct { + tlvReader.enterStructure(tag) + val deviceType = tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) + val revision = tlvReader.getInt(ContextSpecificTag(TAG_REVISION)) + + tlvReader.exitContainer() + + return DescriptorClusterDeviceTypeStruct(deviceType, revision) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt new file mode 100644 index 00000000000000..abde881ccffcea --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt @@ -0,0 +1,97 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class DescriptorClusterSemanticTagStruct( + val mfgCode: Int?, + val namespaceID: Int, + val tag: Int, + val label: Optional? +) { + override fun toString(): String = buildString { + append("DescriptorClusterSemanticTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tnamespaceID : $namespaceID\n") + append("\ttag : $tag\n") + append("\tlabel : $label\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode != null) { + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + } else { + putNull(ContextSpecificTag(TAG_MFG_CODE)) + } + put(ContextSpecificTag(TAG_NAMESPACE_I_D), namespaceID) + put(ContextSpecificTag(TAG_TAG), tag) + if (label != null) { + if (label.isPresent) { + val optlabel = label.get() + put(ContextSpecificTag(TAG_LABEL), optlabel) + } + } else { + putNull(ContextSpecificTag(TAG_LABEL)) + } + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_NAMESPACE_I_D = 1 + private const val TAG_TAG = 2 + private const val TAG_LABEL = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) + null + } + val namespaceID = tlvReader.getInt(ContextSpecificTag(TAG_NAMESPACE_I_D)) + val tag = tlvReader.getInt(ContextSpecificTag(TAG_TAG)) + val label = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) + null + } + + tlvReader.exitContainer() + + return DescriptorClusterSemanticTagStruct(mfgCode, namespaceID, tag, label) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..423d6a554672ce --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DishwasherModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { + append("DishwasherModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return DishwasherModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..33881f4ac00c8d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { + append("DishwasherModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return DishwasherModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt new file mode 100644 index 00000000000000..da3a551267eb09 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialIndex: Int) { + override fun toString(): String = buildString { + append("DoorLockClusterCredentialStruct {\n") + append("\tcredentialType : $credentialType\n") + append("\tcredentialIndex : $credentialIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CREDENTIAL_TYPE), credentialType) + put(ContextSpecificTag(TAG_CREDENTIAL_INDEX), credentialIndex) + endStructure() + } + } + + companion object { + private const val TAG_CREDENTIAL_TYPE = 0 + private const val TAG_CREDENTIAL_INDEX = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterCredentialStruct { + tlvReader.enterStructure(tag) + val credentialType = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_TYPE)) + val credentialIndex = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_INDEX)) + + tlvReader.exitContainer() + + return DoorLockClusterCredentialStruct(credentialType, credentialIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..4997a33f64aebd --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ElectrostaticFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("ElectrostaticFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ElectrostaticFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return ElectrostaticFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt new file mode 100644 index 00000000000000..09292f726d9467 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class FixedLabelClusterLabelStruct(val label: String, val value: String) { + override fun toString(): String = buildString { + append("FixedLabelClusterLabelStruct {\n") + append("\tlabel : $label\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): FixedLabelClusterLabelStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return FixedLabelClusterLabelStruct(label, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..1df5be4e9e2320 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class FuelTankMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("FuelTankMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): FuelTankMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return FuelTankMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt new file mode 100644 index 00000000000000..60d10b41112a9d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralCommissioningClusterBasicCommissioningInfo( + val failSafeExpiryLengthSeconds: Int, + val maxCumulativeFailsafeSeconds: Int +) { + override fun toString(): String = buildString { + append("GeneralCommissioningClusterBasicCommissioningInfo {\n") + append("\tfailSafeExpiryLengthSeconds : $failSafeExpiryLengthSeconds\n") + append("\tmaxCumulativeFailsafeSeconds : $maxCumulativeFailsafeSeconds\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS), failSafeExpiryLengthSeconds) + put(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS), maxCumulativeFailsafeSeconds) + endStructure() + } + } + + companion object { + private const val TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS = 0 + private const val TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralCommissioningClusterBasicCommissioningInfo { + tlvReader.enterStructure(tag) + val failSafeExpiryLengthSeconds = + tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) + val maxCumulativeFailsafeSeconds = + tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) + + tlvReader.exitContainer() + + return GeneralCommissioningClusterBasicCommissioningInfo( + failSafeExpiryLengthSeconds, + maxCumulativeFailsafeSeconds + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt new file mode 100644 index 00000000000000..d4ff313520e65e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt @@ -0,0 +1,147 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralDiagnosticsClusterNetworkInterface( + val name: String, + val isOperational: Boolean, + val offPremiseServicesReachableIPv4: Boolean?, + val offPremiseServicesReachableIPv6: Boolean?, + val hardwareAddress: ByteArray, + val IPv4Addresses: List, + val IPv6Addresses: List, + val type: Int +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterNetworkInterface {\n") + append("\tname : $name\n") + append("\tisOperational : $isOperational\n") + append("\toffPremiseServicesReachableIPv4 : $offPremiseServicesReachableIPv4\n") + append("\toffPremiseServicesReachableIPv6 : $offPremiseServicesReachableIPv6\n") + append("\thardwareAddress : $hardwareAddress\n") + append("\tIPv4Addresses : $IPv4Addresses\n") + append("\tIPv6Addresses : $IPv6Addresses\n") + append("\ttype : $type\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_IS_OPERATIONAL), isOperational) + if (offPremiseServicesReachableIPv4 != null) { + put( + ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4), + offPremiseServicesReachableIPv4 + ) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } + if (offPremiseServicesReachableIPv6 != null) { + put( + ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6), + offPremiseServicesReachableIPv6 + ) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } + put(ContextSpecificTag(TAG_HARDWARE_ADDRESS), hardwareAddress) + startList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + for (item in IPv4Addresses.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + for (item in IPv6Addresses.iterator()) { + put(AnonymousTag, item) + } + endList() + put(ContextSpecificTag(TAG_TYPE), type) + endStructure() + } + } + + companion object { + private const val TAG_NAME = 0 + private const val TAG_IS_OPERATIONAL = 1 + private const val TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4 = 2 + private const val TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6 = 3 + private const val TAG_HARDWARE_ADDRESS = 4 + private const val TAG_I_PV4_ADDRESSES = 5 + private const val TAG_I_PV6_ADDRESSES = 6 + private const val TAG_TYPE = 7 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkInterface { + tlvReader.enterStructure(tag) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val isOperational = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_OPERATIONAL)) + val offPremiseServicesReachableIPv4 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + null + } + val offPremiseServicesReachableIPv6 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + null + } + val hardwareAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_HARDWARE_ADDRESS)) + val IPv4Addresses = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val IPv6Addresses = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterNetworkInterface( + name, + isOperational, + offPremiseServicesReachableIPv4, + offPremiseServicesReachableIPv6, + hardwareAddress, + IPv4Addresses, + IPv6Addresses, + type + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt new file mode 100644 index 00000000000000..6038b55d345b75 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt @@ -0,0 +1,90 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class GroupKeyManagementClusterGroupInfoMapStruct( + val groupId: Int, + val endpoints: List, + val groupName: Optional, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("GroupKeyManagementClusterGroupInfoMapStruct {\n") + append("\tgroupId : $groupId\n") + append("\tendpoints : $endpoints\n") + append("\tgroupName : $groupName\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_GROUP_ID), groupId) + startList(ContextSpecificTag(TAG_ENDPOINTS)) + for (item in endpoints.iterator()) { + put(AnonymousTag, item) + } + endList() + if (groupName.isPresent) { + val optgroupName = groupName.get() + put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_GROUP_ID = 1 + private const val TAG_ENDPOINTS = 2 + private const val TAG_GROUP_NAME = 3 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { + tlvReader.enterStructure(tag) + val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) + val endpoints = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val groupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) + } else { + Optional.empty() + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return GroupKeyManagementClusterGroupInfoMapStruct(groupId, endpoints, groupName, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt new file mode 100644 index 00000000000000..d565d70233abc2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GroupKeyManagementClusterGroupKeyMapStruct( + val groupId: Int, + val groupKeySetID: Int, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("GroupKeyManagementClusterGroupKeyMapStruct {\n") + append("\tgroupId : $groupId\n") + append("\tgroupKeySetID : $groupKeySetID\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_GROUP_ID), groupId) + put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_GROUP_ID = 1 + private const val TAG_GROUP_KEY_SET_I_D = 2 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeyMapStruct { + tlvReader.enterStructure(tag) + val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) + val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return GroupKeyManagementClusterGroupKeyMapStruct(groupId, groupKeySetID, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt new file mode 100644 index 00000000000000..418b6037ae46c9 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt @@ -0,0 +1,159 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GroupKeyManagementClusterGroupKeySetStruct( + val groupKeySetID: Int, + val groupKeySecurityPolicy: Int, + val epochKey0: ByteArray?, + val epochStartTime0: Long?, + val epochKey1: ByteArray?, + val epochStartTime1: Long?, + val epochKey2: ByteArray?, + val epochStartTime2: Long? +) { + override fun toString(): String = buildString { + append("GroupKeyManagementClusterGroupKeySetStruct {\n") + append("\tgroupKeySetID : $groupKeySetID\n") + append("\tgroupKeySecurityPolicy : $groupKeySecurityPolicy\n") + append("\tepochKey0 : $epochKey0\n") + append("\tepochStartTime0 : $epochStartTime0\n") + append("\tepochKey1 : $epochKey1\n") + append("\tepochStartTime1 : $epochStartTime1\n") + append("\tepochKey2 : $epochKey2\n") + append("\tepochStartTime2 : $epochStartTime2\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) + put(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY), groupKeySecurityPolicy) + if (epochKey0 != null) { + put(ContextSpecificTag(TAG_EPOCH_KEY0), epochKey0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + } + if (epochStartTime0 != null) { + put(ContextSpecificTag(TAG_EPOCH_START_TIME0), epochStartTime0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } + if (epochKey1 != null) { + put(ContextSpecificTag(TAG_EPOCH_KEY1), epochKey1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + } + if (epochStartTime1 != null) { + put(ContextSpecificTag(TAG_EPOCH_START_TIME1), epochStartTime1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } + if (epochKey2 != null) { + put(ContextSpecificTag(TAG_EPOCH_KEY2), epochKey2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + } + if (epochStartTime2 != null) { + put(ContextSpecificTag(TAG_EPOCH_START_TIME2), epochStartTime2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } + endStructure() + } + } + + companion object { + private const val TAG_GROUP_KEY_SET_I_D = 0 + private const val TAG_GROUP_KEY_SECURITY_POLICY = 1 + private const val TAG_EPOCH_KEY0 = 2 + private const val TAG_EPOCH_START_TIME0 = 3 + private const val TAG_EPOCH_KEY1 = 4 + private const val TAG_EPOCH_START_TIME1 = 5 + private const val TAG_EPOCH_KEY2 = 6 + private const val TAG_EPOCH_START_TIME2 = 7 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { + tlvReader.enterStructure(tag) + val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) + val groupKeySecurityPolicy = + tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) + val epochKey0 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + null + } + val epochStartTime0 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + null + } + val epochKey1 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + null + } + val epochStartTime1 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + null + } + val epochKey2 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + null + } + val epochStartTime2 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + null + } + + tlvReader.exitContainer() + + return GroupKeyManagementClusterGroupKeySetStruct( + groupKeySetID, + groupKeySecurityPolicy, + epochKey0, + epochStartTime0, + epochKey1, + epochStartTime1, + epochKey2, + epochStartTime2 + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..a86ba8db2dee0a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class HepaFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("HepaFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): HepaFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return HepaFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt new file mode 100644 index 00000000000000..d380689bed016f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class IcdManagementClusterMonitoringRegistrationStruct( + val checkInNodeID: Long, + val monitoredSubject: Long, + val key: ByteArray, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("IcdManagementClusterMonitoringRegistrationStruct {\n") + append("\tcheckInNodeID : $checkInNodeID\n") + append("\tmonitoredSubject : $monitoredSubject\n") + append("\tkey : $key\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D), checkInNodeID) + put(ContextSpecificTag(TAG_MONITORED_SUBJECT), monitoredSubject) + put(ContextSpecificTag(TAG_KEY), key) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_CHECK_IN_NODE_I_D = 1 + private const val TAG_MONITORED_SUBJECT = 2 + private const val TAG_KEY = 3 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): IcdManagementClusterMonitoringRegistrationStruct { + tlvReader.enterStructure(tag) + val checkInNodeID = tlvReader.getLong(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D)) + val monitoredSubject = tlvReader.getLong(ContextSpecificTag(TAG_MONITORED_SUBJECT)) + val key = tlvReader.getByteArray(ContextSpecificTag(TAG_KEY)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return IcdManagementClusterMonitoringRegistrationStruct( + checkInNodeID, + monitoredSubject, + key, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..114ffa845ce245 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class InkCartridgeMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("InkCartridgeMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): InkCartridgeMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return InkCartridgeMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..d90f06e6504f06 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class IonizingFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("IonizingFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): IonizingFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return IonizingFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..eeab9e95eb7cce --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class LaundryWasherModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { + append("LaundryWasherModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return LaundryWasherModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..eed09912c26a9c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { + append("LaundryWasherModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return LaundryWasherModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt new file mode 100644 index 00000000000000..514c05d19f6fdf --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class MediaInputClusterInputInfoStruct( + val index: Int, + val inputType: Int, + val name: String, + val description: String +) { + override fun toString(): String = buildString { + append("MediaInputClusterInputInfoStruct {\n") + append("\tindex : $index\n") + append("\tinputType : $inputType\n") + append("\tname : $name\n") + append("\tdescription : $description\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_INDEX), index) + put(ContextSpecificTag(TAG_INPUT_TYPE), inputType) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_DESCRIPTION), description) + endStructure() + } + } + + companion object { + private const val TAG_INDEX = 0 + private const val TAG_INPUT_TYPE = 1 + private const val TAG_NAME = 2 + private const val TAG_DESCRIPTION = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaInputClusterInputInfoStruct { + tlvReader.enterStructure(tag) + val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) + val inputType = tlvReader.getInt(ContextSpecificTag(TAG_INPUT_TYPE)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val description = tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)) + + tlvReader.exitContainer() + + return MediaInputClusterInputInfoStruct(index, inputType, name, description) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt new file mode 100644 index 00000000000000..d452d083a73112 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val position: Long?) { + override fun toString(): String = buildString { + append("MediaPlaybackClusterPlaybackPositionStruct {\n") + append("\tupdatedAt : $updatedAt\n") + append("\tposition : $position\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_UPDATED_AT), updatedAt) + if (position != null) { + put(ContextSpecificTag(TAG_POSITION), position) + } else { + putNull(ContextSpecificTag(TAG_POSITION)) + } + endStructure() + } + } + + companion object { + private const val TAG_UPDATED_AT = 0 + private const val TAG_POSITION = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { + tlvReader.enterStructure(tag) + val updatedAt = tlvReader.getLong(ContextSpecificTag(TAG_UPDATED_AT)) + val position = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) + null + } + + tlvReader.exitContainer() + + return MediaPlaybackClusterPlaybackPositionStruct(updatedAt, position) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..ac95817519112f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ModeSelectClusterModeOptionStruct( + val label: String, + val mode: Int, + val semanticTags: List +) { + override fun toString(): String = buildString { + append("ModeSelectClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tsemanticTags : $semanticTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + for (item in semanticTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_SEMANTIC_TAGS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val semanticTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ModeSelectClusterModeOptionStruct(label, mode, semanticTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt new file mode 100644 index 00000000000000..04c893671659d3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { + override fun toString(): String = buildString { + append("ModeSelectClusterSemanticTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterSemanticTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return ModeSelectClusterSemanticTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt new file mode 100644 index 00000000000000..8b942f2a492dd1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class NetworkCommissioningClusterNetworkInfoStruct( + val networkID: ByteArray, + val connected: Boolean +) { + override fun toString(): String = buildString { + append("NetworkCommissioningClusterNetworkInfoStruct {\n") + append("\tnetworkID : $networkID\n") + append("\tconnected : $connected\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NETWORK_I_D), networkID) + put(ContextSpecificTag(TAG_CONNECTED), connected) + endStructure() + } + } + + companion object { + private const val TAG_NETWORK_I_D = 0 + private const val TAG_CONNECTED = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { + tlvReader.enterStructure(tag) + val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) + val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) + + tlvReader.exitContainer() + + return NetworkCommissioningClusterNetworkInfoStruct(networkID, connected) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt new file mode 100644 index 00000000000000..76593b32131477 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt @@ -0,0 +1,101 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class NetworkCommissioningClusterThreadInterfaceScanResultStruct( + val panId: Int, + val extendedPanId: Long, + val networkName: String, + val channel: Int, + val version: Int, + val extendedAddress: ByteArray, + val rssi: Int, + val lqi: Int +) { + override fun toString(): String = buildString { + append("NetworkCommissioningClusterThreadInterfaceScanResultStruct {\n") + append("\tpanId : $panId\n") + append("\textendedPanId : $extendedPanId\n") + append("\tnetworkName : $networkName\n") + append("\tchannel : $channel\n") + append("\tversion : $version\n") + append("\textendedAddress : $extendedAddress\n") + append("\trssi : $rssi\n") + append("\tlqi : $lqi\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PAN_ID), panId) + put(ContextSpecificTag(TAG_EXTENDED_PAN_ID), extendedPanId) + put(ContextSpecificTag(TAG_NETWORK_NAME), networkName) + put(ContextSpecificTag(TAG_CHANNEL), channel) + put(ContextSpecificTag(TAG_VERSION), version) + put(ContextSpecificTag(TAG_EXTENDED_ADDRESS), extendedAddress) + put(ContextSpecificTag(TAG_RSSI), rssi) + put(ContextSpecificTag(TAG_LQI), lqi) + endStructure() + } + } + + companion object { + private const val TAG_PAN_ID = 0 + private const val TAG_EXTENDED_PAN_ID = 1 + private const val TAG_NETWORK_NAME = 2 + private const val TAG_CHANNEL = 3 + private const val TAG_VERSION = 4 + private const val TAG_EXTENDED_ADDRESS = 5 + private const val TAG_RSSI = 6 + private const val TAG_LQI = 7 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterThreadInterfaceScanResultStruct { + tlvReader.enterStructure(tag) + val panId = tlvReader.getInt(ContextSpecificTag(TAG_PAN_ID)) + val extendedPanId = tlvReader.getLong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) + val networkName = tlvReader.getString(ContextSpecificTag(TAG_NETWORK_NAME)) + val channel = tlvReader.getInt(ContextSpecificTag(TAG_CHANNEL)) + val version = tlvReader.getInt(ContextSpecificTag(TAG_VERSION)) + val extendedAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_EXTENDED_ADDRESS)) + val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) + val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) + + tlvReader.exitContainer() + + return NetworkCommissioningClusterThreadInterfaceScanResultStruct( + panId, + extendedPanId, + networkName, + channel, + version, + extendedAddress, + rssi, + lqi + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt new file mode 100644 index 00000000000000..d2cf4bcf5b7cb0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + val security: Int, + val ssid: ByteArray, + val bssid: ByteArray, + val channel: Int, + val wiFiBand: Int, + val rssi: Int +) { + override fun toString(): String = buildString { + append("NetworkCommissioningClusterWiFiInterfaceScanResultStruct {\n") + append("\tsecurity : $security\n") + append("\tssid : $ssid\n") + append("\tbssid : $bssid\n") + append("\tchannel : $channel\n") + append("\twiFiBand : $wiFiBand\n") + append("\trssi : $rssi\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_SECURITY), security) + put(ContextSpecificTag(TAG_SSID), ssid) + put(ContextSpecificTag(TAG_BSSID), bssid) + put(ContextSpecificTag(TAG_CHANNEL), channel) + put(ContextSpecificTag(TAG_WI_FI_BAND), wiFiBand) + put(ContextSpecificTag(TAG_RSSI), rssi) + endStructure() + } + } + + companion object { + private const val TAG_SECURITY = 0 + private const val TAG_SSID = 1 + private const val TAG_BSSID = 2 + private const val TAG_CHANNEL = 3 + private const val TAG_WI_FI_BAND = 4 + private const val TAG_RSSI = 5 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterWiFiInterfaceScanResultStruct { + tlvReader.enterStructure(tag) + val security = tlvReader.getInt(ContextSpecificTag(TAG_SECURITY)) + val ssid = tlvReader.getByteArray(ContextSpecificTag(TAG_SSID)) + val bssid = tlvReader.getByteArray(ContextSpecificTag(TAG_BSSID)) + val channel = tlvReader.getInt(ContextSpecificTag(TAG_CHANNEL)) + val wiFiBand = tlvReader.getInt(ContextSpecificTag(TAG_WI_FI_BAND)) + val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) + + tlvReader.exitContainer() + + return NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + security, + ssid, + bssid, + channel, + wiFiBand, + rssi + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt new file mode 100644 index 00000000000000..8264e9fa5ee545 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OperationalCredentialsClusterFabricDescriptorStruct( + val rootPublicKey: ByteArray, + val vendorID: Int, + val fabricID: Long, + val nodeID: Long, + val label: String, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("OperationalCredentialsClusterFabricDescriptorStruct {\n") + append("\trootPublicKey : $rootPublicKey\n") + append("\tvendorID : $vendorID\n") + append("\tfabricID : $fabricID\n") + append("\tnodeID : $nodeID\n") + append("\tlabel : $label\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY), rootPublicKey) + put(ContextSpecificTag(TAG_VENDOR_I_D), vendorID) + put(ContextSpecificTag(TAG_FABRIC_I_D), fabricID) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ROOT_PUBLIC_KEY = 1 + private const val TAG_VENDOR_I_D = 2 + private const val TAG_FABRIC_I_D = 3 + private const val TAG_NODE_I_D = 4 + private const val TAG_LABEL = 5 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OperationalCredentialsClusterFabricDescriptorStruct { + tlvReader.enterStructure(tag) + val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) + val vendorID = tlvReader.getInt(ContextSpecificTag(TAG_VENDOR_I_D)) + val fabricID = tlvReader.getLong(ContextSpecificTag(TAG_FABRIC_I_D)) + val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return OperationalCredentialsClusterFabricDescriptorStruct( + rootPublicKey, + vendorID, + fabricID, + nodeID, + label, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt new file mode 100644 index 00000000000000..a05f388d1a5e06 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OperationalCredentialsClusterNOCStruct( + val noc: ByteArray, + val icac: ByteArray?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("OperationalCredentialsClusterNOCStruct {\n") + append("\tnoc : $noc\n") + append("\ticac : $icac\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NOC), noc) + if (icac != null) { + put(ContextSpecificTag(TAG_ICAC), icac) + } else { + putNull(ContextSpecificTag(TAG_ICAC)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_NOC = 1 + private const val TAG_ICAC = 2 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { + tlvReader.enterStructure(tag) + val noc = tlvReader.getByteArray(ContextSpecificTag(TAG_NOC)) + val icac = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) + null + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return OperationalCredentialsClusterNOCStruct(noc, icac, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt new file mode 100644 index 00000000000000..cdbccac37fe63f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class OperationalStateClusterErrorStateStruct( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { + append("OperationalStateClusterErrorStateStruct {\n") + append("\terrorStateID : $errorStateID\n") + append("\terrorStateLabel : $errorStateLabel\n") + append("\terrorStateDetails : $errorStateDetails\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) + if (errorStateLabel.isPresent) { + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } + if (errorStateDetails.isPresent) { + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE_I_D = 0 + private const val TAG_ERROR_STATE_LABEL = 1 + private const val TAG_ERROR_STATE_DETAILS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterErrorStateStruct { + tlvReader.enterStructure(tag) + val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return OperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt new file mode 100644 index 00000000000000..1c55ac8f8927c4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class OperationalStateClusterOperationalStateStruct( + val operationalStateID: Int, + val operationalStateLabel: Optional +) { + override fun toString(): String = buildString { + append("OperationalStateClusterOperationalStateStruct {\n") + append("\toperationalStateID : $operationalStateID\n") + append("\toperationalStateLabel : $operationalStateLabel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) + if (operationalStateLabel.isPresent) { + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } + endStructure() + } + } + + companion object { + private const val TAG_OPERATIONAL_STATE_I_D = 0 + private const val TAG_OPERATIONAL_STATE_LABEL = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalStateStruct { + tlvReader.enterStructure(tag) + val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return OperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt new file mode 100644 index 00000000000000..17f95d897b258b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt @@ -0,0 +1,68 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterProviderLocation( + val providerNodeID: Long, + val endpoint: Int, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n") + append("\tproviderNodeID : $providerNodeID\n") + append("\tendpoint : $endpoint\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PROVIDER_NODE_I_D), providerNodeID) + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_PROVIDER_NODE_I_D = 1 + private const val TAG_ENDPOINT = 2 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OtaSoftwareUpdateRequestorClusterProviderLocation { + tlvReader.enterStructure(tag) + val providerNodeID = tlvReader.getLong(ContextSpecificTag(TAG_PROVIDER_NODE_I_D)) + val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterProviderLocation( + providerNodeID, + endpoint, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..52318157e94dc5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OzoneFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("OzoneFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OzoneFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return OzoneFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt new file mode 100644 index 00000000000000..6172f21498fdb0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterBatChargeFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatChargeFaultChangeType {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatChargeFaultChangeType(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt new file mode 100644 index 00000000000000..6ef4a63074b8a2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterBatFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatFaultChangeType {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatFaultChangeType(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt new file mode 100644 index 00000000000000..86cdc01f28fd41 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterWiredFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterWiredFaultChangeType {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterWiredFaultChangeType(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..6632b9581bb508 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt @@ -0,0 +1,88 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { + append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add( + RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + label, + mode, + modeTags + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..9f806c52fa6fa2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( + val mfgCode: Optional, + val value: Int +) { + override fun toString(): String = buildString { + append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..e3f33a1b7dcac5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class RvcCleanModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { + append("RvcCleanModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return RvcCleanModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..bc7eb7ed818b41 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { + append("RvcCleanModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return RvcCleanModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt new file mode 100644 index 00000000000000..f6b9b8b14456f0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RvcOperationalStateClusterErrorStateStruct( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterErrorStateStruct {\n") + append("\terrorStateID : $errorStateID\n") + append("\terrorStateLabel : $errorStateLabel\n") + append("\terrorStateDetails : $errorStateDetails\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) + if (errorStateLabel.isPresent) { + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } + if (errorStateDetails.isPresent) { + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE_I_D = 0 + private const val TAG_ERROR_STATE_LABEL = 1 + private const val TAG_ERROR_STATE_DETAILS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterErrorStateStruct { + tlvReader.enterStructure(tag) + val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return RvcOperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt new file mode 100644 index 00000000000000..66f2796d71439f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RvcOperationalStateClusterOperationalStateStruct( + val operationalStateID: Int, + val operationalStateLabel: Optional +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterOperationalStateStruct {\n") + append("\toperationalStateID : $operationalStateID\n") + append("\toperationalStateLabel : $operationalStateLabel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) + if (operationalStateLabel.isPresent) { + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } + endStructure() + } + } + + companion object { + private const val TAG_OPERATIONAL_STATE_I_D = 0 + private const val TAG_OPERATIONAL_STATE_LABEL = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalStateStruct { + tlvReader.enterStructure(tag) + val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return RvcOperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..64b272df8e62c2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class RvcRunModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { + append("RvcRunModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return RvcRunModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..3ad4e9aee5ba6d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { + append("RvcRunModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return RvcRunModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt new file mode 100644 index 00000000000000..213d87b9137cf5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: Long) { + override fun toString(): String = buildString { + append("ScenesClusterAttributeValuePair {\n") + append("\tattributeID : $attributeID\n") + append("\tattributeValue : $attributeValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ATTRIBUTE_I_D), attributeID) + put(ContextSpecificTag(TAG_ATTRIBUTE_VALUE), attributeValue) + endStructure() + } + } + + companion object { + private const val TAG_ATTRIBUTE_I_D = 0 + private const val TAG_ATTRIBUTE_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { + tlvReader.enterStructure(tag) + val attributeID = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) + val attributeValue = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) + + tlvReader.exitContainer() + + return ScenesClusterAttributeValuePair(attributeID, attributeValue) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt new file mode 100644 index 00000000000000..edc04a2084e2fd --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ScenesClusterExtensionFieldSet( + val clusterID: Long, + val attributeValueList: List +) { + override fun toString(): String = buildString { + append("ScenesClusterExtensionFieldSet {\n") + append("\tclusterID : $clusterID\n") + append("\tattributeValueList : $attributeValueList\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CLUSTER_I_D), clusterID) + startList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + for (item in attributeValueList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CLUSTER_I_D = 0 + private const val TAG_ATTRIBUTE_VALUE_LIST = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { + tlvReader.enterStructure(tag) + val clusterID = tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER_I_D)) + val attributeValueList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ScenesClusterExtensionFieldSet(clusterID, attributeValueList) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt new file mode 100644 index 00000000000000..5359b9a4b70a2a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt @@ -0,0 +1,113 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class SoftwareDiagnosticsClusterThreadMetricsStruct( + val id: Long, + val name: Optional, + val stackFreeCurrent: Optional, + val stackFreeMinimum: Optional, + val stackSize: Optional +) { + override fun toString(): String = buildString { + append("SoftwareDiagnosticsClusterThreadMetricsStruct {\n") + append("\tid : $id\n") + append("\tname : $name\n") + append("\tstackFreeCurrent : $stackFreeCurrent\n") + append("\tstackFreeMinimum : $stackFreeMinimum\n") + append("\tstackSize : $stackSize\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ID), id) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (stackFreeCurrent.isPresent) { + val optstackFreeCurrent = stackFreeCurrent.get() + put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) + } + if (stackFreeMinimum.isPresent) { + val optstackFreeMinimum = stackFreeMinimum.get() + put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) + } + if (stackSize.isPresent) { + val optstackSize = stackSize.get() + put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) + } + endStructure() + } + } + + companion object { + private const val TAG_ID = 0 + private const val TAG_NAME = 1 + private const val TAG_STACK_FREE_CURRENT = 2 + private const val TAG_STACK_FREE_MINIMUM = 3 + private const val TAG_STACK_SIZE = 4 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterThreadMetricsStruct { + tlvReader.enterStructure(tag) + val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val stackFreeCurrent = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) + } else { + Optional.empty() + } + val stackFreeMinimum = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) + } else { + Optional.empty() + } + val stackSize = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return SoftwareDiagnosticsClusterThreadMetricsStruct( + id, + name, + stackFreeCurrent, + stackFreeMinimum, + stackSize + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt new file mode 100644 index 00000000000000..403134993beaed --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TargetNavigatorClusterTargetInfoStruct(val identifier: Int, val name: String) { + override fun toString(): String = buildString { + append("TargetNavigatorClusterTargetInfoStruct {\n") + append("\tidentifier : $identifier\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_IDENTIFIER), identifier) + put(ContextSpecificTag(TAG_NAME), name) + endStructure() + } + } + + companion object { + private const val TAG_IDENTIFIER = 0 + private const val TAG_NAME = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { + tlvReader.enterStructure(tag) + val identifier = tlvReader.getInt(ContextSpecificTag(TAG_IDENTIFIER)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + + tlvReader.exitContainer() + + return TargetNavigatorClusterTargetInfoStruct(identifier, name) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt new file mode 100644 index 00000000000000..cb432fb1e976b4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt @@ -0,0 +1,88 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThermostatClusterThermostatScheduleTransition( + val transitionTime: Int, + val heatSetpoint: Int?, + val coolSetpoint: Int? +) { + override fun toString(): String = buildString { + append("ThermostatClusterThermostatScheduleTransition {\n") + append("\ttransitionTime : $transitionTime\n") + append("\theatSetpoint : $heatSetpoint\n") + append("\tcoolSetpoint : $coolSetpoint\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) + if (heatSetpoint != null) { + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } + if (coolSetpoint != null) { + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } + endStructure() + } + } + + companion object { + private const val TAG_TRANSITION_TIME = 0 + private const val TAG_HEAT_SETPOINT = 1 + private const val TAG_COOL_SETPOINT = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ThermostatClusterThermostatScheduleTransition { + tlvReader.enterStructure(tag) + val transitionTime = tlvReader.getInt(ContextSpecificTag(TAG_TRANSITION_TIME)) + val heatSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterThermostatScheduleTransition( + transitionTime, + heatSetpoint, + coolSetpoint + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt new file mode 100644 index 00000000000000..4a7066df5d7f25 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt @@ -0,0 +1,157 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterNeighborTableStruct( + val extAddress: Long, + val age: Long, + val rloc16: Int, + val linkFrameCounter: Long, + val mleFrameCounter: Long, + val lqi: Int, + val averageRssi: Int?, + val lastRssi: Int?, + val frameErrorRate: Int, + val messageErrorRate: Int, + val rxOnWhenIdle: Boolean, + val fullThreadDevice: Boolean, + val fullNetworkData: Boolean, + val isChild: Boolean +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterNeighborTableStruct {\n") + append("\textAddress : $extAddress\n") + append("\tage : $age\n") + append("\trloc16 : $rloc16\n") + append("\tlinkFrameCounter : $linkFrameCounter\n") + append("\tmleFrameCounter : $mleFrameCounter\n") + append("\tlqi : $lqi\n") + append("\taverageRssi : $averageRssi\n") + append("\tlastRssi : $lastRssi\n") + append("\tframeErrorRate : $frameErrorRate\n") + append("\tmessageErrorRate : $messageErrorRate\n") + append("\trxOnWhenIdle : $rxOnWhenIdle\n") + append("\tfullThreadDevice : $fullThreadDevice\n") + append("\tfullNetworkData : $fullNetworkData\n") + append("\tisChild : $isChild\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) + put(ContextSpecificTag(TAG_AGE), age) + put(ContextSpecificTag(TAG_RLOC16), rloc16) + put(ContextSpecificTag(TAG_LINK_FRAME_COUNTER), linkFrameCounter) + put(ContextSpecificTag(TAG_MLE_FRAME_COUNTER), mleFrameCounter) + put(ContextSpecificTag(TAG_LQI), lqi) + if (averageRssi != null) { + put(ContextSpecificTag(TAG_AVERAGE_RSSI), averageRssi) + } else { + putNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } + if (lastRssi != null) { + put(ContextSpecificTag(TAG_LAST_RSSI), lastRssi) + } else { + putNull(ContextSpecificTag(TAG_LAST_RSSI)) + } + put(ContextSpecificTag(TAG_FRAME_ERROR_RATE), frameErrorRate) + put(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE), messageErrorRate) + put(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE), rxOnWhenIdle) + put(ContextSpecificTag(TAG_FULL_THREAD_DEVICE), fullThreadDevice) + put(ContextSpecificTag(TAG_FULL_NETWORK_DATA), fullNetworkData) + put(ContextSpecificTag(TAG_IS_CHILD), isChild) + endStructure() + } + } + + companion object { + private const val TAG_EXT_ADDRESS = 0 + private const val TAG_AGE = 1 + private const val TAG_RLOC16 = 2 + private const val TAG_LINK_FRAME_COUNTER = 3 + private const val TAG_MLE_FRAME_COUNTER = 4 + private const val TAG_LQI = 5 + private const val TAG_AVERAGE_RSSI = 6 + private const val TAG_LAST_RSSI = 7 + private const val TAG_FRAME_ERROR_RATE = 8 + private const val TAG_MESSAGE_ERROR_RATE = 9 + private const val TAG_RX_ON_WHEN_IDLE = 10 + private const val TAG_FULL_THREAD_DEVICE = 11 + private const val TAG_FULL_NETWORK_DATA = 12 + private const val TAG_IS_CHILD = 13 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNeighborTableStruct { + tlvReader.enterStructure(tag) + val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) + val age = tlvReader.getLong(ContextSpecificTag(TAG_AGE)) + val rloc16 = tlvReader.getInt(ContextSpecificTag(TAG_RLOC16)) + val linkFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_LINK_FRAME_COUNTER)) + val mleFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_MLE_FRAME_COUNTER)) + val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) + val averageRssi = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + null + } + val lastRssi = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) + null + } + val frameErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_FRAME_ERROR_RATE)) + val messageErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE)) + val rxOnWhenIdle = tlvReader.getBoolean(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE)) + val fullThreadDevice = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_THREAD_DEVICE)) + val fullNetworkData = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_NETWORK_DATA)) + val isChild = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_CHILD)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterNeighborTableStruct( + extAddress, + age, + rloc16, + linkFrameCounter, + mleFrameCounter, + lqi, + averageRssi, + lastRssi, + frameErrorRate, + messageErrorRate, + rxOnWhenIdle, + fullThreadDevice, + fullNetworkData, + isChild + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt new file mode 100644 index 00000000000000..f9764369891073 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt @@ -0,0 +1,130 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + val activeTimestampPresent: Boolean, + val pendingTimestampPresent: Boolean, + val masterKeyPresent: Boolean, + val networkNamePresent: Boolean, + val extendedPanIdPresent: Boolean, + val meshLocalPrefixPresent: Boolean, + val delayPresent: Boolean, + val panIdPresent: Boolean, + val channelPresent: Boolean, + val pskcPresent: Boolean, + val securityPolicyPresent: Boolean, + val channelMaskPresent: Boolean +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterOperationalDatasetComponents {\n") + append("\tactiveTimestampPresent : $activeTimestampPresent\n") + append("\tpendingTimestampPresent : $pendingTimestampPresent\n") + append("\tmasterKeyPresent : $masterKeyPresent\n") + append("\tnetworkNamePresent : $networkNamePresent\n") + append("\textendedPanIdPresent : $extendedPanIdPresent\n") + append("\tmeshLocalPrefixPresent : $meshLocalPrefixPresent\n") + append("\tdelayPresent : $delayPresent\n") + append("\tpanIdPresent : $panIdPresent\n") + append("\tchannelPresent : $channelPresent\n") + append("\tpskcPresent : $pskcPresent\n") + append("\tsecurityPolicyPresent : $securityPolicyPresent\n") + append("\tchannelMaskPresent : $channelMaskPresent\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT), activeTimestampPresent) + put(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT), pendingTimestampPresent) + put(ContextSpecificTag(TAG_MASTER_KEY_PRESENT), masterKeyPresent) + put(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT), networkNamePresent) + put(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT), extendedPanIdPresent) + put(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT), meshLocalPrefixPresent) + put(ContextSpecificTag(TAG_DELAY_PRESENT), delayPresent) + put(ContextSpecificTag(TAG_PAN_ID_PRESENT), panIdPresent) + put(ContextSpecificTag(TAG_CHANNEL_PRESENT), channelPresent) + put(ContextSpecificTag(TAG_PSKC_PRESENT), pskcPresent) + put(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT), securityPolicyPresent) + put(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT), channelMaskPresent) + endStructure() + } + } + + companion object { + private const val TAG_ACTIVE_TIMESTAMP_PRESENT = 0 + private const val TAG_PENDING_TIMESTAMP_PRESENT = 1 + private const val TAG_MASTER_KEY_PRESENT = 2 + private const val TAG_NETWORK_NAME_PRESENT = 3 + private const val TAG_EXTENDED_PAN_ID_PRESENT = 4 + private const val TAG_MESH_LOCAL_PREFIX_PRESENT = 5 + private const val TAG_DELAY_PRESENT = 6 + private const val TAG_PAN_ID_PRESENT = 7 + private const val TAG_CHANNEL_PRESENT = 8 + private const val TAG_PSKC_PRESENT = 9 + private const val TAG_SECURITY_POLICY_PRESENT = 10 + private const val TAG_CHANNEL_MASK_PRESENT = 11 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + tlvReader.enterStructure(tag) + val activeTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) + val pendingTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) + val masterKeyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MASTER_KEY_PRESENT)) + val networkNamePresent = tlvReader.getBoolean(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT)) + val extendedPanIdPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) + val meshLocalPrefixPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) + val delayPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_DELAY_PRESENT)) + val panIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PAN_ID_PRESENT)) + val channelPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_PRESENT)) + val pskcPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PSKC_PRESENT)) + val securityPolicyPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) + val channelMaskPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + activeTimestampPresent, + pendingTimestampPresent, + masterKeyPresent, + networkNamePresent, + extendedPanIdPresent, + meshLocalPrefixPresent, + delayPresent, + panIdPresent, + channelPresent, + pskcPresent, + securityPolicyPresent, + channelMaskPresent + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt new file mode 100644 index 00000000000000..8a7c423f84e6ad --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt @@ -0,0 +1,110 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterRouteTableStruct( + val extAddress: Long, + val rloc16: Int, + val routerId: Int, + val nextHop: Int, + val pathCost: Int, + val LQIIn: Int, + val LQIOut: Int, + val age: Int, + val allocated: Boolean, + val linkEstablished: Boolean +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterRouteTableStruct {\n") + append("\textAddress : $extAddress\n") + append("\trloc16 : $rloc16\n") + append("\trouterId : $routerId\n") + append("\tnextHop : $nextHop\n") + append("\tpathCost : $pathCost\n") + append("\tLQIIn : $LQIIn\n") + append("\tLQIOut : $LQIOut\n") + append("\tage : $age\n") + append("\tallocated : $allocated\n") + append("\tlinkEstablished : $linkEstablished\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) + put(ContextSpecificTag(TAG_RLOC16), rloc16) + put(ContextSpecificTag(TAG_ROUTER_ID), routerId) + put(ContextSpecificTag(TAG_NEXT_HOP), nextHop) + put(ContextSpecificTag(TAG_PATH_COST), pathCost) + put(ContextSpecificTag(TAG_L_Q_I_IN), LQIIn) + put(ContextSpecificTag(TAG_L_Q_I_OUT), LQIOut) + put(ContextSpecificTag(TAG_AGE), age) + put(ContextSpecificTag(TAG_ALLOCATED), allocated) + put(ContextSpecificTag(TAG_LINK_ESTABLISHED), linkEstablished) + endStructure() + } + } + + companion object { + private const val TAG_EXT_ADDRESS = 0 + private const val TAG_RLOC16 = 1 + private const val TAG_ROUTER_ID = 2 + private const val TAG_NEXT_HOP = 3 + private const val TAG_PATH_COST = 4 + private const val TAG_L_Q_I_IN = 5 + private const val TAG_L_Q_I_OUT = 6 + private const val TAG_AGE = 7 + private const val TAG_ALLOCATED = 8 + private const val TAG_LINK_ESTABLISHED = 9 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterRouteTableStruct { + tlvReader.enterStructure(tag) + val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) + val rloc16 = tlvReader.getInt(ContextSpecificTag(TAG_RLOC16)) + val routerId = tlvReader.getInt(ContextSpecificTag(TAG_ROUTER_ID)) + val nextHop = tlvReader.getInt(ContextSpecificTag(TAG_NEXT_HOP)) + val pathCost = tlvReader.getInt(ContextSpecificTag(TAG_PATH_COST)) + val LQIIn = tlvReader.getInt(ContextSpecificTag(TAG_L_Q_I_IN)) + val LQIOut = tlvReader.getInt(ContextSpecificTag(TAG_L_Q_I_OUT)) + val age = tlvReader.getInt(ContextSpecificTag(TAG_AGE)) + val allocated = tlvReader.getBoolean(ContextSpecificTag(TAG_ALLOCATED)) + val linkEstablished = tlvReader.getBoolean(ContextSpecificTag(TAG_LINK_ESTABLISHED)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterRouteTableStruct( + extAddress, + rloc16, + routerId, + nextHop, + pathCost, + LQIIn, + LQIOut, + age, + allocated, + linkEstablished + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt new file mode 100644 index 00000000000000..1474db405b9d43 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val flags: Int) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n") + append("\trotationTime : $rotationTime\n") + append("\tflags : $flags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ROTATION_TIME), rotationTime) + put(ContextSpecificTag(TAG_FLAGS), flags) + endStructure() + } + } + + companion object { + private const val TAG_ROTATION_TIME = 0 + private const val TAG_FLAGS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterSecurityPolicy { + tlvReader.enterStructure(tag) + val rotationTime = tlvReader.getInt(ContextSpecificTag(TAG_ROTATION_TIME)) + val flags = tlvReader.getInt(ContextSpecificTag(TAG_FLAGS)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterSecurityPolicy(rotationTime, flags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt new file mode 100644 index 00000000000000..d770d7a2ac8e03 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TimeSynchronizationClusterDSTOffsetStruct( + val offset: Long, + val validStarting: Long, + val validUntil: Long? +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterDSTOffsetStruct {\n") + append("\toffset : $offset\n") + append("\tvalidStarting : $validStarting\n") + append("\tvalidUntil : $validUntil\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OFFSET), offset) + put(ContextSpecificTag(TAG_VALID_STARTING), validStarting) + if (validUntil != null) { + put(ContextSpecificTag(TAG_VALID_UNTIL), validUntil) + } else { + putNull(ContextSpecificTag(TAG_VALID_UNTIL)) + } + endStructure() + } + } + + companion object { + private const val TAG_OFFSET = 0 + private const val TAG_VALID_STARTING = 1 + private const val TAG_VALID_UNTIL = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { + tlvReader.enterStructure(tag) + val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) + val validStarting = tlvReader.getLong(ContextSpecificTag(TAG_VALID_STARTING)) + val validUntil = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) + null + } + + tlvReader.exitContainer() + + return TimeSynchronizationClusterDSTOffsetStruct(offset, validStarting, validUntil) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt new file mode 100644 index 00000000000000..7a2e95c671517a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( + val nodeID: Long, + val endpoint: Int +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct {\n") + append("\tnodeID : $nodeID\n") + append("\tendpoint : $endpoint\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + endStructure() + } + } + + companion object { + private const val TAG_NODE_I_D = 0 + private const val TAG_ENDPOINT = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { + tlvReader.enterStructure(tag) + val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) + val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + + tlvReader.exitContainer() + + return TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct(nodeID, endpoint) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt new file mode 100644 index 00000000000000..8a256fd7edfefe --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class TimeSynchronizationClusterTimeZoneStruct( + val offset: Long, + val validAt: Long, + val name: Optional +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterTimeZoneStruct {\n") + append("\toffset : $offset\n") + append("\tvalidAt : $validAt\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OFFSET), offset) + put(ContextSpecificTag(TAG_VALID_AT), validAt) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + endStructure() + } + } + + companion object { + private const val TAG_OFFSET = 0 + private const val TAG_VALID_AT = 1 + private const val TAG_NAME = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { + tlvReader.enterStructure(tag) + val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) + val validAt = tlvReader.getLong(ContextSpecificTag(TAG_VALID_AT)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return TimeSynchronizationClusterTimeZoneStruct(offset, validAt, name) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt new file mode 100644 index 00000000000000..db50619ad5da53 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TimeSynchronizationClusterTrustedTimeSourceStruct( + val fabricIndex: Int, + val nodeID: Long, + val endpoint: Int +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tnodeID : $nodeID\n") + append("\tendpoint : $endpoint\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_INDEX = 0 + private const val TAG_NODE_I_D = 1 + private const val TAG_ENDPOINT = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTrustedTimeSourceStruct { + tlvReader.enterStructure(tag) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) + val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + + tlvReader.exitContainer() + + return TimeSynchronizationClusterTrustedTimeSourceStruct(fabricIndex, nodeID, endpoint) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..3633524a987a8c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TonerCartridgeMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("TonerCartridgeMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): TonerCartridgeMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return TonerCartridgeMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt new file mode 100644 index 00000000000000..bd34e9f5a90c49 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterDoubleNestedStructList(val a: List) { + override fun toString(): String = buildString { + append("UnitTestingClusterDoubleNestedStructList {\n") + append("\ta : $a\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_A)) + for (item in a.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterDoubleNestedStructList { + tlvReader.enterStructure(tag) + val a = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_A)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return UnitTestingClusterDoubleNestedStructList(a) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt new file mode 100644 index 00000000000000..7ca3b0b29aab01 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterNestedStruct( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct +) { + override fun toString(): String = buildString { + append("UnitTestingClusterNestedStruct {\n") + append("\ta : $a\n") + append("\tb : $b\n") + append("\tc : $c\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_A), a) + put(ContextSpecificTag(TAG_B), b) + c.toTlv(ContextSpecificTag(TAG_C), this) + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + private const val TAG_B = 1 + private const val TAG_C = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { + tlvReader.enterStructure(tag) + val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) + val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) + val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) + + tlvReader.exitContainer() + + return UnitTestingClusterNestedStruct(a, b, c) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt new file mode 100644 index 00000000000000..b954fe0ec9879b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt @@ -0,0 +1,129 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterNestedStructList( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct, + val d: List, + val e: List, + val f: List, + val g: List +) { + override fun toString(): String = buildString { + append("UnitTestingClusterNestedStructList {\n") + append("\ta : $a\n") + append("\tb : $b\n") + append("\tc : $c\n") + append("\td : $d\n") + append("\te : $e\n") + append("\tf : $f\n") + append("\tg : $g\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_A), a) + put(ContextSpecificTag(TAG_B), b) + c.toTlv(ContextSpecificTag(TAG_C), this) + startList(ContextSpecificTag(TAG_D)) + for (item in d.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + startList(ContextSpecificTag(TAG_E)) + for (item in e.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_F)) + for (item in f.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_G)) + for (item in g.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + private const val TAG_B = 1 + private const val TAG_C = 2 + private const val TAG_D = 3 + private const val TAG_E = 4 + private const val TAG_F = 5 + private const val TAG_G = 6 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { + tlvReader.enterStructure(tag) + val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) + val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) + val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) + val d = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_D)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val e = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_E)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + val f = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_F)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val g = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_G)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return UnitTestingClusterNestedStructList(a, b, c, d, e, f, g) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt new file mode 100644 index 00000000000000..08a4b642e69d45 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt @@ -0,0 +1,308 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class UnitTestingClusterNullablesAndOptionalsStruct( + val nullableInt: Int?, + val optionalInt: Optional, + val nullableOptionalInt: Optional?, + val nullableString: String?, + val optionalString: Optional, + val nullableOptionalString: Optional?, + val nullableStruct: UnitTestingClusterSimpleStruct?, + val optionalStruct: Optional, + val nullableOptionalStruct: Optional?, + val nullableList: List?, + val optionalList: Optional>, + val nullableOptionalList: Optional>? +) { + override fun toString(): String = buildString { + append("UnitTestingClusterNullablesAndOptionalsStruct {\n") + append("\tnullableInt : $nullableInt\n") + append("\toptionalInt : $optionalInt\n") + append("\tnullableOptionalInt : $nullableOptionalInt\n") + append("\tnullableString : $nullableString\n") + append("\toptionalString : $optionalString\n") + append("\tnullableOptionalString : $nullableOptionalString\n") + append("\tnullableStruct : $nullableStruct\n") + append("\toptionalStruct : $optionalStruct\n") + append("\tnullableOptionalStruct : $nullableOptionalStruct\n") + append("\tnullableList : $nullableList\n") + append("\toptionalList : $optionalList\n") + append("\tnullableOptionalList : $nullableOptionalList\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (nullableInt != null) { + put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_INT)) + } + if (optionalInt.isPresent) { + val optoptionalInt = optionalInt.get() + put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) + } + if (nullableOptionalInt != null) { + if (nullableOptionalInt.isPresent) { + val optnullableOptionalInt = nullableOptionalInt.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + } + if (nullableString != null) { + put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + } + if (optionalString.isPresent) { + val optoptionalString = optionalString.get() + put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) + } + if (nullableOptionalString != null) { + if (nullableOptionalString.isPresent) { + val optnullableOptionalString = nullableOptionalString.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + } + if (nullableStruct != null) { + nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + } + if (optionalStruct.isPresent) { + val optoptionalStruct = optionalStruct.get() + optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) + } + if (nullableOptionalStruct != null) { + if (nullableOptionalStruct.isPresent) { + val optnullableOptionalStruct = nullableOptionalStruct.get() + optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + } + if (nullableList != null) { + startList(ContextSpecificTag(TAG_NULLABLE_LIST)) + for (item in nullableList.iterator()) { + put(AnonymousTag, item) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + } + if (optionalList.isPresent) { + val optoptionalList = optionalList.get() + startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + for (item in optoptionalList.iterator()) { + put(AnonymousTag, item) + } + endList() + } + if (nullableOptionalList != null) { + if (nullableOptionalList.isPresent) { + val optnullableOptionalList = nullableOptionalList.get() + startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + for (item in optnullableOptionalList.iterator()) { + put(AnonymousTag, item) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + } + endStructure() + } + } + + companion object { + private const val TAG_NULLABLE_INT = 0 + private const val TAG_OPTIONAL_INT = 1 + private const val TAG_NULLABLE_OPTIONAL_INT = 2 + private const val TAG_NULLABLE_STRING = 3 + private const val TAG_OPTIONAL_STRING = 4 + private const val TAG_NULLABLE_OPTIONAL_STRING = 5 + private const val TAG_NULLABLE_STRUCT = 6 + private const val TAG_OPTIONAL_STRUCT = 7 + private const val TAG_NULLABLE_OPTIONAL_STRUCT = 8 + private const val TAG_NULLABLE_LIST = 9 + private const val TAG_OPTIONAL_LIST = 10 + private const val TAG_NULLABLE_OPTIONAL_LIST = 11 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { + tlvReader.enterStructure(tag) + val nullableInt = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_INT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) + null + } + val optionalInt = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_INT))) + } else { + Optional.empty() + } + val nullableOptionalInt = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + null + } + val nullableString = + if (!tlvReader.isNull()) { + tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + null + } + val optionalString = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) + } else { + Optional.empty() + } + val nullableOptionalString = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + null + } + val nullableStruct = + if (!tlvReader.isNull()) { + UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + null + } + val optionalStruct = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + val nullableOptionalStruct = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + null + } + val nullableList = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + null + } + val optionalList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + val nullableOptionalList = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + null + } + + tlvReader.exitContainer() + + return UnitTestingClusterNullablesAndOptionalsStruct( + nullableInt, + optionalInt, + nullableOptionalInt, + nullableString, + optionalString, + nullableOptionalString, + nullableStruct, + optionalStruct, + nullableOptionalStruct, + nullableList, + optionalList, + nullableOptionalList + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt new file mode 100644 index 00000000000000..26bf18a07ed214 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterSimpleStruct( + val a: Int, + val b: Boolean, + val c: Int, + val d: ByteArray, + val e: String, + val f: Int, + val g: Float, + val h: Double +) { + override fun toString(): String = buildString { + append("UnitTestingClusterSimpleStruct {\n") + append("\ta : $a\n") + append("\tb : $b\n") + append("\tc : $c\n") + append("\td : $d\n") + append("\te : $e\n") + append("\tf : $f\n") + append("\tg : $g\n") + append("\th : $h\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_A), a) + put(ContextSpecificTag(TAG_B), b) + put(ContextSpecificTag(TAG_C), c) + put(ContextSpecificTag(TAG_D), d) + put(ContextSpecificTag(TAG_E), e) + put(ContextSpecificTag(TAG_F), f) + put(ContextSpecificTag(TAG_G), g) + put(ContextSpecificTag(TAG_H), h) + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + private const val TAG_B = 1 + private const val TAG_C = 2 + private const val TAG_D = 3 + private const val TAG_E = 4 + private const val TAG_F = 5 + private const val TAG_G = 6 + private const val TAG_H = 7 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { + tlvReader.enterStructure(tag) + val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) + val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) + val c = tlvReader.getInt(ContextSpecificTag(TAG_C)) + val d = tlvReader.getByteArray(ContextSpecificTag(TAG_D)) + val e = tlvReader.getString(ContextSpecificTag(TAG_E)) + val f = tlvReader.getInt(ContextSpecificTag(TAG_F)) + val g = tlvReader.getFloat(ContextSpecificTag(TAG_G)) + val h = tlvReader.getDouble(ContextSpecificTag(TAG_H)) + + tlvReader.exitContainer() + + return UnitTestingClusterSimpleStruct(a, b, c, d, e, f, g, h) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt new file mode 100644 index 00000000000000..6b7273f3172d5d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt @@ -0,0 +1,161 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class UnitTestingClusterTestFabricScoped( + val fabricSensitiveInt8u: Int, + val optionalFabricSensitiveInt8u: Optional, + val nullableFabricSensitiveInt8u: Int?, + val nullableOptionalFabricSensitiveInt8u: Optional?, + val fabricSensitiveCharString: String, + val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, + val fabricSensitiveInt8uList: List, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestFabricScoped {\n") + append("\tfabricSensitiveInt8u : $fabricSensitiveInt8u\n") + append("\toptionalFabricSensitiveInt8u : $optionalFabricSensitiveInt8u\n") + append("\tnullableFabricSensitiveInt8u : $nullableFabricSensitiveInt8u\n") + append("\tnullableOptionalFabricSensitiveInt8u : $nullableOptionalFabricSensitiveInt8u\n") + append("\tfabricSensitiveCharString : $fabricSensitiveCharString\n") + append("\tfabricSensitiveStruct : $fabricSensitiveStruct\n") + append("\tfabricSensitiveInt8uList : $fabricSensitiveInt8uList\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U), fabricSensitiveInt8u) + if (optionalFabricSensitiveInt8u.isPresent) { + val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optoptionalFabricSensitiveInt8u + ) + } + if (nullableFabricSensitiveInt8u != null) { + put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } + if (nullableOptionalFabricSensitiveInt8u != null) { + if (nullableOptionalFabricSensitiveInt8u.isPresent) { + val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optnullableOptionalFabricSensitiveInt8u + ) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + } + put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING), fabricSensitiveCharString) + fabricSensitiveStruct.toTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), this) + startList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + for (item in fabricSensitiveInt8uList.iterator()) { + put(AnonymousTag, item) + } + endList() + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_SENSITIVE_INT8U = 1 + private const val TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U = 2 + private const val TAG_NULLABLE_FABRIC_SENSITIVE_INT8U = 3 + private const val TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U = 4 + private const val TAG_FABRIC_SENSITIVE_CHAR_STRING = 5 + private const val TAG_FABRIC_SENSITIVE_STRUCT = 6 + private const val TAG_FABRIC_SENSITIVE_INT8U_LIST = 7 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { + tlvReader.enterStructure(tag) + val fabricSensitiveInt8u = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U)) + val optionalFabricSensitiveInt8u = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + val nullableFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + null + } + val nullableOptionalFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + if ( + tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) { + Optional.of( + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + null + } + val fabricSensitiveCharString = + tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) + val fabricSensitiveStruct = + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), + tlvReader + ) + val fabricSensitiveInt8uList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestFabricScoped( + fabricSensitiveInt8u, + optionalFabricSensitiveInt8u, + nullableFabricSensitiveInt8u, + nullableOptionalFabricSensitiveInt8u, + fabricSensitiveCharString, + fabricSensitiveStruct, + fabricSensitiveInt8uList, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt new file mode 100644 index 00000000000000..6c5df4cb224166 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterTestListStructOctet(val member1: Long, val member2: ByteArray) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestListStructOctet {\n") + append("\tmember1 : $member1\n") + append("\tmember2 : $member2\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_MEMBER1), member1) + put(ContextSpecificTag(TAG_MEMBER2), member2) + endStructure() + } + } + + companion object { + private const val TAG_MEMBER1 = 0 + private const val TAG_MEMBER2 = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestListStructOctet { + tlvReader.enterStructure(tag) + val member1 = tlvReader.getLong(ContextSpecificTag(TAG_MEMBER1)) + val member2 = tlvReader.getByteArray(ContextSpecificTag(TAG_MEMBER2)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestListStructOctet(member1, member2) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt new file mode 100644 index 00000000000000..d90396f2a010ea --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UserLabelClusterLabelStruct(val label: String, val value: String) { + override fun toString(): String = buildString { + append("UserLabelClusterLabelStruct {\n") + append("\tlabel : $label\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return UserLabelClusterLabelStruct(label, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..c8f3fbfd0085f7 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UvFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("UvFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UvFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return UvFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..0d0eadde9869da --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class WaterTankMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("WaterTankMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): WaterTankMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return WaterTankMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..a76eb3c119b24b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ZeoliteFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("ZeoliteFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ZeoliteFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return ZeoliteFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/src/chip/devicecontroller/cluster/TlvReaderExtension.kt b/src/controller/java/src/chip/devicecontroller/cluster/TlvReaderExtension.kt new file mode 100644 index 00000000000000..7f97fb3be1563f --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/cluster/TlvReaderExtension.kt @@ -0,0 +1,44 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package chip.devicecontroller.cluster + +import chip.tlv.NullValue +import chip.tlv.Tag +import chip.tlv.TlvReader + +fun TlvReader.getBoolean(tag: Tag): Boolean { + return getBool(tag) +} + +fun TlvReader.getString(tag: Tag): String { + return getUtf8String(tag) +} + +fun TlvReader.getByteArray(tag: Tag): ByteArray { + return getByteString(tag) +} + +fun TlvReader.isNull(): Boolean { + val value = peekElement().value + return (value is NullValue) +} + +fun TlvReader.isNextTag(tag: Tag): Boolean { + val nextTag = peekElement().tag + return (nextTag == tag) +} diff --git a/src/controller/java/src/chip/devicecontroller/cluster/files.gni b/src/controller/java/src/chip/devicecontroller/cluster/files.gni new file mode 100644 index 00000000000000..c03d2afad86d59 --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/cluster/files.gni @@ -0,0 +1,151 @@ +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +structs_sources = [ + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt", +] + +eventstructs_sources = [ + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt", +] diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index 1f02502b7ac533..ce2cbbb60402f8 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -181,8 +181,20 @@ public class ChipClusters { {{asUpperCamelCase name}}AttributeCallback callback {{/if_basic_attribute}} ) { - read{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback); + read{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback{{#if_is_fabric_scoped_struct type}}, true{{/if_is_fabric_scoped_struct}}); } + {{#if_is_fabric_scoped_struct type}} + public void read{{asUpperCamelCase name}}AttributeWithFabricFilter( + {{#if_basic_attribute type ../id}} + {{as_underlying_java_zcl_type type ../id boolean="Boolean"}}AttributeCallback callback + {{else}} + {{asUpperCamelCase name}}AttributeCallback callback + {{/if_basic_attribute}}, + boolean isFabricFiltered + ) { + read{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, isFabricFiltered); + } + {{/if_is_fabric_scoped_struct}} {{#if isWritableAttribute}} {{#unless mustUseTimedWrite}} public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback, {{asJavaType type chipType parent.name}} value) { @@ -218,6 +230,9 @@ public class ChipClusters { {{else}} {{asUpperCamelCase name}}AttributeCallback callback {{/if_basic_attribute}} + {{#if_is_fabric_scoped_struct type}} + , boolean isFabricFiltered + {{/if_is_fabric_scoped_struct}} ); {{#if isWritableAttribute}} diff --git a/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt new file mode 100644 index 00000000000000..a0b83d5dafbff5 --- /dev/null +++ b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster + +import chip.devicecontroller.cluster.eventstructs.UnitTestingClusterTestEventEvent +import chip.devicecontroller.cluster.eventstructs.UnitTestingClusterTestFabricScopedEventEvent +import chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct +import chip.tlv.AnonymousTag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import org.junit.Test + +class ChipClusterEventStructTest { + @Test + fun testEventEventTlvTest() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val simpleStruct2 = + UnitTestingClusterSimpleStruct(8, false, 9, byteArrayOf(0x02, 0x03), "test2", 4, 5.6f, 7.8) + val struct = + UnitTestingClusterTestEventEvent( + 1, + 2, + true, + simpleStruct, + listOf(simpleStruct, simpleStruct2), + listOf(3, 4, 5) + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = UnitTestingClusterTestEventEvent.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun testFabricScopedEventEventTest() { + val struct = UnitTestingClusterTestFabricScopedEventEvent(1) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterTestFabricScopedEventEvent.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } +} diff --git a/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt new file mode 100644 index 00000000000000..1e5923f41eac9e --- /dev/null +++ b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt @@ -0,0 +1,395 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster + +import chip.devicecontroller.cluster.structs.UnitTestingClusterDoubleNestedStructList +import chip.devicecontroller.cluster.structs.UnitTestingClusterNestedStructList +import chip.devicecontroller.cluster.structs.UnitTestingClusterNullablesAndOptionalsStruct +import chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct +import chip.devicecontroller.cluster.structs.UnitTestingClusterTestFabricScoped +import chip.devicecontroller.cluster.structs.UnitTestingClusterTestListStructOctet +import chip.tlv.AnonymousTag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 + +@RunWith(JUnit4::class) +class ChipClusterStructTest { + @Test + fun doubleNestedStructTlvTest() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val simpleStruct2 = + UnitTestingClusterSimpleStruct(8, false, 9, byteArrayOf(0x02, 0x03), "test2", 4, 5.6f, 7.8) + val nestedStructList = + UnitTestingClusterNestedStructList( + 1, + true, + simpleStruct, + listOf(simpleStruct, simpleStruct2), + listOf(1L, 2L), + listOf(byteArrayOf(0x02, 0x03), byteArrayOf(0x03, 0x04)), + listOf(1, 2) + ) + val nestedStructList2 = + UnitTestingClusterNestedStructList( + 2, + false, + simpleStruct2, + listOf(simpleStruct2, simpleStruct), + listOf(3L, 4L), + listOf(byteArrayOf(0x04, 0x05), byteArrayOf(0x06, 0x07)), + listOf(3, 4, 5) + ) + val testStruct = + UnitTestingClusterDoubleNestedStructList(listOf(nestedStructList, nestedStructList2)) + + val tlvWriter = TlvWriter() + testStruct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareTestStruct = + UnitTestingClusterDoubleNestedStructList.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareTestStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun nullablesAndOptionalsStructTlvTest1() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterNullablesAndOptionalsStruct( + 1, + Optional.of(2), + Optional.of(3), + "test4", + Optional.of("test5"), + Optional.of("test6"), + simpleStruct, + Optional.of(simpleStruct), + Optional.of(simpleStruct), + listOf(1, 2, 3), + Optional.of(listOf(4, 5, 6)), + Optional.of(listOf(7, 8, 9)) + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterNullablesAndOptionalsStruct.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + // Optional Check - 1 + fun nullablesAndOptionalsStructTlvTest2() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterNullablesAndOptionalsStruct( + 1, + Optional.empty(), + Optional.empty(), + "test4", + Optional.of("test5"), + Optional.of("test6"), + simpleStruct, + Optional.empty(), + Optional.empty(), + listOf(1, 2, 3), + Optional.of(listOf(4, 5, 6)), + Optional.of(listOf(7, 8, 9)) + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterNullablesAndOptionalsStruct.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + // Optional Check - 2 + fun nullablesAndOptionalsStructTlvTest3() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterNullablesAndOptionalsStruct( + 1, + Optional.of(2), + Optional.of(3), + "test4", + Optional.empty(), + Optional.empty(), + simpleStruct, + Optional.of(simpleStruct), + Optional.of(simpleStruct), + listOf(1, 2, 3), + Optional.empty(), + Optional.empty() + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterNullablesAndOptionalsStruct.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + // Nullable check - 1 + fun nullablesAndOptionalsStructTlvTest4() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterNullablesAndOptionalsStruct( + 1, + Optional.empty(), + null, + null, + Optional.of("test5"), + Optional.of("test6"), + simpleStruct, + Optional.empty(), + null, + null, + Optional.of(listOf(4, 5, 6)), + Optional.of(listOf(7, 8, 9)) + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterNullablesAndOptionalsStruct.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + // Nullable check - 2 + fun nullablesAndOptionalsStructTlvTest5() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterNullablesAndOptionalsStruct( + null, + Optional.of(2), + Optional.of(3), + "test4", + Optional.empty(), + null, + null, + Optional.of(simpleStruct), + Optional.of(simpleStruct), + listOf(1, 2, 3), + Optional.empty(), + null + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterNullablesAndOptionalsStruct.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun testFabricScopedTlvTest1() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterTestFabricScoped( + 1, + Optional.of(2), + 3, + Optional.of(4), + "test1", + simpleStruct, + listOf(1, 2, 3), + 4 + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = UnitTestingClusterTestFabricScoped.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun testFabricScopedTlvTest2() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterTestFabricScoped( + 1, + Optional.empty(), + 3, + null, + "test1", + simpleStruct, + listOf(1, 2, 3), + 4 + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = UnitTestingClusterTestFabricScoped.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun testFabricScopedTlvTest3() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterTestFabricScoped( + 1, + Optional.of(2), + null, + Optional.empty(), + "test1", + simpleStruct, + listOf(1, 2, 3), + 4 + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = UnitTestingClusterTestFabricScoped.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun testListStructOctetTlvTest() { + val struct = UnitTestingClusterTestListStructOctet(1L, byteArrayOf(0x01, 0x02, 0x03)) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = UnitTestingClusterTestListStructOctet.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } +} diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 54e2e40372e417..9fdaae6a73d93e 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -3110,7 +3110,14 @@ default void onSubscriptionEstablished(long subscriptionId) {} public void readBindingAttribute( BindingAttributeCallback callback ) { - readBindingAttribute(chipClusterPtr, callback); + readBindingAttribute(chipClusterPtr, callback, true); + } + public void readBindingAttributeWithFabricFilter( + BindingAttributeCallback callback + , + boolean isFabricFiltered + ) { + readBindingAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeBindingAttribute(DefaultClusterCallback callback, ArrayList value) { writeBindingAttribute(chipClusterPtr, callback, value, null); @@ -3200,6 +3207,7 @@ public void subscribeClusterRevisionAttribute( private native void readBindingAttribute(long chipClusterPtr, BindingAttributeCallback callback + , boolean isFabricFiltered ); private native void writeBindingAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); @@ -3294,7 +3302,14 @@ default void onSubscriptionEstablished(long subscriptionId) {} public void readAclAttribute( AclAttributeCallback callback ) { - readAclAttribute(chipClusterPtr, callback); + readAclAttribute(chipClusterPtr, callback, true); + } + public void readAclAttributeWithFabricFilter( + AclAttributeCallback callback + , + boolean isFabricFiltered + ) { + readAclAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeAclAttribute(DefaultClusterCallback callback, ArrayList value) { writeAclAttribute(chipClusterPtr, callback, value, null); @@ -3313,7 +3328,14 @@ public void subscribeAclAttribute( public void readExtensionAttribute( ExtensionAttributeCallback callback ) { - readExtensionAttribute(chipClusterPtr, callback); + readExtensionAttribute(chipClusterPtr, callback, true); + } + public void readExtensionAttributeWithFabricFilter( + ExtensionAttributeCallback callback + , + boolean isFabricFiltered + ) { + readExtensionAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeExtensionAttribute(DefaultClusterCallback callback, ArrayList value) { writeExtensionAttribute(chipClusterPtr, callback, value, null); @@ -3439,6 +3461,7 @@ public void subscribeClusterRevisionAttribute( private native void readAclAttribute(long chipClusterPtr, AclAttributeCallback callback + , boolean isFabricFiltered ); private native void writeAclAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); @@ -3448,6 +3471,7 @@ private native void subscribeAclAttribute(long chipClusterPtr, private native void readExtensionAttribute(long chipClusterPtr, ExtensionAttributeCallback callback + , boolean isFabricFiltered ); private native void writeExtensionAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); @@ -4706,7 +4730,14 @@ default void onSubscriptionEstablished(long subscriptionId) {} public void readDefaultOTAProvidersAttribute( DefaultOTAProvidersAttributeCallback callback ) { - readDefaultOTAProvidersAttribute(chipClusterPtr, callback); + readDefaultOTAProvidersAttribute(chipClusterPtr, callback, true); + } + public void readDefaultOTAProvidersAttributeWithFabricFilter( + DefaultOTAProvidersAttributeCallback callback + , + boolean isFabricFiltered + ) { + readDefaultOTAProvidersAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeDefaultOTAProvidersAttribute(DefaultClusterCallback callback, ArrayList value) { writeDefaultOTAProvidersAttribute(chipClusterPtr, callback, value, null); @@ -4832,6 +4863,7 @@ public void subscribeClusterRevisionAttribute( private native void readDefaultOTAProvidersAttribute(long chipClusterPtr, DefaultOTAProvidersAttributeCallback callback + , boolean isFabricFiltered ); private native void writeDefaultOTAProvidersAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); @@ -11736,7 +11768,14 @@ default void onSubscriptionEstablished(long subscriptionId) {} public void readNOCsAttribute( NOCsAttributeCallback callback ) { - readNOCsAttribute(chipClusterPtr, callback); + readNOCsAttribute(chipClusterPtr, callback, true); + } + public void readNOCsAttributeWithFabricFilter( + NOCsAttributeCallback callback + , + boolean isFabricFiltered + ) { + readNOCsAttribute(chipClusterPtr, callback, isFabricFiltered); } public void subscribeNOCsAttribute( NOCsAttributeCallback callback @@ -11748,7 +11787,14 @@ public void subscribeNOCsAttribute( public void readFabricsAttribute( FabricsAttributeCallback callback ) { - readFabricsAttribute(chipClusterPtr, callback); + readFabricsAttribute(chipClusterPtr, callback, true); + } + public void readFabricsAttributeWithFabricFilter( + FabricsAttributeCallback callback + , + boolean isFabricFiltered + ) { + readFabricsAttribute(chipClusterPtr, callback, isFabricFiltered); } public void subscribeFabricsAttribute( FabricsAttributeCallback callback @@ -11879,6 +11925,7 @@ public void subscribeClusterRevisionAttribute( private native void readNOCsAttribute(long chipClusterPtr, NOCsAttributeCallback callback + , boolean isFabricFiltered ); private native void subscribeNOCsAttribute(long chipClusterPtr, NOCsAttributeCallback callback @@ -11886,6 +11933,7 @@ private native void subscribeNOCsAttribute(long chipClusterPtr, private native void readFabricsAttribute(long chipClusterPtr, FabricsAttributeCallback callback + , boolean isFabricFiltered ); private native void subscribeFabricsAttribute(long chipClusterPtr, FabricsAttributeCallback callback @@ -12074,7 +12122,14 @@ default void onSubscriptionEstablished(long subscriptionId) {} public void readGroupKeyMapAttribute( GroupKeyMapAttributeCallback callback ) { - readGroupKeyMapAttribute(chipClusterPtr, callback); + readGroupKeyMapAttribute(chipClusterPtr, callback, true); + } + public void readGroupKeyMapAttributeWithFabricFilter( + GroupKeyMapAttributeCallback callback + , + boolean isFabricFiltered + ) { + readGroupKeyMapAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeGroupKeyMapAttribute(DefaultClusterCallback callback, ArrayList value) { writeGroupKeyMapAttribute(chipClusterPtr, callback, value, null); @@ -12093,7 +12148,14 @@ public void subscribeGroupKeyMapAttribute( public void readGroupTableAttribute( GroupTableAttributeCallback callback ) { - readGroupTableAttribute(chipClusterPtr, callback); + readGroupTableAttribute(chipClusterPtr, callback, true); + } + public void readGroupTableAttributeWithFabricFilter( + GroupTableAttributeCallback callback + , + boolean isFabricFiltered + ) { + readGroupTableAttribute(chipClusterPtr, callback, isFabricFiltered); } public void subscribeGroupTableAttribute( GroupTableAttributeCallback callback @@ -12200,6 +12262,7 @@ public void subscribeClusterRevisionAttribute( private native void readGroupKeyMapAttribute(long chipClusterPtr, GroupKeyMapAttributeCallback callback + , boolean isFabricFiltered ); private native void writeGroupKeyMapAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); @@ -12209,6 +12272,7 @@ private native void subscribeGroupKeyMapAttribute(long chipClusterPtr, private native void readGroupTableAttribute(long chipClusterPtr, GroupTableAttributeCallback callback + , boolean isFabricFiltered ); private native void subscribeGroupTableAttribute(long chipClusterPtr, GroupTableAttributeCallback callback @@ -13346,7 +13410,14 @@ public void subscribeActiveModeThresholdAttribute( public void readRegisteredClientsAttribute( RegisteredClientsAttributeCallback callback ) { - readRegisteredClientsAttribute(chipClusterPtr, callback); + readRegisteredClientsAttribute(chipClusterPtr, callback, true); + } + public void readRegisteredClientsAttributeWithFabricFilter( + RegisteredClientsAttributeCallback callback + , + boolean isFabricFiltered + ) { + readRegisteredClientsAttribute(chipClusterPtr, callback, isFabricFiltered); } public void subscribeRegisteredClientsAttribute( RegisteredClientsAttributeCallback callback @@ -13474,6 +13545,7 @@ private native void subscribeActiveModeThresholdAttribute(long chipClusterPtr, private native void readRegisteredClientsAttribute(long chipClusterPtr, RegisteredClientsAttributeCallback callback + , boolean isFabricFiltered ); private native void subscribeRegisteredClientsAttribute(long chipClusterPtr, RegisteredClientsAttributeCallback callback @@ -37758,7 +37830,14 @@ public void subscribeListLongOctetStringAttribute( public void readListFabricScopedAttribute( ListFabricScopedAttributeCallback callback ) { - readListFabricScopedAttribute(chipClusterPtr, callback); + readListFabricScopedAttribute(chipClusterPtr, callback, true); + } + public void readListFabricScopedAttributeWithFabricFilter( + ListFabricScopedAttributeCallback callback + , + boolean isFabricFiltered + ) { + readListFabricScopedAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeListFabricScopedAttribute(DefaultClusterCallback callback, ArrayList value) { writeListFabricScopedAttribute(chipClusterPtr, callback, value, null); @@ -38926,6 +39005,7 @@ private native void subscribeListLongOctetStringAttribute(long chipClusterPtr, private native void readListFabricScopedAttribute(long chipClusterPtr, ListFabricScopedAttributeCallback callback + , boolean isFabricFiltered ); private native void writeListFabricScopedAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp index 100ec13b01ae27..8f9fa06336b0da 100644 --- a/src/controller/tests/TestWriteChunking.cpp +++ b/src/controller/tests/TestWriteChunking.cpp @@ -203,21 +203,22 @@ void TestWriteChunking::TestListChunking(nlTestSuite * apSuite, void * apContext app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute); // - // We've empirically determined that by reserving 950 bytes in the packet buffer, we can fit 2 + // We've empirically determined that by reserving all but 75 bytes in the packet buffer, we can fit 2 // AttributeDataIBs into the packet. ~30-40 bytes covers a single write chunk, but let's 2-3x that // to ensure we'll sweep from fitting 2 chunks to 3-4 chunks. // - for (int i = 100; i > 0; i--) + constexpr size_t minReservationSize = kMaxSecureSduLengthBytes - 75 - 100; + for (uint32_t i = 100; i > 0; i--) { CHIP_ERROR err = CHIP_NO_ERROR; TestWriteCallback writeCallback; ChipLogDetail(DataManagement, "Running iteration %d\n", i); - gIterationCount = (uint32_t) i; + gIterationCount = i; app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(850 + i) /* reserved buffer size */); + static_cast(minReservationSize + i) /* reserved buffer size */); ByteSpan list[kTestListLength]; @@ -358,15 +359,16 @@ void TestWriteChunking::TestConflictWrite(nlTestSuite * apSuite, void * apContex app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute); + /* use a smaller chunk (128 bytes) so we only need a few attributes in the write request. */ + constexpr size_t kReserveSize = kMaxSecureSduLengthBytes - 128; + TestWriteCallback writeCallback1; - app::WriteClient writeClient1( - &ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient1(&ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), + static_cast(kReserveSize)); TestWriteCallback writeCallback2; - app::WriteClient writeClient2( - &ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient2(&ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), + static_cast(kReserveSize)); ByteSpan list[kTestListLength]; @@ -435,15 +437,16 @@ void TestWriteChunking::TestNonConflictWrite(nlTestSuite * apSuite, void * apCon app::AttributePathParams attributePath1(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute); app::AttributePathParams attributePath2(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute2); + /* use a smaller chunk (128 bytes) so we only need a few attributes in the write request. */ + constexpr size_t kReserveSize = kMaxSecureSduLengthBytes - 128; + TestWriteCallback writeCallback1; - app::WriteClient writeClient1( - &ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient1(&ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), + static_cast(kReserveSize)); TestWriteCallback writeCallback2; - app::WriteClient writeClient2( - &ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient2(&ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), + static_cast(kReserveSize)); ByteSpan list[kTestListLength]; @@ -514,7 +517,8 @@ void RunTest(nlTestSuite * apSuite, TestContext & ctx, Instructions instructions TestWriteCallback writeCallback; std::unique_ptr writeClient = std::make_unique( &ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + static_cast(kMaxSecureSduLengthBytes - + 128) /* use a smaller chunk so we only need a few attributes in the write request. */); ConcreteAttributePath onGoingPath = ConcreteAttributePath(); std::vector status; diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index 30120eca8ad794..59485d46cf971f 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -1063,7 +1063,7 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit } // Read of E2C3A* and E3C2A2, and inject a large amount of event path list, then it would try to apply previous cache - // latest data version and construct data version list but no enough memory, finally fully rollback data version filter. Expect + // latest data version and construct data version list but run out of memory, finally fully rollback data version filter. Expect // E2C3A* attributes in report, and E3C2A2 attribute in report { testId++; @@ -1081,8 +1081,12 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit readPrepareParams.mpAttributePathParamsList = attributePathParams2; readPrepareParams.mAttributePathParamsListSize = 2; - readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mEventPathParamsListSize = 64; + readPrepareParams.mpEventPathParamsList = eventPathParams; + // This size needs to be big enough that we can't fit our + // DataVersionFilterIBs in the same packet. Max size is + // ArraySize(eventPathParams); + static_assert(75 <= ArraySize(eventPathParams)); + readPrepareParams.mEventPathParamsListSize = 75; err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -1252,8 +1256,8 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit // Read of E1C2A*(3 attributes) and E2C3A*(5 attributes) and E2C2A*(4 attributes), and inject a large amount of event path // list, then it would try to apply previous cache latest data version and construct data version list with the ordering from - // largest cluster size to smallest cluster size(C2, C3, C1) but no enough memory, finally partially rollback data version - // filter with only C2. Expect E1C2A*, E2C2A* attributes(7 attributes) in report, + // largest cluster size to smallest cluster size(C3, C2, C1) but run out of memory, finally partially rollback data version + // filter with only C3. Expect E1C2A*, E2C2A* attributes(7 attributes) in report, { testId++; ChipLogProgress(DataManagement, "\t -- Running Read with ClusterStateCache Test ID %d", testId); @@ -1275,8 +1279,12 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit readPrepareParams.mpAttributePathParamsList = attributePathParams3; readPrepareParams.mAttributePathParamsListSize = 3; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mEventPathParamsListSize = 62; - err = readClient.SendRequest(readPrepareParams); + + // This size needs to be big enough that we can only fit our first + // DataVersionFilterIB. Max size is ArraySize(eventPathParams); + static_assert(73 <= ArraySize(eventPathParams)); + readPrepareParams.mEventPathParamsListSize = 73; + err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index eeb5932f01a48a..8ec4691f9f80fa 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -78,12 +78,13 @@ CHIP_ERROR FabricInfo::Init(const FabricInfo::InitParams & initParams) Reset(); - mNodeId = initParams.nodeId; - mFabricId = initParams.fabricId; - mFabricIndex = initParams.fabricIndex; - mCompressedFabricId = initParams.compressedFabricId; - mRootPublicKey = initParams.rootPublicKey; - mVendorId = static_cast(initParams.vendorId); + mNodeId = initParams.nodeId; + mFabricId = initParams.fabricId; + mFabricIndex = initParams.fabricIndex; + mCompressedFabricId = initParams.compressedFabricId; + mRootPublicKey = initParams.rootPublicKey; + mVendorId = static_cast(initParams.vendorId); + mShouldAdvertiseIdentity = initParams.advertiseIdentity; // Deal with externally injected keys if (initParams.operationalKeypair != nullptr) @@ -105,12 +106,13 @@ void FabricInfo::operator=(FabricInfo && other) { Reset(); - mNodeId = other.mNodeId; - mFabricId = other.mFabricId; - mFabricIndex = other.mFabricIndex; - mCompressedFabricId = other.mCompressedFabricId; - mRootPublicKey = other.mRootPublicKey; - mVendorId = other.mVendorId; + mNodeId = other.mNodeId; + mFabricId = other.mFabricId; + mFabricIndex = other.mFabricIndex; + mCompressedFabricId = other.mCompressedFabricId; + mRootPublicKey = other.mRootPublicKey; + mVendorId = other.mVendorId; + mShouldAdvertiseIdentity = other.mShouldAdvertiseIdentity; SetFabricLabel(other.GetFabricLabel()); @@ -768,7 +770,7 @@ CHIP_ERROR FabricTable::NotifyFabricCommitted(FabricIndex fabricIndex) CHIP_ERROR FabricTable::AddOrUpdateInner(FabricIndex fabricIndex, bool isAddition, Crypto::P256Keypair * existingOpKey, - bool isExistingOpKeyExternallyOwned, uint16_t vendorId) + bool isExistingOpKeyExternallyOwned, uint16_t vendorId, AdvertiseIdentity advertiseIdentity) { // All parameters pre-validated before we get here @@ -867,6 +869,8 @@ FabricTable::AddOrUpdateInner(FabricIndex fabricIndex, bool isAddition, Crypto:: return CHIP_ERROR_INCORRECT_STATE; } + newFabricInfo.advertiseIdentity = (advertiseIdentity == AdvertiseIdentity::Yes); + // Update local copy of fabric data. For add it's a new entry, for update, it's `mPendingFabric` shadow entry. ReturnErrorOnFailure(fabricEntry->Init(newFabricInfo)); @@ -1642,7 +1646,7 @@ CHIP_ERROR FabricTable::FindExistingFabricByNocChaining(FabricIndex pendingFabri CHIP_ERROR FabricTable::AddNewPendingFabricCommon(const ByteSpan & noc, const ByteSpan & icac, uint16_t vendorId, Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, - FabricIndex * outNewFabricIndex) + AdvertiseIdentity advertiseIdentity, FabricIndex * outNewFabricIndex) { VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(outNewFabricIndex != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -1692,8 +1696,8 @@ CHIP_ERROR FabricTable::AddNewPendingFabricCommon(const ByteSpan & noc, const By ReturnErrorOnFailure(mOpCertStore->AddNewOpCertsForFabric(fabricIndexToUse, noc, icac)); VerifyOrReturnError(SetPendingDataFabricIndex(fabricIndexToUse), CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR err = - AddOrUpdateInner(fabricIndexToUse, /* isAddition = */ true, existingOpKey, isExistingOpKeyExternallyOwned, vendorId); + CHIP_ERROR err = AddOrUpdateInner(fabricIndexToUse, /* isAddition = */ true, existingOpKey, isExistingOpKeyExternallyOwned, + vendorId, advertiseIdentity); if (err != CHIP_NO_ERROR) { // Revert partial state added on error @@ -1712,7 +1716,8 @@ CHIP_ERROR FabricTable::AddNewPendingFabricCommon(const ByteSpan & noc, const By } CHIP_ERROR FabricTable::UpdatePendingFabricCommon(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac, - Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned) + Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, + AdvertiseIdentity advertiseIdentity) { VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_ARGUMENT); @@ -1751,7 +1756,7 @@ CHIP_ERROR FabricTable::UpdatePendingFabricCommon(FabricIndex fabricIndex, const VerifyOrReturnError(SetPendingDataFabricIndex(fabricIndex), CHIP_ERROR_INCORRECT_STATE); CHIP_ERROR err = AddOrUpdateInner(fabricIndex, /* isAddition = */ false, existingOpKey, isExistingOpKeyExternallyOwned, - fabricInfo->GetVendorId()); + fabricInfo->GetVendorId(), advertiseIdentity); if (err != CHIP_NO_ERROR) { // Revert partial state added on error diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 26102984e81130..96b5c415f7e237 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -112,6 +112,8 @@ class DLL_EXPORT FabricInfo bool HasOperationalKey() const { return mOperationalKey != nullptr; } + bool ShouldAdvertiseIdentity() const { return mShouldAdvertiseIdentity; } + friend class FabricTable; private: @@ -125,6 +127,7 @@ class DLL_EXPORT FabricInfo VendorId vendorId = VendorId::NotSpecified; /**< Vendor ID for commissioner of fabric */ Crypto::P256Keypair * operationalKeypair = nullptr; bool hasExternallyOwnedKeypair = false; + bool advertiseIdentity = false; CHIP_ERROR AreValid() const { @@ -204,7 +207,9 @@ class DLL_EXPORT FabricInfo { chip::Platform::Delete(mOperationalKey); } - mOperationalKey = nullptr; + mOperationalKey = nullptr; + mHasExternallyOwnedOperationalKey = false; + mShouldAdvertiseIdentity = true; mFabricIndex = kUndefinedFabricIndex; mNodeId = kUndefinedNodeId; @@ -230,14 +235,16 @@ class DLL_EXPORT FabricInfo // mFabricLabel is 33 bytes, so ends on a 1 mod 4 byte boundary. char mFabricLabel[kFabricLabelMaxLengthInBytes + 1] = { '\0' }; - // mFabricIndex, mVendorId, mHasExternallyOwnedOperationalKey are 4 bytes - // and do not end up with any padding if they come after the 33-byte - // mFabricLabel, so end on a 1 mod 4 byte boundary. + // mFabricIndex, mVendorId, mHasExternallyOwnedOperationalKey, + // mShouldAdvertiseIdentity are 5 bytes and do not include any padding if + // they come after the 33-byte mFabricLabel, so end on a 2 mod 4 byte + // boundary. FabricIndex mFabricIndex = kUndefinedFabricIndex; VendorId mVendorId = VendorId::NotSpecified; bool mHasExternallyOwnedOperationalKey = false; + bool mShouldAdvertiseIdentity = true; - // 3 bytes of padding here, since mOperationalKey needs to be void*-aligned, + // 2 bytes of padding here, since mOperationalKey needs to be void*-aligned, // so has to be at a 0 mod 4 byte location. mutable Crypto::P256Keypair * mOperationalKey = nullptr; @@ -400,6 +407,12 @@ class DLL_EXPORT FabricTable FabricTable(FabricTable const &) = delete; void operator=(FabricTable const &) = delete; + enum class AdvertiseIdentity : uint8_t + { + Yes, + No + }; + // Returns CHIP_ERROR_NOT_FOUND if there is no fabric for that index. CHIP_ERROR Delete(FabricIndex fabricIndex); void DeleteAllFabrics(); @@ -783,9 +796,10 @@ class DLL_EXPORT FabricTable * @retval other CHIP_ERROR_* on internal errors or certificate validation errors. */ CHIP_ERROR AddNewPendingFabricWithOperationalKeystore(const ByteSpan & noc, const ByteSpan & icac, uint16_t vendorId, - FabricIndex * outNewFabricIndex) + FabricIndex * outNewFabricIndex, + AdvertiseIdentity advertiseIdentity = AdvertiseIdentity::Yes) { - return AddNewPendingFabricCommon(noc, icac, vendorId, nullptr, false, outNewFabricIndex); + return AddNewPendingFabricCommon(noc, icac, vendorId, nullptr, false, advertiseIdentity, outNewFabricIndex); }; /** @@ -818,9 +832,11 @@ class DLL_EXPORT FabricTable */ CHIP_ERROR AddNewPendingFabricWithProvidedOpKey(const ByteSpan & noc, const ByteSpan & icac, uint16_t vendorId, Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, - FabricIndex * outNewFabricIndex) + FabricIndex * outNewFabricIndex, + AdvertiseIdentity advertiseIdentity = AdvertiseIdentity::Yes) { - return AddNewPendingFabricCommon(noc, icac, vendorId, existingOpKey, isExistingOpKeyExternallyOwned, outNewFabricIndex); + return AddNewPendingFabricCommon(noc, icac, vendorId, existingOpKey, isExistingOpKeyExternallyOwned, advertiseIdentity, + outNewFabricIndex); }; /** @@ -852,9 +868,10 @@ class DLL_EXPORT FabricTable * @retval CHIP_ERROR_INVALID_ARGUMENT if any of the arguments are invalid such as too large or out of bounds. * @retval other CHIP_ERROR_* on internal errors or certificate validation errors. */ - CHIP_ERROR UpdatePendingFabricWithOperationalKeystore(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac) + CHIP_ERROR UpdatePendingFabricWithOperationalKeystore(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac, + AdvertiseIdentity advertiseIdentity = AdvertiseIdentity::Yes) { - return UpdatePendingFabricCommon(fabricIndex, noc, icac, nullptr, false); + return UpdatePendingFabricCommon(fabricIndex, noc, icac, nullptr, false, advertiseIdentity); } /** @@ -886,9 +903,10 @@ class DLL_EXPORT FabricTable */ CHIP_ERROR UpdatePendingFabricWithProvidedOpKey(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac, - Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned) + Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, + AdvertiseIdentity advertiseIdentity = AdvertiseIdentity::Yes) { - return UpdatePendingFabricCommon(fabricIndex, noc, icac, existingOpKey, isExistingOpKeyExternallyOwned); + return UpdatePendingFabricCommon(fabricIndex, noc, icac, existingOpKey, isExistingOpKeyExternallyOwned, advertiseIdentity); } /** @@ -1050,16 +1068,17 @@ class DLL_EXPORT FabricTable // Core validation logic for fabric additions/updates CHIP_ERROR AddOrUpdateInner(FabricIndex fabricIndex, bool isAddition, Crypto::P256Keypair * existingOpKey, - bool isExistingOpKeyExternallyOwned, uint16_t vendorId); + bool isExistingOpKeyExternallyOwned, uint16_t vendorId, AdvertiseIdentity advertiseIdentity); // Common code for fabric addition, for either OperationalKeystore or injected key scenarios. CHIP_ERROR AddNewPendingFabricCommon(const ByteSpan & noc, const ByteSpan & icac, uint16_t vendorId, Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, - FabricIndex * outNewFabricIndex); + AdvertiseIdentity advertiseIdentity, FabricIndex * outNewFabricIndex); // Common code for fabric updates, for either OperationalKeystore or injected key scenarios. CHIP_ERROR UpdatePendingFabricCommon(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac, - Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned); + Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, + AdvertiseIdentity advertiseIdentity); // Common code for looking up a fabric given a root public key, a fabric ID and an optional node id scoped to that fabric. const FabricInfo * FindFabricCommon(const Crypto::P256PublicKey & rootPubKey, FabricId fabricId, diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index 83866b3c8bf78b..96ed242a684310 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -145,7 +145,8 @@ static CHIP_ERROR LoadTestFabric_Node01_02(nlTestSuite * inSuite, FabricTable & /** * Load a single test fabric with with the Root02:ICA02:Node02_01 identity. */ -static CHIP_ERROR LoadTestFabric_Node02_01(nlTestSuite * inSuite, FabricTable & fabricTable, bool doCommit) +static CHIP_ERROR LoadTestFabric_Node02_01(nlTestSuite * inSuite, FabricTable & fabricTable, bool doCommit, + FabricTable::AdvertiseIdentity advertiseIdentity = FabricTable::AdvertiseIdentity::Yes) { Crypto::P256SerializedKeypair opKeysSerialized; FabricIndex fabricIndex; @@ -166,8 +167,9 @@ static CHIP_ERROR LoadTestFabric_Node02_01(nlTestSuite * inSuite, FabricTable & NL_TEST_ASSERT(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcacSpan) == CHIP_NO_ERROR); - CHIP_ERROR err = fabricTable.AddNewPendingFabricWithProvidedOpKey(nocSpan, icacSpan, VendorId::TestVendor1, &opKey_Node02_01, - /*isExistingOpKeyExternallyOwned =*/true, &fabricIndex); + CHIP_ERROR err = + fabricTable.AddNewPendingFabricWithProvidedOpKey(nocSpan, icacSpan, VendorId::TestVendor1, &opKey_Node02_01, + /*isExistingOpKeyExternallyOwned =*/true, &fabricIndex, advertiseIdentity); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); if (doCommit) @@ -821,7 +823,9 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) ByteSpan noc = fabric44CertAuthority.GetNoc(); NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 2); - NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.UpdatePendingFabricWithOperationalKeystore(2, noc, ByteSpan{})); + NL_TEST_ASSERT_SUCCESS( + inSuite, + fabricTable.UpdatePendingFabricWithOperationalKeystore(2, noc, ByteSpan{}, FabricTable::AdvertiseIdentity::No)); NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 2); // No storage yet @@ -839,12 +843,14 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) { NL_TEST_ASSERT(inSuite, iterFabricInfo.GetNodeId() == 55); NL_TEST_ASSERT(inSuite, iterFabricInfo.GetFabricId() == 11); + NL_TEST_ASSERT(inSuite, iterFabricInfo.ShouldAdvertiseIdentity()); saw1 = true; } if (iterFabricInfo.GetFabricIndex() == 2) { NL_TEST_ASSERT(inSuite, iterFabricInfo.GetNodeId() == 1000); NL_TEST_ASSERT(inSuite, iterFabricInfo.GetFabricId() == 44); + NL_TEST_ASSERT(inSuite, !iterFabricInfo.ShouldAdvertiseIdentity()); saw2 = true; } } @@ -1961,6 +1967,7 @@ void TestUpdateNocFailSafe(nlTestSuite * inSuite, void * inContext) { NL_TEST_ASSERT(inSuite, iterFabricInfo.GetNodeId() == 1000); NL_TEST_ASSERT(inSuite, iterFabricInfo.GetFabricId() == 44); + NL_TEST_ASSERT(inSuite, iterFabricInfo.ShouldAdvertiseIdentity()); saw1 = true; } } @@ -2072,6 +2079,7 @@ void TestUpdateNocFailSafe(nlTestSuite * inSuite, void * inContext) { NL_TEST_ASSERT(inSuite, iterFabricInfo.GetNodeId() == 1001); NL_TEST_ASSERT(inSuite, iterFabricInfo.GetFabricId() == 44); + NL_TEST_ASSERT(inSuite, iterFabricInfo.ShouldAdvertiseIdentity()); saw1 = true; } } @@ -2342,7 +2350,9 @@ void TestFabricLookup(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fabricTableHolder.Init(&testStorage) == CHIP_NO_ERROR); FabricTable & fabricTable = fabricTableHolder.GetFabricTable(); NL_TEST_ASSERT(inSuite, LoadTestFabric_Node01_01(inSuite, fabricTable, /* doCommit = */ true) == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, LoadTestFabric_Node02_01(inSuite, fabricTable, /* doCommit = */ true) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, + LoadTestFabric_Node02_01(inSuite, fabricTable, /* doCommit = */ true, FabricTable::AdvertiseIdentity::No) == + CHIP_NO_ERROR); // Attempt lookup of the Root01 fabric. { @@ -2360,6 +2370,7 @@ void TestFabricLookup(nlTestSuite * inSuite, void * inContext) return; } NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricIndex() == 1); + NL_TEST_ASSERT(inSuite, fabricInfo->ShouldAdvertiseIdentity()); } // Attempt lookup of the Root02 fabric. @@ -2378,6 +2389,7 @@ void TestFabricLookup(nlTestSuite * inSuite, void * inContext) return; } NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricIndex() == 2); + NL_TEST_ASSERT(inSuite, !fabricInfo->ShouldAdvertiseIdentity()); } } @@ -2446,7 +2458,8 @@ void TestAddNocRootCollision(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); FabricIndex newFabricIndex = kUndefinedFabricIndex; NL_TEST_ASSERT_SUCCESS(inSuite, - fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, icac, kVendorId, &newFabricIndex)); + fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, icac, kVendorId, &newFabricIndex, + FabricTable::AdvertiseIdentity::No)); NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); NL_TEST_ASSERT(inSuite, newFabricIndex == 1); @@ -2457,6 +2470,8 @@ void TestAddNocRootCollision(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); if (fabricInfo != nullptr) { + NL_TEST_ASSERT(inSuite, !fabricInfo->ShouldAdvertiseIdentity()); + Credentials::ChipCertificateSet certificates; NL_TEST_ASSERT_SUCCESS(inSuite, certificates.Init(1)); NL_TEST_ASSERT_SUCCESS(inSuite, @@ -2561,6 +2576,8 @@ void TestAddNocRootCollision(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); if (fabricInfo != nullptr) { + NL_TEST_ASSERT(inSuite, fabricInfo->ShouldAdvertiseIdentity()); + Credentials::ChipCertificateSet certificates; NL_TEST_ASSERT_SUCCESS(inSuite, certificates.Init(1)); NL_TEST_ASSERT_SUCCESS(inSuite, diff --git a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h index da8772f2464ace..9f2f6170327b94 100644 --- a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h +++ b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h @@ -20,13 +20,18 @@ #import "MTRBaseDevice_Internal.h" #import "MTRDeviceController_Internal.h" #import "MTRError_Internal.h" +#import "NSDataSpanConversion.h" #import "zap-generated/MTRBaseClusters.h" +#import "zap-generated/MTRCommandPayloads_Internal.h" +#include #include #include #include #include +#include + NS_ASSUME_NONNULL_BEGIN /** @@ -147,7 +152,23 @@ using MTRActionBlockT = CHIP_ERROR (^)(chip::Messaging::ExchangeManager & exchan template using MTRLocalActionBlockT = CHIP_ERROR (^)(SuccessCallback successCb, MTRErrorCallback failureCb); -template class MTRCallbackBridge : public MTRCallbackBridgeBase { +class NoAttestationChallenge { +}; + +class HaveAttestationChallenge { +protected: + NSData * mAttestationChallenge; +}; + +namespace detail { +using AttestationResponseCallback + = void (*)(void *, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType &); +} // namespace detail + +template +class MTRCallbackBridge : public MTRCallbackBridgeBase, + protected std::conditional, + HaveAttestationChallenge, NoAttestationChallenge>::type { public: using MTRActionBlock = MTRActionBlockT; using MTRLocalActionBlock = MTRLocalActionBlockT; @@ -232,6 +253,10 @@ template class MTRCallbackBridge : public MTRCallbackBridgeBase { return; } + if constexpr (HaveAttestationChallenge()) { + this->mAttestationChallenge = AsData(session.Value()->AsSecureSession()->GetCryptoContext().GetAttestationChallenge()); + } + CHIP_ERROR err = action(*exchangeManager, session.Value(), mSuccess, mFailure, this); if (err != CHIP_NO_ERROR) { ChipLogError(Controller, "Failure performing action. C++-mangled success callback type: '%s', error: %s", @@ -252,7 +277,17 @@ template class MTRCallbackBridge : public MTRCallbackBridgeBase { static void DispatchFailure(void * context, NSError * error) { DispatchCallbackResult(context, error, nil); } + template static void SetAttestationChallengeIfNeeded(void * context, ResponseType * _Nonnull response) + { + if constexpr (HaveAttestationChallenge()) { + auto * self = static_cast(context); + response.attestationChallenge = self->mAttestationChallenge; + } + } + private: + static constexpr bool HaveAttestationChallenge() { return std::is_same_v; } + static void DispatchCallbackResult(void * context, NSError * _Nullable error, id _Nullable value) { MTRCallbackBridge * callbackBridge = static_cast(context); diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index eab05409e23af0..dae2acc9d57f62 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -23,9 +23,12 @@ using namespace ::chip; @implementation MTRCluster -- (instancetype)initWithQueue:(dispatch_queue_t)queue +- (instancetype)initWithEndpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue; { if (self = [super init]) { + // TODO consider range-checking the incoming number to make sure it's + // actually in the EndpointId range + _endpoint = endpointID.unsignedShortValue; _callbackQueue = queue; } return self; diff --git a/src/darwin/Framework/CHIP/MTRCluster_Internal.h b/src/darwin/Framework/CHIP/MTRCluster_Internal.h index 077628fd118a09..f3fd0f2722e323 100644 --- a/src/darwin/Framework/CHIP/MTRCluster_Internal.h +++ b/src/darwin/Framework/CHIP/MTRCluster_Internal.h @@ -24,12 +24,15 @@ #import "zap-generated/MTRBaseClusters.h" #include +#include NS_ASSUME_NONNULL_BEGIN @interface MTRCluster () @property (readonly, nonatomic) dispatch_queue_t callbackQueue; -- (instancetype _Nullable)initWithQueue:(dispatch_queue_t)queue; +@property (nonatomic, readonly) chip::EndpointId endpoint; + +- (instancetype)initWithEndpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue; - (chip::ByteSpan)asByteSpan:(NSData *)value; - (chip::CharSpan)asCharSpan:(NSString *)value; @end diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index c88866ee76358a..bd903274e66fbf 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -34,15 +34,12 @@ using chip::System::Clock::Seconds16; - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - {{!TODO consider range-checking the incoming number to make sure it's - actually in the uint16_t range}} - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -122,7 +119,7 @@ MTR{{cluster}}Cluster{{command}}Params {{/last}} {{/zcl_command_arguments}} - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -156,7 +153,7 @@ MTR{{cluster}}Cluster{{command}}Params using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; return MTRReadAttributeattribute_data_callback_name}}CallbackBridge, {{asObjectiveCClass type parent.name}}, - TypeInfo::DecodableType>(params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + TypeInfo::DecodableType>(params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } {{#if isWritableAttribute}} @@ -196,7 +193,7 @@ MTR{{cluster}}Cluster{{command}}Params TypeInfo::Type cppValue; {{>encode_value target="cppValue" source="value" cluster=parent.name errorCode="return CHIP_ERROR_INVALID_ARGUMENT;" depth=0}} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -209,7 +206,7 @@ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptio reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; - MTRSubscribeAttributeattribute_data_callback_name}}CallbackSubscriptionBridge, {{asObjectiveCClass type parent.name}}, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeAttributeattribute_data_callback_name}}CallbackSubscriptionBridge, {{asObjectiveCClass type parent.name}}, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) read{{>attribute}}WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt index 73ac0c844c96e7..9d40126f3a857d 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt @@ -10,7 +10,6 @@ {{#if (isSupported (asUpperCamelCase name preserveAcronyms=true))}} @interface MTRBaseCluster{{asUpperCamelCase name preserveAcronyms=true}} () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index 0790729ce756e5..6ae259be2877e2 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -1,6 +1,7 @@ {{> header excludeZapComment=true}} #import +#import #import "MTRAsyncCallbackWorkQueue.h" #import "MTRBaseClusterUtils.h" @@ -49,14 +50,11 @@ static void MTRClustersLogCompletion(NSString *logPrefix, id value, NSError *err - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - {{!TODO consider range-checking the incoming number to make sure it's - actually in the uint16_t range}} - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -90,6 +88,20 @@ MTRClusterIDType{{cluster}}ID MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{/unless}} {{/inline}} +{{#*inline "baseCluster"}} +{{#if (isSupported cluster command=command)}} +MTRBaseCluster{{cluster}} +{{else}} +MTRBaseCluster{{compatClusterNameRemapping parent.name}} +{{/if}} +{{/inline}} +{{#*inline "completionName"}} +{{#if (isSupported cluster command=command)}} +completion +{{else}} +completionHandler +{{/if}} +{{/inline}} {{#unless hasArguments}} - (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion { @@ -98,73 +110,38 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{/unless}} - (void){{asLowerCamelCase name}}WithParams: ({{> paramsType}} * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, (unsigned int){{> clusterId}}, (unsigned int){{> commandId}}]; + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int){{> clusterId}}, (unsigned int){{> commandId}}]; // Make a copy of params before we go async. params = [params copy]; - NSNumber *timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice *baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTR{{>callbackName}}CallbackBridge(self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[{{> baseCluster}} alloc] initWithDevice:baseDevice endpointID:@(self.endpoint) queue:self.device.queue]; + [cluster {{asLowerCamelCase name}}WithParams:params {{> completionName}}: + {{#if hasSpecificResponse}} + ^(MTR{{cluster}}Cluster{{asUpperCamelCase responseName preserveAcronyms=true}}Params * _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); dispatch_async(self.callbackQueue, ^{ - {{#if hasSpecificResponse}} - {{! This treats completion as taking an id for the data. This is - not great from a type-safety perspective, of course. }} - completion(value, error); - {{else}} - {{! For now, don't change the bridge API; instead just use an adapter - to invoke our completion handler. This is not great from a - type-safety perspective, of course. }} - completion(error); - {{/if}} + {{! This treats completion as taking an id for the data. This is + not great from a type-safety perspective, of course. }} + completion(value, error); }); [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, {{>callbackName}}CallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_castcallbackName}}CallbackBridge *>(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - {{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - {{#if mustUseTimedInvoke}} - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - {{/if}} - {{#zcl_command_arguments}} - {{#first}} - {{#unless parent.commandHasRequiredField}} - if (params != nil) { - {{/unless}} - {{/first}} - {{>encode_value target=(concat "request." (asLowerCamelCase label)) source=(concat "params." (asStructPropertyName label)) cluster=parent.parent.name errorCode="return CHIP_ERROR_INVALID_ARGUMENT;" depth=0}} - {{#last}} - {{#unless parent.commandHasRequiredField}} - } - {{/unless}} - {{/last}} - {{/zcl_command_arguments}} - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + } + {{else}} + ^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + {{! For now, don't change the bridge API; instead just use an adapter + to invoke our completion handler. This is not great from a + type-safety perspective, of course. }} + completion(error); + }); + [workItem endWork]; + } + {{/if}} + ]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -198,7 +175,7 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline}} {{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} - (NSDictionary *)read{{>attribute}}WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) params:params]; } {{#if isWritableAttribute}} @@ -216,7 +193,7 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID } {{/if}} - [self.device writeAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt index 8af0b89a300cf1..a8d80d094743d2 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt @@ -10,7 +10,6 @@ {{#if (isSupported (asUpperCamelCase name preserveAcronyms=true))}} @interface MTRCluster{{asUpperCamelCase name preserveAcronyms=true}} () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice *device; @end {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt index 84fb84e238c07f..b17994a5da6502 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt @@ -6,6 +6,10 @@ NS_ASSUME_NONNULL_BEGIN +@interface MTROperationalCredentialsClusterAttestationResponseParams () +@property (nonatomic, strong) NSData * attestationChallenge; +@end + {{#zcl_clusters}} {{#zcl_commands}} {{! We only need to generate conversion functions for the server-generated commands }} diff --git a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt index d24776d1ae5059..aea117477b3bb8 100644 --- a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt @@ -83,6 +83,7 @@ void MTR{{> @partial-block}}Bridge::OnSuccessFn(void * context OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); {{else if (isStrEqual partial-type "CommandStatus")}} DispatchSuccess(context, nil); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 4123b1d90123c2..5e6aa53256bb6f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -47,13 +47,12 @@ @implementation MTRBaseClusterIdentify - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -88,7 +87,7 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion } request.identifyTime = params.identifyTime.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127,7 +126,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params request.effectVariant = static_cast>(params.effectVariant.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -138,7 +137,7 @@ - (void)readAttributeIdentifyTimeWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -172,7 +171,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -184,7 +183,7 @@ - (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -218,7 +217,7 @@ - (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -227,7 +226,7 @@ - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -261,7 +260,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -271,7 +270,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -306,7 +305,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -316,7 +315,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -351,7 +350,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -360,7 +359,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Identify::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -394,7 +393,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -403,7 +402,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -437,7 +436,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -446,7 +445,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -480,7 +479,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -489,7 +488,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -859,13 +858,12 @@ @implementation MTRBaseClusterGroups - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -898,7 +896,7 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params request.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -932,7 +930,7 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -988,7 +986,7 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1022,7 +1020,7 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1062,7 +1060,7 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1100,7 +1098,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa request.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1111,7 +1109,7 @@ - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1120,7 +1118,7 @@ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1154,7 +1152,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1164,7 +1162,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1199,7 +1197,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1209,7 +1207,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1244,7 +1242,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1253,7 +1251,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Groups::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1287,7 +1285,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1296,7 +1294,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1330,7 +1328,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1339,7 +1337,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1373,7 +1371,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1382,7 +1380,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1745,13 +1743,12 @@ @implementation MTRBaseClusterScenes - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -1833,7 +1830,7 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1868,7 +1865,7 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1903,7 +1900,7 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1938,7 +1935,7 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1973,7 +1970,7 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2019,7 +2016,7 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params comple } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2054,7 +2051,7 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2139,7 +2136,7 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2175,7 +2172,7 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2213,7 +2210,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params request.groupIdentifierTo = params.groupIdentifierTo.unsignedShortValue; request.sceneIdentifierTo = params.sceneIdentifierTo.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2224,7 +2221,7 @@ - (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2233,7 +2230,7 @@ - (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2267,7 +2264,7 @@ - (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2276,7 +2273,7 @@ - (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2310,7 +2307,7 @@ - (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2319,7 +2316,7 @@ - (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2353,7 +2350,7 @@ - (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2362,7 +2359,7 @@ - (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2396,7 +2393,7 @@ - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2405,7 +2402,7 @@ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2439,7 +2436,7 @@ - (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2448,7 +2445,7 @@ - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2483,7 +2480,7 @@ - (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2492,7 +2489,7 @@ - (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2526,7 +2523,7 @@ - (void)readAttributeRemainingCapacityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2535,7 +2532,7 @@ - (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2570,7 +2567,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2580,7 +2577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2615,7 +2612,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2625,7 +2622,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2660,7 +2657,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2669,7 +2666,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Scenes::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2703,7 +2700,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2712,7 +2709,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2746,7 +2743,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2755,7 +2752,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2789,7 +2786,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2798,7 +2795,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3416,13 +3413,12 @@ @implementation MTRBaseClusterOnOff - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -3460,7 +3456,7 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(M } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3499,7 +3495,7 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTR } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3538,7 +3534,7 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params complet } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3576,7 +3572,7 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params com params.effectIdentifier.unsignedCharValue); request.effectVariant = params.effectVariant.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3616,7 +3612,7 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3655,7 +3651,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params c request.onTime = params.onTime.unsignedShortValue; request.offWaitTime = params.offWaitTime.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3666,7 +3662,7 @@ - (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params @@ -3675,7 +3671,7 @@ - (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3709,7 +3705,7 @@ - (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _Nonnull)params @@ -3719,7 +3715,7 @@ - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _No { using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3754,7 +3750,7 @@ - (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -3788,7 +3784,7 @@ - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3800,7 +3796,7 @@ - (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3834,7 +3830,7 @@ - (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -3868,7 +3864,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3880,7 +3876,7 @@ - (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3914,7 +3910,7 @@ - (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -3953,7 +3949,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3965,7 +3961,7 @@ - (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3999,7 +3995,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4009,7 +4005,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4044,7 +4040,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4054,7 +4050,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4089,7 +4085,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4098,7 +4094,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OnOff::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4132,7 +4128,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4141,7 +4137,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4175,7 +4171,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4184,7 +4180,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4218,7 +4214,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4227,7 +4223,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4778,13 +4774,12 @@ @implementation MTRBaseClusterOnOffSwitchConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -4794,7 +4789,7 @@ - (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4803,7 +4798,7 @@ - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4837,7 +4832,7 @@ - (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -4871,7 +4866,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -4883,7 +4878,7 @@ - (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4918,7 +4913,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4928,7 +4923,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4964,7 +4959,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4974,7 +4969,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5009,7 +5004,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5018,7 +5013,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5052,7 +5047,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5061,7 +5056,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5095,7 +5090,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5104,7 +5099,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5138,7 +5133,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5147,7 +5142,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5507,13 +5502,12 @@ @implementation MTRBaseClusterLevelControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -5558,7 +5552,7 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5604,7 +5598,7 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5651,7 +5645,7 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5690,7 +5684,7 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5737,7 +5731,7 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5783,7 +5777,7 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5830,7 +5824,7 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5869,7 +5863,7 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5906,7 +5900,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre } request.frequency = params.frequency.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5917,7 +5911,7 @@ - (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5926,7 +5920,7 @@ - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5960,7 +5954,7 @@ - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5969,7 +5963,7 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6003,7 +5997,7 @@ - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6012,7 +6006,7 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6046,7 +6040,7 @@ - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6055,7 +6049,7 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6089,7 +6083,7 @@ - (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6098,7 +6092,7 @@ - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6133,7 +6127,7 @@ - (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6142,7 +6136,7 @@ - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6176,7 +6170,7 @@ - (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6185,7 +6179,7 @@ - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6219,7 +6213,7 @@ - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::Options::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6253,7 +6247,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6265,7 +6259,7 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = LevelControl::Attributes::Options::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6299,7 +6293,7 @@ - (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6333,7 +6327,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6346,7 +6340,7 @@ - (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _N { using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6381,7 +6375,7 @@ - (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6420,7 +6414,7 @@ - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6432,7 +6426,7 @@ - (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6466,7 +6460,7 @@ - (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6505,7 +6499,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6517,7 +6511,7 @@ - (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6552,7 +6546,7 @@ - (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6591,7 +6585,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6603,7 +6597,7 @@ - (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Non { using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6638,7 +6632,7 @@ - (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6677,7 +6671,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6689,7 +6683,7 @@ - (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6724,7 +6718,7 @@ - (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6763,7 +6757,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6776,7 +6770,7 @@ - (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams * _N { using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6811,7 +6805,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6821,7 +6815,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6856,7 +6850,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6866,7 +6860,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6901,7 +6895,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6910,7 +6904,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6944,7 +6938,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6953,7 +6947,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6987,7 +6981,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6996,7 +6990,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -7030,7 +7024,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -7039,7 +7033,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8025,13 +8019,12 @@ @implementation MTRBaseClusterBinaryInputBasic - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -8041,7 +8034,7 @@ - (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8075,7 +8068,7 @@ - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8087,7 +8080,7 @@ - (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8121,7 +8114,7 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8155,7 +8148,7 @@ - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8167,7 +8160,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8201,7 +8194,7 @@ - (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8235,7 +8228,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8247,7 +8240,7 @@ - (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8281,7 +8274,7 @@ - (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8315,7 +8308,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8327,7 +8320,7 @@ - (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8361,7 +8354,7 @@ - (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8370,7 +8363,7 @@ - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8404,7 +8397,7 @@ - (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8438,7 +8431,7 @@ - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8450,7 +8443,7 @@ - (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8484,7 +8477,7 @@ - (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8518,7 +8511,7 @@ - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8530,7 +8523,7 @@ - (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8564,7 +8557,7 @@ - (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8573,7 +8566,7 @@ - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8607,7 +8600,7 @@ - (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8616,7 +8609,7 @@ - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8651,7 +8644,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8661,7 +8654,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8696,7 +8689,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8706,7 +8699,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8741,7 +8734,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8750,7 +8743,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8784,7 +8777,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8793,7 +8786,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8827,7 +8820,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8836,7 +8829,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8870,7 +8863,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8879,7 +8872,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9589,13 +9582,12 @@ @implementation MTRBaseClusterPulseWidthModulation - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -9606,7 +9598,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9616,7 +9608,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9652,7 +9644,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9662,7 +9654,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9697,7 +9689,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9706,7 +9698,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9740,7 +9732,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9749,7 +9741,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9783,7 +9775,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9792,7 +9784,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9826,7 +9818,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9835,7 +9827,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9871,13 +9863,12 @@ @implementation MTRBaseClusterDescriptor - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -9887,7 +9878,7 @@ - (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9896,7 +9887,7 @@ - (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9930,7 +9921,7 @@ - (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9939,7 +9930,7 @@ - (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9973,7 +9964,7 @@ - (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9982,7 +9973,7 @@ - (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10016,7 +10007,7 @@ - (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10025,7 +10016,7 @@ - (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10059,7 +10050,7 @@ - (void)readAttributeTagListWithCompletion:(void (^)(NSArray * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10068,7 +10059,7 @@ - (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10102,7 +10093,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10112,7 +10103,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10147,7 +10138,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10157,7 +10148,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10192,7 +10183,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10201,7 +10192,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10235,7 +10226,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10244,7 +10235,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10278,7 +10269,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10287,7 +10278,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10321,7 +10312,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10330,7 +10321,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10762,13 +10753,12 @@ @implementation MTRBaseClusterBinding - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -10779,7 +10769,7 @@ - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = Binding::Attributes::Binding::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -10850,7 +10840,7 @@ - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -10862,7 +10852,7 @@ - (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = Binding::Attributes::Binding::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10896,7 +10886,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10906,7 +10896,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10941,7 +10931,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10951,7 +10941,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10986,7 +10976,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10995,7 +10985,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Binding::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11029,7 +11019,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11038,7 +11028,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11072,7 +11062,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11081,7 +11071,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11115,7 +11105,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11124,7 +11114,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11441,13 +11431,12 @@ @implementation MTRBaseClusterAccessControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -11458,7 +11447,7 @@ - (void)readAttributeACLWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -11592,7 +11581,7 @@ - (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -11604,7 +11593,7 @@ - (void)subscribeAttributeACLWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11639,7 +11628,7 @@ - (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -11695,7 +11684,7 @@ - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -11707,7 +11696,7 @@ - (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11742,7 +11731,7 @@ - (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11753,7 +11742,7 @@ - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeP { using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11789,7 +11778,7 @@ - (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11800,7 +11789,7 @@ - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribePa { using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11836,7 +11825,7 @@ - (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11847,7 +11836,7 @@ - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeP { using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11882,7 +11871,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11892,7 +11881,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11927,7 +11916,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11937,7 +11926,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11972,7 +11961,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11981,7 +11970,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12015,7 +12004,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12024,7 +12013,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12058,7 +12047,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12067,7 +12056,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12101,7 +12090,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12110,7 +12099,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12615,13 +12604,12 @@ @implementation MTRBaseClusterActions - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -12660,7 +12648,7 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params c definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12702,7 +12690,7 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit } request.transitionTime = params.transitionTime.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12742,7 +12730,7 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params compl definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12784,7 +12772,7 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12824,7 +12812,7 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params complet definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12864,7 +12852,7 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params compl definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12906,7 +12894,7 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12946,7 +12934,7 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params com definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12986,7 +12974,7 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params com definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13028,7 +13016,7 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13068,7 +13056,7 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params c definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13110,7 +13098,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13121,7 +13109,7 @@ - (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::ActionList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13130,7 +13118,7 @@ - (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Actions::Attributes::ActionList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13164,7 +13152,7 @@ - (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13173,7 +13161,7 @@ - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13207,7 +13195,7 @@ - (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13216,7 +13204,7 @@ - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13250,7 +13238,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13260,7 +13248,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13295,7 +13283,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13305,7 +13293,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13340,7 +13328,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13349,7 +13337,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Actions::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13383,7 +13371,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13392,7 +13380,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13426,7 +13414,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13435,7 +13423,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13469,7 +13457,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13478,7 +13466,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13927,13 +13915,12 @@ @implementation MTRBaseClusterBasicInformation - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -13972,7 +13959,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13983,7 +13970,7 @@ - (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13992,7 +13979,7 @@ - (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14027,7 +14014,7 @@ - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14036,7 +14023,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14070,7 +14057,7 @@ - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14079,7 +14066,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14113,7 +14100,7 @@ - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14122,7 +14109,7 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14156,7 +14143,7 @@ - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14165,7 +14152,7 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14199,7 +14186,7 @@ - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -14233,7 +14220,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -14245,7 +14232,7 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14279,7 +14266,7 @@ - (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -14313,7 +14300,7 @@ - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -14325,7 +14312,7 @@ - (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14359,7 +14346,7 @@ - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14368,7 +14355,7 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14403,7 +14390,7 @@ - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14413,7 +14400,7 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14448,7 +14435,7 @@ - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14457,7 +14444,7 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14492,7 +14479,7 @@ - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14502,7 +14489,7 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14537,7 +14524,7 @@ - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14546,7 +14533,7 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14581,7 +14568,7 @@ - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14590,7 +14577,7 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14624,7 +14611,7 @@ - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14633,7 +14620,7 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14667,7 +14654,7 @@ - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14676,7 +14663,7 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14710,7 +14697,7 @@ - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14719,7 +14706,7 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14753,7 +14740,7 @@ - (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -14787,7 +14774,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -14800,7 +14787,7 @@ - (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _N { using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14835,7 +14822,7 @@ - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14844,7 +14831,7 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14878,7 +14865,7 @@ - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14887,7 +14874,7 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14923,7 +14910,7 @@ - (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicInformatio using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14934,7 +14921,7 @@ - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCapabilityMinimaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -14971,7 +14958,7 @@ - (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBasicInformati using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14982,7 +14969,7 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -15017,7 +15004,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15027,7 +15014,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15062,7 +15049,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15072,7 +15059,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15107,7 +15094,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15116,7 +15103,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15150,7 +15137,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15159,7 +15146,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15193,7 +15180,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15202,7 +15189,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15236,7 +15223,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15245,7 +15232,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16422,13 +16409,12 @@ @implementation MTRBaseClusterOTASoftwareUpdateProvider - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -16503,7 +16489,7 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam definedValue_0 = [self asByteSpan:params.metadataForProvider]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -16539,7 +16525,7 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp request.updateToken = [self asByteSpan:params.updateToken]; request.newVersion = params.newVersion.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -16577,7 +16563,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify request.updateToken = [self asByteSpan:params.updateToken]; request.softwareVersion = params.softwareVersion.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -16589,7 +16575,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16599,7 +16585,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16635,7 +16621,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16645,7 +16631,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16680,7 +16666,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16689,7 +16675,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16723,7 +16709,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16732,7 +16718,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16766,7 +16752,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16775,7 +16761,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16809,7 +16795,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16818,7 +16804,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17114,13 +17100,12 @@ @implementation MTRBaseClusterOTASoftwareUpdateRequestor - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -17164,7 +17149,7 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou } request.endpoint = params.endpoint.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -17177,7 +17162,7 @@ - (void)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)pa using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -17234,7 +17219,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -17247,7 +17232,7 @@ - (void)subscribeAttributeDefaultOTAProvidersWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17282,7 +17267,7 @@ - (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17291,7 +17276,7 @@ - (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17326,7 +17311,7 @@ - (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17335,7 +17320,7 @@ - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17369,7 +17354,7 @@ - (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17379,7 +17364,7 @@ - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17415,7 +17400,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17425,7 +17410,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17461,7 +17446,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17471,7 +17456,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17506,7 +17491,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17515,7 +17500,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17550,7 +17535,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17559,7 +17544,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17593,7 +17578,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17602,7 +17587,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17636,7 +17621,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17645,7 +17630,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18107,13 +18092,12 @@ @implementation MTRBaseClusterLocalizationConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -18123,7 +18107,7 @@ - (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -18157,7 +18141,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -18169,7 +18153,7 @@ - (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18204,7 +18188,7 @@ - (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullabl using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18213,7 +18197,7 @@ - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18249,7 +18233,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18259,7 +18243,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18295,7 +18279,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18305,7 +18289,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18340,7 +18324,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18349,7 +18333,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18383,7 +18367,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18392,7 +18376,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18426,7 +18410,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18435,7 +18419,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18469,7 +18453,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18478,7 +18462,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18839,13 +18823,12 @@ @implementation MTRBaseClusterTimeFormatLocalization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -18856,7 +18839,7 @@ - (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -18890,7 +18873,7 @@ - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -18902,7 +18885,7 @@ - (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18937,7 +18920,7 @@ - (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Null using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -18971,7 +18954,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -18984,7 +18967,7 @@ - (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _No { using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19020,7 +19003,7 @@ - (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _N using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19030,7 +19013,7 @@ - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * { using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19066,7 +19049,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19076,7 +19059,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19112,7 +19095,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19122,7 +19105,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19157,7 +19140,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19166,7 +19149,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19200,7 +19183,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19209,7 +19192,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19243,7 +19226,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19252,7 +19235,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19286,7 +19269,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19295,7 +19278,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19712,13 +19695,12 @@ @implementation MTRBaseClusterUnitLocalization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -19728,7 +19710,7 @@ - (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -19762,7 +19744,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -19774,7 +19756,7 @@ - (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19809,7 +19791,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19819,7 +19801,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19854,7 +19836,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19864,7 +19846,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19899,7 +19881,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19908,7 +19890,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19942,7 +19924,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19951,7 +19933,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19985,7 +19967,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19994,7 +19976,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20028,7 +20010,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20037,7 +20019,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20355,13 +20337,12 @@ @implementation MTRBaseClusterPowerSourceConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -20371,7 +20352,7 @@ - (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20380,7 +20361,7 @@ - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20415,7 +20396,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20425,7 +20406,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20461,7 +20442,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20471,7 +20452,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20506,7 +20487,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20515,7 +20496,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20549,7 +20530,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20558,7 +20539,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20592,7 +20573,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20601,7 +20582,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20635,7 +20616,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20644,7 +20625,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20949,13 +20930,12 @@ @implementation MTRBaseClusterPowerSource - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -20965,7 +20945,7 @@ - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::Status::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20974,7 +20954,7 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PowerSource::Attributes::Status::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21008,7 +20988,7 @@ - (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::Order::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21017,7 +20997,7 @@ - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PowerSource::Attributes::Order::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21051,7 +21031,7 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::Description::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21060,7 +21040,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PowerSource::Attributes::Description::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21095,7 +21075,7 @@ - (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21105,7 +21085,7 @@ - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParam { using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21141,7 +21121,7 @@ - (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21151,7 +21131,7 @@ - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribePar { using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21186,7 +21166,7 @@ - (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21195,7 +21175,7 @@ - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21230,7 +21210,7 @@ - (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21240,7 +21220,7 @@ - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21275,7 +21255,7 @@ - (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21285,7 +21265,7 @@ - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21320,7 +21300,7 @@ - (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21330,7 +21310,7 @@ - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21365,7 +21345,7 @@ - (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21374,7 +21354,7 @@ - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21408,7 +21388,7 @@ - (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21417,7 +21397,7 @@ - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21452,7 +21432,7 @@ - (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21461,7 +21441,7 @@ - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21495,7 +21475,7 @@ - (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21505,7 +21485,7 @@ - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21540,7 +21520,7 @@ - (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21549,7 +21529,7 @@ - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21584,7 +21564,7 @@ - (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21593,7 +21573,7 @@ - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21627,7 +21607,7 @@ - (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21637,7 +21617,7 @@ - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21672,7 +21652,7 @@ - (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21681,7 +21661,7 @@ - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21716,7 +21696,7 @@ - (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21725,7 +21705,7 @@ - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21759,7 +21739,7 @@ - (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21768,7 +21748,7 @@ - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21803,7 +21783,7 @@ - (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21813,7 +21793,7 @@ - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParam { using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21849,7 +21829,7 @@ - (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21859,7 +21839,7 @@ - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21894,7 +21874,7 @@ - (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21904,7 +21884,7 @@ - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _No { using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21939,7 +21919,7 @@ - (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21948,7 +21928,7 @@ - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Non { using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21984,7 +21964,7 @@ - (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21994,7 +21974,7 @@ - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22029,7 +22009,7 @@ - (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22038,7 +22018,7 @@ - (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22072,7 +22052,7 @@ - (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22081,7 +22061,7 @@ - (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22115,7 +22095,7 @@ - (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22124,7 +22104,7 @@ - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22158,7 +22138,7 @@ - (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22168,7 +22148,7 @@ - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22204,7 +22184,7 @@ - (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22214,7 +22194,7 @@ - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribePara { using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22249,7 +22229,7 @@ - (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22259,7 +22239,7 @@ - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _No { using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22294,7 +22274,7 @@ - (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22304,7 +22284,7 @@ - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * { using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22339,7 +22319,7 @@ - (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22348,7 +22328,7 @@ - (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22382,7 +22362,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22392,7 +22372,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22427,7 +22407,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22437,7 +22417,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22472,7 +22452,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22481,7 +22461,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22515,7 +22495,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22524,7 +22504,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22558,7 +22538,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22567,7 +22547,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22601,7 +22581,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22610,7 +22590,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24241,13 +24221,12 @@ @implementation MTRBaseClusterGeneralCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -24282,7 +24261,7 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * request.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24320,7 +24299,7 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato request.countryCode = [self asCharSpan:params.countryCode]; request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24361,7 +24340,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24372,7 +24351,7 @@ - (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -24406,7 +24385,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24418,7 +24397,7 @@ - (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24454,7 +24433,7 @@ - (void)readAttributeBasicCommissioningInfoWithCompletion: using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24466,7 +24445,7 @@ - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) @@ -24504,7 +24483,7 @@ - (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24513,7 +24492,7 @@ - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24549,7 +24528,7 @@ - (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Null using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24559,7 +24538,7 @@ - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _No { using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24595,7 +24574,7 @@ - (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24606,7 +24585,7 @@ - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribePa { using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24642,7 +24621,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24652,7 +24631,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24688,7 +24667,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24698,7 +24677,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24733,7 +24712,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24742,7 +24721,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24776,7 +24755,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24785,7 +24764,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24819,7 +24798,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24828,7 +24807,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24862,7 +24841,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24871,7 +24850,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25423,13 +25402,12 @@ @implementation MTRBaseClusterNetworkCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -25477,7 +25455,7 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25517,7 +25495,7 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25556,7 +25534,7 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25595,7 +25573,7 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25634,7 +25612,7 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25674,7 +25652,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25685,7 +25663,7 @@ - (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25694,7 +25672,7 @@ - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25728,7 +25706,7 @@ - (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25737,7 +25715,7 @@ - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25771,7 +25749,7 @@ - (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25781,7 +25759,7 @@ - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _No { using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25816,7 +25794,7 @@ - (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25826,7 +25804,7 @@ - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * { using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25861,7 +25839,7 @@ - (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -25895,7 +25873,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25907,7 +25885,7 @@ - (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25943,7 +25921,7 @@ - (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25954,7 +25932,7 @@ - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _ using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -25990,7 +25968,7 @@ - (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25999,7 +25977,7 @@ - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26033,7 +26011,7 @@ - (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26043,7 +26021,7 @@ - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * { using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26079,7 +26057,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26089,7 +26067,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26125,7 +26103,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26135,7 +26113,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26170,7 +26148,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26179,7 +26157,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26213,7 +26191,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26222,7 +26200,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26256,7 +26234,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26265,7 +26243,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26299,7 +26277,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26308,7 +26286,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27004,13 +26982,12 @@ @implementation MTRBaseClusterDiagnosticLogs - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -27050,7 +27027,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque definedValue_0 = [self asCharSpan:params.transferFileDesignator]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -27061,7 +27038,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27071,7 +27048,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27106,7 +27083,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27116,7 +27093,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27151,7 +27128,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27160,7 +27137,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27194,7 +27171,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27203,7 +27180,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27237,7 +27214,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27246,7 +27223,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27280,7 +27257,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27289,7 +27266,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27565,13 +27542,12 @@ @implementation MTRBaseClusterGeneralDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -27608,7 +27584,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger request.enableKey = [self asByteSpan:params.enableKey]; request.eventTrigger = params.eventTrigger.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -27619,7 +27595,7 @@ - (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27628,7 +27604,7 @@ - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Non { using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27663,7 +27639,7 @@ - (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27672,7 +27648,7 @@ - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27706,7 +27682,7 @@ - (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27715,7 +27691,7 @@ - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27749,7 +27725,7 @@ - (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27759,7 +27735,7 @@ - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * { using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27794,7 +27770,7 @@ - (void)readAttributeBootReasonWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27803,7 +27779,7 @@ - (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27837,7 +27813,7 @@ - (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27847,7 +27823,7 @@ - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _ { using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27882,7 +27858,7 @@ - (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27891,7 +27867,7 @@ - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27926,7 +27902,7 @@ - (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27936,7 +27912,7 @@ - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _N { using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27972,7 +27948,7 @@ - (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27982,7 +27958,7 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams { using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28017,7 +27993,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28027,7 +28003,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28062,7 +28038,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28072,7 +28048,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28107,7 +28083,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28116,7 +28092,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28150,7 +28126,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28159,7 +28135,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28193,7 +28169,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28202,7 +28178,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28236,7 +28212,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28245,7 +28221,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28910,13 +28886,12 @@ @implementation MTRBaseClusterSoftwareDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -28955,7 +28930,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -28966,7 +28941,7 @@ - (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28975,7 +28950,7 @@ - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29009,7 +28984,7 @@ - (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29018,7 +28993,7 @@ - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29053,7 +29028,7 @@ - (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29062,7 +29037,7 @@ - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29098,7 +29073,7 @@ - (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29108,7 +29083,7 @@ - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29144,7 +29119,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29154,7 +29129,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29189,7 +29164,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29199,7 +29174,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29234,7 +29209,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29243,7 +29218,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29277,7 +29252,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29286,7 +29261,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29320,7 +29295,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29329,7 +29304,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29363,7 +29338,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29372,7 +29347,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29822,13 +29797,12 @@ @implementation MTRBaseClusterThreadNetworkDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -29867,7 +29841,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -29878,7 +29852,7 @@ - (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29887,7 +29861,7 @@ - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29922,7 +29896,7 @@ - (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29931,7 +29905,7 @@ - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29965,7 +29939,7 @@ - (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29974,7 +29948,7 @@ - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30008,7 +29982,7 @@ - (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30017,7 +29991,7 @@ - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30051,7 +30025,7 @@ - (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30060,7 +30034,7 @@ - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30094,7 +30068,7 @@ - (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30103,7 +30077,7 @@ - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30137,7 +30111,7 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30146,7 +30120,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30180,7 +30154,7 @@ - (void)readAttributeNeighborTableWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30189,7 +30163,7 @@ - (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30223,7 +30197,7 @@ - (void)readAttributeRouteTableWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30232,7 +30206,7 @@ - (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30266,7 +30240,7 @@ - (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30275,7 +30249,7 @@ - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30309,7 +30283,7 @@ - (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30318,7 +30292,7 @@ - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30352,7 +30326,7 @@ - (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30361,7 +30335,7 @@ - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30395,7 +30369,7 @@ - (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30404,7 +30378,7 @@ - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30439,7 +30413,7 @@ - (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30448,7 +30422,7 @@ - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30482,7 +30456,7 @@ - (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30491,7 +30465,7 @@ - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30526,7 +30500,7 @@ - (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30535,7 +30509,7 @@ - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30569,7 +30543,7 @@ - (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30578,7 +30552,7 @@ - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30613,7 +30587,7 @@ - (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30622,7 +30596,7 @@ - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30657,7 +30631,7 @@ - (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30667,7 +30641,7 @@ - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _No { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30703,7 +30677,7 @@ - (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30713,7 +30687,7 @@ - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30749,7 +30723,7 @@ - (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30760,7 +30734,7 @@ - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscr { using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30796,7 +30770,7 @@ - (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30805,7 +30779,7 @@ - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30840,7 +30814,7 @@ - (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30849,7 +30823,7 @@ - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30883,7 +30857,7 @@ - (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30892,7 +30866,7 @@ - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30926,7 +30900,7 @@ - (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30935,7 +30909,7 @@ - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30970,7 +30944,7 @@ - (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30980,7 +30954,7 @@ - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _N { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31015,7 +30989,7 @@ - (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31024,7 +30998,7 @@ - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31058,7 +31032,7 @@ - (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31068,7 +31042,7 @@ - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31103,7 +31077,7 @@ - (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31112,7 +31086,7 @@ - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31146,7 +31120,7 @@ - (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31155,7 +31129,7 @@ - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31190,7 +31164,7 @@ - (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31199,7 +31173,7 @@ - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31233,7 +31207,7 @@ - (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31243,7 +31217,7 @@ - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31278,7 +31252,7 @@ - (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31287,7 +31261,7 @@ - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31321,7 +31295,7 @@ - (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31330,7 +31304,7 @@ - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31365,7 +31339,7 @@ - (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31375,7 +31349,7 @@ - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribePar { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31411,7 +31385,7 @@ - (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31422,7 +31396,7 @@ - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeP { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31457,7 +31431,7 @@ - (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31466,7 +31440,7 @@ - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31500,7 +31474,7 @@ - (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31509,7 +31483,7 @@ - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31544,7 +31518,7 @@ - (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31554,7 +31528,7 @@ - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31589,7 +31563,7 @@ - (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31598,7 +31572,7 @@ - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31632,7 +31606,7 @@ - (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31641,7 +31615,7 @@ - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31675,7 +31649,7 @@ - (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31684,7 +31658,7 @@ - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31719,7 +31693,7 @@ - (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31728,7 +31702,7 @@ - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31762,7 +31736,7 @@ - (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31771,7 +31745,7 @@ - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31806,7 +31780,7 @@ - (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31815,7 +31789,7 @@ - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31849,7 +31823,7 @@ - (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31859,7 +31833,7 @@ - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31894,7 +31868,7 @@ - (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31903,7 +31877,7 @@ - (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31938,7 +31912,7 @@ - (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31948,7 +31922,7 @@ - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31984,7 +31958,7 @@ - (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31994,7 +31968,7 @@ - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32029,7 +32003,7 @@ - (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32038,7 +32012,7 @@ - (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32073,7 +32047,7 @@ - (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32082,7 +32056,7 @@ - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32118,7 +32092,7 @@ - (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32128,7 +32102,7 @@ - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParam { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32164,7 +32138,7 @@ - (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32174,7 +32148,7 @@ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32209,7 +32183,7 @@ - (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32218,7 +32192,7 @@ - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32252,7 +32226,7 @@ - (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32261,7 +32235,7 @@ - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32295,7 +32269,7 @@ - (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32304,7 +32278,7 @@ - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32339,7 +32313,7 @@ - (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32348,7 +32322,7 @@ - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32383,7 +32357,7 @@ - (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32392,7 +32366,7 @@ - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32427,7 +32401,7 @@ - (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32436,7 +32410,7 @@ - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32472,7 +32446,7 @@ - (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiag using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32483,7 +32457,7 @@ - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -32518,7 +32492,7 @@ - (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32527,7 +32501,7 @@ - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32564,7 +32538,7 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion: using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void) @@ -32578,7 +32552,7 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion: using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) @@ -32617,7 +32591,7 @@ - (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32627,7 +32601,7 @@ - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32663,7 +32637,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32673,7 +32647,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32709,7 +32683,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32719,7 +32693,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32754,7 +32728,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32763,7 +32737,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32797,7 +32771,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32806,7 +32780,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32840,7 +32814,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32849,7 +32823,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32883,7 +32857,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32892,7 +32866,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -35965,13 +35939,12 @@ @implementation MTRBaseClusterWiFiNetworkDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -36010,7 +35983,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -36021,7 +35994,7 @@ - (void)readAttributeBSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSE MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36030,7 +36003,7 @@ - (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36065,7 +36038,7 @@ - (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable v using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36074,7 +36047,7 @@ - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36109,7 +36082,7 @@ - (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36118,7 +36091,7 @@ - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36152,7 +36125,7 @@ - (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36161,7 +36134,7 @@ - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36195,7 +36168,7 @@ - (void)readAttributeRSSIWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36204,7 +36177,7 @@ - (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36238,7 +36211,7 @@ - (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36247,7 +36220,7 @@ - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36282,7 +36255,7 @@ - (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36291,7 +36264,7 @@ - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36326,7 +36299,7 @@ - (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36336,7 +36309,7 @@ - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36372,7 +36345,7 @@ - (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36382,7 +36355,7 @@ - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36417,7 +36390,7 @@ - (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36427,7 +36400,7 @@ - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36462,7 +36435,7 @@ - (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36472,7 +36445,7 @@ - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36507,7 +36480,7 @@ - (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36516,7 +36489,7 @@ - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36550,7 +36523,7 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36559,7 +36532,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36594,7 +36567,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36604,7 +36577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36640,7 +36613,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36650,7 +36623,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36685,7 +36658,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36694,7 +36667,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36728,7 +36701,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36737,7 +36710,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36771,7 +36744,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36780,7 +36753,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36814,7 +36787,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36823,7 +36796,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37664,13 +37637,12 @@ @implementation MTRBaseClusterEthernetNetworkDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -37709,7 +37681,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -37721,7 +37693,7 @@ - (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37730,7 +37702,7 @@ - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37764,7 +37736,7 @@ - (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37773,7 +37745,7 @@ - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37807,7 +37779,7 @@ - (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37816,7 +37788,7 @@ - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37850,7 +37822,7 @@ - (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37859,7 +37831,7 @@ - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37893,7 +37865,7 @@ - (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37902,7 +37874,7 @@ - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37936,7 +37908,7 @@ - (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37945,7 +37917,7 @@ - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37979,7 +37951,7 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37988,7 +37960,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38022,7 +37994,7 @@ - (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38031,7 +38003,7 @@ - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38065,7 +38037,7 @@ - (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38074,7 +38046,7 @@ - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38109,7 +38081,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38119,7 +38091,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38155,7 +38127,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38165,7 +38137,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38200,7 +38172,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38209,7 +38181,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38244,7 +38216,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38253,7 +38225,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38287,7 +38259,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38296,7 +38268,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38330,7 +38302,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38339,7 +38311,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39001,13 +38973,12 @@ @implementation MTRBaseClusterTimeSynchronization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -39049,7 +39020,7 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa = static_cast>(params.timeSource.unsignedCharValue); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39092,7 +39063,7 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT nonNullValue_0.endpoint = params.trustedTimeSource.endpoint.unsignedShortValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39153,7 +39124,7 @@ - (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *) } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39217,7 +39188,7 @@ - (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39259,7 +39230,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam nonNullValue_0 = [self asCharSpan:params.defaultNTP]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39270,7 +39241,7 @@ - (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39279,7 +39250,7 @@ - (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39313,7 +39284,7 @@ - (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39322,7 +39293,7 @@ - (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39356,7 +39327,7 @@ - (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39365,7 +39336,7 @@ - (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39401,7 +39372,7 @@ - (void)readAttributeTrustedTimeSourceWithCompletion: using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39413,7 +39384,7 @@ - (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Non using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeTrustedTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -39449,7 +39420,7 @@ - (void)readAttributeDefaultNTPWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39458,7 +39429,7 @@ - (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39492,7 +39463,7 @@ - (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39501,7 +39472,7 @@ - (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39535,7 +39506,7 @@ - (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39544,7 +39515,7 @@ - (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39578,7 +39549,7 @@ - (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39587,7 +39558,7 @@ - (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39622,7 +39593,7 @@ - (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39631,7 +39602,7 @@ - (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39666,7 +39637,7 @@ - (void)readAttributeNTPServerAvailableWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39676,7 +39647,7 @@ - (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _No { using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39711,7 +39682,7 @@ - (void)readAttributeTimeZoneListMaxSizeWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39721,7 +39692,7 @@ - (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _N { using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39756,7 +39727,7 @@ - (void)readAttributeDSTOffsetListMaxSizeWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39766,7 +39737,7 @@ - (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _ { using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39801,7 +39772,7 @@ - (void)readAttributeSupportsDNSResolveWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39811,7 +39782,7 @@ - (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _No { using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39847,7 +39818,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39857,7 +39828,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39892,7 +39863,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39902,7 +39873,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39937,7 +39908,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39946,7 +39917,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39980,7 +39951,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39989,7 +39960,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40023,7 +39994,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40032,7 +40003,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40066,7 +40037,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40075,7 +40046,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40111,13 +40082,12 @@ @implementation MTRBaseClusterBridgedDeviceBasicInformation - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -40127,7 +40097,7 @@ - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40136,7 +40106,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40170,7 +40140,7 @@ - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40179,7 +40149,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40213,7 +40183,7 @@ - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40222,7 +40192,7 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40256,7 +40226,7 @@ - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -40290,7 +40260,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -40302,7 +40272,7 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40336,7 +40306,7 @@ - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40345,7 +40315,7 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40380,7 +40350,7 @@ - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40390,7 +40360,7 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40425,7 +40395,7 @@ - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40434,7 +40404,7 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40469,7 +40439,7 @@ - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40479,7 +40449,7 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40514,7 +40484,7 @@ - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40523,7 +40493,7 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40558,7 +40528,7 @@ - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40567,7 +40537,7 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40601,7 +40571,7 @@ - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40610,7 +40580,7 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40644,7 +40614,7 @@ - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40653,7 +40623,7 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40687,7 +40657,7 @@ - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40696,7 +40666,7 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40730,7 +40700,7 @@ - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40739,7 +40709,7 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40773,7 +40743,7 @@ - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40782,7 +40752,7 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40819,7 +40789,7 @@ - (void)readAttributeProductAppearanceWithCompletion: using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40832,7 +40802,7 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) @@ -40870,7 +40840,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40880,7 +40850,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40916,7 +40886,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40926,7 +40896,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40961,7 +40931,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40970,7 +40940,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41005,7 +40975,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -41014,7 +40984,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41048,7 +41018,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -41057,7 +41027,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41091,7 +41061,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -41100,7 +41070,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42023,13 +41993,12 @@ @implementation MTRBaseClusterSwitch - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -42039,7 +42008,7 @@ - (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42048,7 +42017,7 @@ - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42083,7 +42052,7 @@ - (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42092,7 +42061,7 @@ - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42127,7 +42096,7 @@ - (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42136,7 +42105,7 @@ - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42170,7 +42139,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42180,7 +42149,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42215,7 +42184,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42225,7 +42194,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42260,7 +42229,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42269,7 +42238,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Switch::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42303,7 +42272,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42312,7 +42281,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42346,7 +42315,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42355,7 +42324,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42389,7 +42358,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42398,7 +42367,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42795,13 +42764,12 @@ @implementation MTRBaseClusterAdministratorCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -42844,7 +42812,7 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO request.iterations = params.iterations.unsignedIntValue; request.salt = [self asByteSpan:params.salt]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -42884,7 +42852,7 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu } request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -42927,7 +42895,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -42939,7 +42907,7 @@ - (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable v using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42949,7 +42917,7 @@ - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -42982,7 +42950,7 @@ - (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42991,7 +42959,7 @@ - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43026,7 +42994,7 @@ - (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43035,7 +43003,7 @@ - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43070,7 +43038,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43080,7 +43048,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43116,7 +43084,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43126,7 +43094,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43161,7 +43129,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43170,7 +43138,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43205,7 +43173,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43214,7 +43182,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43248,7 +43216,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43257,7 +43225,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43291,7 +43259,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43300,7 +43268,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43715,13 +43683,12 @@ @implementation MTRBaseClusterOperationalCredentials - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -43755,7 +43722,7 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio } request.attestationNonce = [self asByteSpan:params.attestationNonce]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43791,7 +43758,7 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti request.certificateType = static_cast>(params.certificateType.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43830,7 +43797,7 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * definedValue_0 = params.isForUpdateNOC.boolValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43873,7 +43840,7 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params request.adminVendorId = static_cast>(params.adminVendorId.unsignedShortValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43912,7 +43879,7 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p definedValue_0 = [self asByteSpan:params.icacValue]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43947,7 +43914,7 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri } request.label = [self asCharSpan:params.label]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43982,7 +43949,7 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara } request.fabricIndex = params.fabricIndex.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -44019,7 +43986,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd } request.rootCACertificate = [self asByteSpan:params.rootCACertificate]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -44031,7 +43998,7 @@ - (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44040,7 +44007,7 @@ - (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44075,7 +44042,7 @@ - (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44084,7 +44051,7 @@ - (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44118,7 +44085,7 @@ - (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44127,7 +44094,7 @@ - (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44162,7 +44129,7 @@ - (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44172,7 +44139,7 @@ - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _N { using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44209,7 +44176,7 @@ - (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)( using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44219,7 +44186,7 @@ - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams { using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44254,7 +44221,7 @@ - (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44264,7 +44231,7 @@ - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _No { using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44300,7 +44267,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44310,7 +44277,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44346,7 +44313,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44356,7 +44323,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44391,7 +44358,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44400,7 +44367,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44434,7 +44401,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44443,7 +44410,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44477,7 +44444,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44486,7 +44453,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44520,7 +44487,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44529,7 +44496,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45140,13 +45107,12 @@ @implementation MTRBaseClusterGroupKeyManagement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -45220,7 +45186,7 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45255,7 +45221,7 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par } request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45291,7 +45257,7 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * } request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45330,7 +45296,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45342,7 +45308,7 @@ - (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -45399,7 +45365,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45411,7 +45377,7 @@ - (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45446,7 +45412,7 @@ - (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45455,7 +45421,7 @@ - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45489,7 +45455,7 @@ - (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45499,7 +45465,7 @@ - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _No { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45534,7 +45500,7 @@ - (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45544,7 +45510,7 @@ - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45579,7 +45545,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45589,7 +45555,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45624,7 +45590,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45634,7 +45600,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45669,7 +45635,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45678,7 +45644,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45712,7 +45678,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45721,7 +45687,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45755,7 +45721,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45764,7 +45730,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45798,7 +45764,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45807,7 +45773,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46290,13 +46256,12 @@ @implementation MTRBaseClusterFixedLabel - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -46306,7 +46271,7 @@ - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46315,7 +46280,7 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46349,7 +46314,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46359,7 +46324,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46394,7 +46359,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46404,7 +46369,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46439,7 +46404,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46448,7 +46413,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46482,7 +46447,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46491,7 +46456,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46525,7 +46490,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46534,7 +46499,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46568,7 +46533,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46577,7 +46542,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46883,13 +46848,12 @@ @implementation MTRBaseClusterUserLabel - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -46899,7 +46863,7 @@ - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -46955,7 +46919,7 @@ - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -46967,7 +46931,7 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47001,7 +46965,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47011,7 +46975,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47046,7 +47010,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47056,7 +47020,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47091,7 +47055,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47100,7 +47064,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47134,7 +47098,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47143,7 +47107,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47177,7 +47141,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47186,7 +47150,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47220,7 +47184,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47229,7 +47193,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47545,13 +47509,12 @@ @implementation MTRBaseClusterBooleanState - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -47561,7 +47524,7 @@ - (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47570,7 +47533,7 @@ - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47604,7 +47567,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47614,7 +47577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47649,7 +47612,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47659,7 +47622,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47694,7 +47657,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47703,7 +47666,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47737,7 +47700,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47746,7 +47709,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47780,7 +47743,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47789,7 +47752,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47823,7 +47786,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47832,7 +47795,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48138,13 +48101,12 @@ @implementation MTRBaseClusterICDManagement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -48184,7 +48146,7 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) definedValue_0 = [self asByteSpan:params.verificationKey]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48225,7 +48187,7 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam definedValue_0 = [self asByteSpan:params.verificationKey]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48265,7 +48227,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48276,7 +48238,7 @@ - (void)readAttributeIdleModeIntervalWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::IdleModeInterval::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeIdleModeIntervalWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48285,7 +48247,7 @@ - (void)subscribeAttributeIdleModeIntervalWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = IcdManagement::Attributes::IdleModeInterval::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48320,7 +48282,7 @@ - (void)readAttributeActiveModeIntervalWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ActiveModeInterval::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveModeIntervalWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48330,7 +48292,7 @@ - (void)subscribeAttributeActiveModeIntervalWithParams:(MTRSubscribeParams * _No { using TypeInfo = IcdManagement::Attributes::ActiveModeInterval::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48365,7 +48327,7 @@ - (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48375,7 +48337,7 @@ - (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _N { using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48411,7 +48373,7 @@ - (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)para params = [params copy]; using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48420,7 +48382,7 @@ - (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48455,7 +48417,7 @@ - (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48464,7 +48426,7 @@ - (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48499,7 +48461,7 @@ - (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48509,7 +48471,7 @@ - (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParam { using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48544,7 +48506,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48554,7 +48516,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48589,7 +48551,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48599,7 +48561,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48634,7 +48596,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48643,7 +48605,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48677,7 +48639,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48686,7 +48648,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48720,7 +48682,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48729,7 +48691,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48763,7 +48725,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48772,7 +48734,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48808,13 +48770,12 @@ @implementation MTRBaseClusterModeSelect - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -48849,7 +48810,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48860,7 +48821,7 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48869,7 +48830,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48903,7 +48864,7 @@ - (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48912,7 +48873,7 @@ - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48947,7 +48908,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48956,7 +48917,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48990,7 +48951,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48999,7 +48960,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49033,7 +48994,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -49072,7 +49033,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -49084,7 +49045,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49118,7 +49079,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -49157,7 +49118,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -49169,7 +49130,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49203,7 +49164,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49213,7 +49174,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49248,7 +49209,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49258,7 +49219,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49293,7 +49254,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49302,7 +49263,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49336,7 +49297,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49345,7 +49306,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49379,7 +49340,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49388,7 +49349,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49422,7 +49383,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49431,7 +49392,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49980,13 +49941,12 @@ @implementation MTRBaseClusterLaundryWasherMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -50020,7 +49980,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50031,7 +49991,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50040,7 +50000,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50074,7 +50034,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50083,7 +50043,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50117,7 +50077,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50156,7 +50116,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50168,7 +50128,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50202,7 +50162,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50241,7 +50201,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50253,7 +50213,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50287,7 +50247,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50297,7 +50257,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50332,7 +50292,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50342,7 +50302,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50377,7 +50337,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50386,7 +50346,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50420,7 +50380,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50429,7 +50389,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50463,7 +50423,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50472,7 +50432,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50506,7 +50466,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50515,7 +50475,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50551,13 +50511,12 @@ @implementation MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -50596,7 +50555,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50608,7 +50567,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50618,7 +50577,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -50653,7 +50612,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50662,7 +50621,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50696,7 +50655,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50735,7 +50694,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50747,7 +50706,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50781,7 +50740,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50820,7 +50779,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50832,7 +50791,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50867,7 +50826,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50878,7 +50837,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute< MTRRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50916,7 +50875,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50927,7 +50886,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute< MTRRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50965,7 +50924,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50975,7 +50934,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -51009,7 +50968,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51019,7 +50978,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -51053,7 +51012,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51062,7 +51021,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51096,7 +51055,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51105,7 +51064,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51141,13 +51100,12 @@ @implementation MTRBaseClusterLaundryWasherControls - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -51157,7 +51115,7 @@ - (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51166,7 +51124,7 @@ - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51200,7 +51158,7 @@ - (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -51239,7 +51197,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51251,7 +51209,7 @@ - (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51287,7 +51245,7 @@ - (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -51321,7 +51279,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51333,7 +51291,7 @@ - (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51367,7 +51325,7 @@ - (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51376,7 +51334,7 @@ - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51411,7 +51369,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51421,7 +51379,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51457,7 +51415,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51467,7 +51425,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51502,7 +51460,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51511,7 +51469,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51545,7 +51503,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51554,7 +51512,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51588,7 +51546,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51597,7 +51555,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51631,7 +51589,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51640,7 +51598,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51676,13 +51634,12 @@ @implementation MTRBaseClusterRVCRunMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -51716,7 +51673,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51727,7 +51684,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51736,7 +51693,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51770,7 +51727,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51779,7 +51736,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51813,7 +51770,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -51852,7 +51809,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51864,7 +51821,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcRunMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51898,7 +51855,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -51937,7 +51894,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51949,7 +51906,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51983,7 +51940,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51993,7 +51950,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52028,7 +51985,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52038,7 +51995,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52073,7 +52030,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52082,7 +52039,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52116,7 +52073,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52125,7 +52082,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52159,7 +52116,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52168,7 +52125,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52202,7 +52159,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52211,7 +52168,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52247,13 +52204,12 @@ @implementation MTRBaseClusterRVCCleanMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -52287,7 +52243,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52298,7 +52254,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52307,7 +52263,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52341,7 +52297,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52350,7 +52306,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52384,7 +52340,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -52423,7 +52379,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52435,7 +52391,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcCleanMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52469,7 +52425,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -52508,7 +52464,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52520,7 +52476,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52554,7 +52510,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52564,7 +52520,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52599,7 +52555,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52609,7 +52565,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52644,7 +52600,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52653,7 +52609,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52687,7 +52643,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52696,7 +52652,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52730,7 +52686,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52739,7 +52695,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52773,7 +52729,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52782,7 +52738,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52818,13 +52774,12 @@ @implementation MTRBaseClusterTemperatureControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -52869,7 +52824,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52880,7 +52835,7 @@ - (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52890,7 +52845,7 @@ - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _N { using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52925,7 +52880,7 @@ - (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52934,7 +52889,7 @@ - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52968,7 +52923,7 @@ - (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52977,7 +52932,7 @@ - (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53011,7 +52966,7 @@ - (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53020,7 +52975,7 @@ - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53055,7 +53010,7 @@ - (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53065,7 +53020,7 @@ - (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams { using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53102,7 +53057,7 @@ - (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)( using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53112,7 +53067,7 @@ - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribePara { using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53147,7 +53102,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53157,7 +53112,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53192,7 +53147,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53202,7 +53157,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53237,7 +53192,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53246,7 +53201,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53280,7 +53235,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53289,7 +53244,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53323,7 +53278,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53332,7 +53287,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53366,7 +53321,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53375,7 +53330,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53411,13 +53366,12 @@ @implementation MTRBaseClusterRefrigeratorAlarm - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -53427,7 +53381,7 @@ - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53436,7 +53390,7 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53470,7 +53424,7 @@ - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53479,7 +53433,7 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53513,7 +53467,7 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53522,7 +53476,7 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53556,7 +53510,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53566,7 +53520,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53601,7 +53555,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53611,7 +53565,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53646,7 +53600,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53655,7 +53609,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53689,7 +53643,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53698,7 +53652,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53732,7 +53686,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53741,7 +53695,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53775,7 +53729,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53784,7 +53738,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53820,13 +53774,12 @@ @implementation MTRBaseClusterDishwasherMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -53860,7 +53813,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -53871,7 +53824,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53880,7 +53833,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53914,7 +53867,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53923,7 +53876,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53957,7 +53910,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -53996,7 +53949,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -54008,7 +53961,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54042,7 +53995,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -54081,7 +54034,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -54093,7 +54046,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54127,7 +54080,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54137,7 +54090,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54172,7 +54125,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54182,7 +54135,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54217,7 +54170,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54226,7 +54179,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54260,7 +54213,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54269,7 +54222,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54303,7 +54256,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54312,7 +54265,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54346,7 +54299,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54355,7 +54308,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54391,13 +54344,12 @@ @implementation MTRBaseClusterAirQuality - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -54407,7 +54359,7 @@ - (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54416,7 +54368,7 @@ - (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54450,7 +54402,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54460,7 +54412,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54495,7 +54447,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54505,7 +54457,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54540,7 +54492,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54549,7 +54501,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54583,7 +54535,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54592,7 +54544,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54626,7 +54578,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54635,7 +54587,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54669,7 +54621,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54678,7 +54630,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54714,13 +54666,12 @@ @implementation MTRBaseClusterSmokeCOAlarm - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -54759,7 +54710,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -54770,7 +54721,7 @@ - (void)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54779,7 +54730,7 @@ - (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54813,7 +54764,7 @@ - (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54822,7 +54773,7 @@ - (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54856,7 +54807,7 @@ - (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54865,7 +54816,7 @@ - (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54899,7 +54850,7 @@ - (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54908,7 +54859,7 @@ - (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54942,7 +54893,7 @@ - (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54951,7 +54902,7 @@ - (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54985,7 +54936,7 @@ - (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54994,7 +54945,7 @@ - (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55028,7 +54979,7 @@ - (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55038,7 +54989,7 @@ - (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _No { using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55073,7 +55024,7 @@ - (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55082,7 +55033,7 @@ - (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Non { using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55118,7 +55069,7 @@ - (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55128,7 +55079,7 @@ - (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * { using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55163,7 +55114,7 @@ - (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55173,7 +55124,7 @@ - (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _N { using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55208,7 +55159,7 @@ - (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55218,7 +55169,7 @@ - (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _No { using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55253,7 +55204,7 @@ - (void)readAttributeSmokeSensitivityLevelWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -55287,7 +55238,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -55300,7 +55251,7 @@ - (void)subscribeAttributeSmokeSensitivityLevelWithParams:(MTRSubscribeParams * { using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55335,7 +55286,7 @@ - (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55344,7 +55295,7 @@ - (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55378,7 +55329,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55388,7 +55339,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55423,7 +55374,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55433,7 +55384,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55468,7 +55419,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55477,7 +55428,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55511,7 +55462,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55520,7 +55471,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55554,7 +55505,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55563,7 +55514,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55597,7 +55548,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55606,7 +55557,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55642,13 +55593,12 @@ @implementation MTRBaseClusterDishwasherAlarm - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -55683,7 +55633,7 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completio } request.alarms = static_cast>(params.alarms.unsignedIntValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -55720,7 +55670,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla } request.mask = static_cast>(params.mask.unsignedIntValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -55731,7 +55681,7 @@ - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55740,7 +55690,7 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55774,7 +55724,7 @@ - (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55783,7 +55733,7 @@ - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55817,7 +55767,7 @@ - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55826,7 +55776,7 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55860,7 +55810,7 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55869,7 +55819,7 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55903,7 +55853,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55913,7 +55863,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55948,7 +55898,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55958,7 +55908,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55993,7 +55943,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56002,7 +55952,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56036,7 +55986,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56045,7 +55995,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56079,7 +56029,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56088,7 +56038,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56122,7 +56072,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56131,7 +56081,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56167,13 +56117,12 @@ @implementation MTRBaseClusterOperationalState - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -56211,7 +56160,7 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56250,7 +56199,7 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56289,7 +56238,7 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56328,7 +56277,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56339,7 +56288,7 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56348,7 +56297,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56382,7 +56331,7 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56391,7 +56340,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56425,7 +56374,7 @@ - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56434,7 +56383,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56468,7 +56417,7 @@ - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56478,7 +56427,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56514,7 +56463,7 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56523,7 +56472,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56560,7 +56509,7 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStat using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56571,7 +56520,7 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -56605,7 +56554,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56615,7 +56564,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56650,7 +56599,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56660,7 +56609,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56695,7 +56644,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56704,7 +56653,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56738,7 +56687,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56747,7 +56696,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56781,7 +56730,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56790,7 +56739,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56824,7 +56773,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56833,7 +56782,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56869,13 +56818,12 @@ @implementation MTRBaseClusterRVCOperationalState - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -56913,7 +56861,7 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56952,7 +56900,7 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56991,7 +56939,7 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57030,7 +56978,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57041,7 +56989,7 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57050,7 +56998,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57084,7 +57032,7 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57093,7 +57041,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57127,7 +57075,7 @@ - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57136,7 +57084,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57171,7 +57119,7 @@ - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57181,7 +57129,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57216,7 +57164,7 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57225,7 +57173,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57262,7 +57210,7 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalS using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57273,7 +57221,7 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -57309,7 +57257,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57319,7 +57267,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57354,7 +57302,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57364,7 +57312,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57399,7 +57347,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57408,7 +57356,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57442,7 +57390,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57451,7 +57399,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57485,7 +57433,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57494,7 +57442,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57528,7 +57476,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57537,7 +57485,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57573,13 +57521,12 @@ @implementation MTRBaseClusterHEPAFilterMonitoring - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -57618,7 +57565,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57629,7 +57576,7 @@ - (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57638,7 +57585,7 @@ - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57673,7 +57620,7 @@ - (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57683,7 +57630,7 @@ - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _ { using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57719,7 +57666,7 @@ - (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57728,7 +57675,7 @@ - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57763,7 +57710,7 @@ - (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57772,7 +57719,7 @@ - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57807,7 +57754,7 @@ - (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -57846,7 +57793,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57858,7 +57805,7 @@ - (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57894,7 +57841,7 @@ - (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _N using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57904,7 +57851,7 @@ - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * { using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57940,7 +57887,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57950,7 +57897,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57986,7 +57933,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57996,7 +57943,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58031,7 +57978,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58040,7 +57987,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58074,7 +58021,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58083,7 +58030,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58117,7 +58064,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58126,7 +58073,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58160,7 +58107,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58169,7 +58116,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58205,13 +58152,12 @@ @implementation MTRBaseClusterActivatedCarbonFilterMonitoring - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -58250,7 +58196,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58261,7 +58207,7 @@ - (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58270,7 +58216,7 @@ - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58305,7 +58251,7 @@ - (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58316,7 +58262,7 @@ - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _ using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -58351,7 +58297,7 @@ - (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58361,7 +58307,7 @@ - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -58395,7 +58341,7 @@ - (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58404,7 +58350,7 @@ - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58439,7 +58385,7 @@ - (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -58478,7 +58424,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58490,7 +58436,7 @@ - (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58526,7 +58472,7 @@ - (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _N using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58536,7 +58482,7 @@ - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58572,7 +58518,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58582,7 +58528,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58618,7 +58564,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58628,7 +58574,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58664,7 +58610,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58673,7 +58619,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58708,7 +58654,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58717,7 +58663,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58751,7 +58697,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58760,7 +58706,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58794,7 +58740,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58803,7 +58749,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58839,13 +58785,12 @@ @implementation MTRBaseClusterDoorLock - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -58888,7 +58833,7 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58932,7 +58877,7 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58975,7 +58920,7 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * definedValue_0 = [self asByteSpan:params.pinCode]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59017,7 +58962,7 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams request.endHour = params.endHour.unsignedCharValue; request.endMinute = params.endMinute.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59053,7 +58998,7 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams request.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59091,7 +59036,7 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa request.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59130,7 +59075,7 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams request.localStartTime = params.localStartTime.unsignedIntValue; request.localEndTime = params.localEndTime.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59166,7 +59111,7 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams request.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59204,7 +59149,7 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa request.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59244,7 +59189,7 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams request.operatingMode = static_cast>(params.operatingMode.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59279,7 +59224,7 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams } request.holidayIndex = params.holidayIndex.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59316,7 +59261,7 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa } request.holidayIndex = params.holidayIndex.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59389,7 +59334,7 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:( = static_cast>(params.credentialRule.unsignedCharValue); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59422,7 +59367,7 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params } request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59461,7 +59406,7 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completi } request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59523,7 +59468,7 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59560,7 +59505,7 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara params.credential.credentialType.unsignedCharValue); request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59606,7 +59551,7 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59650,7 +59595,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59661,7 +59606,7 @@ - (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59670,7 +59615,7 @@ - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59704,7 +59649,7 @@ - (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59713,7 +59658,7 @@ - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59747,7 +59692,7 @@ - (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59756,7 +59701,7 @@ - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59791,7 +59736,7 @@ - (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59800,7 +59745,7 @@ - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59834,7 +59779,7 @@ - (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -59868,7 +59813,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59880,7 +59825,7 @@ - (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59914,7 +59859,7 @@ - (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -59948,7 +59893,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59960,7 +59905,7 @@ - (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59995,7 +59940,7 @@ - (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60029,7 +59974,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60041,7 +59986,7 @@ - (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60076,7 +60021,7 @@ - (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60086,7 +60031,7 @@ - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribePar { using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60122,7 +60067,7 @@ - (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60132,7 +60077,7 @@ - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParam { using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60168,7 +60113,7 @@ - (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60178,7 +60123,7 @@ - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribePara { using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60214,7 +60159,7 @@ - (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60225,7 +60170,7 @@ - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MT { using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60262,7 +60207,7 @@ - (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60273,7 +60218,7 @@ - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MT { using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60310,7 +60255,7 @@ - (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60321,7 +60266,7 @@ - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscr { using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60357,7 +60302,7 @@ - (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60366,7 +60311,7 @@ - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60401,7 +60346,7 @@ - (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60410,7 +60355,7 @@ - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60445,7 +60390,7 @@ - (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60454,7 +60399,7 @@ - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non { using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60489,7 +60434,7 @@ - (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60498,7 +60443,7 @@ - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non { using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60534,7 +60479,7 @@ - (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60544,7 +60489,7 @@ - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60580,7 +60525,7 @@ - (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^) MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60591,7 +60536,7 @@ - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubs { using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60627,7 +60572,7 @@ - (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::Language::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60661,7 +60606,7 @@ - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60673,7 +60618,7 @@ - (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = DoorLock::Attributes::Language::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60707,7 +60652,7 @@ - (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60741,7 +60686,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60753,7 +60698,7 @@ - (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60787,7 +60732,7 @@ - (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60821,7 +60766,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60833,7 +60778,7 @@ - (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60867,7 +60812,7 @@ - (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60901,7 +60846,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60913,7 +60858,7 @@ - (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60947,7 +60892,7 @@ - (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60981,7 +60926,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60993,7 +60938,7 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61028,7 +60973,7 @@ - (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -61038,7 +60983,7 @@ - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams { using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61074,7 +61019,7 @@ - (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params @@ -61085,7 +61030,7 @@ - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribePa { using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61121,7 +61066,7 @@ - (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61155,7 +61100,7 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61168,7 +61113,7 @@ - (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61203,7 +61148,7 @@ - (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61237,7 +61182,7 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61250,7 +61195,7 @@ - (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61285,7 +61230,7 @@ - (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61319,7 +61264,7 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61332,7 +61277,7 @@ - (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61368,7 +61313,7 @@ - (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61402,7 +61347,7 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61415,7 +61360,7 @@ - (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams { using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61451,7 +61396,7 @@ - (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61485,7 +61430,7 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)val TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61498,7 +61443,7 @@ - (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams { using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61533,7 +61478,7 @@ - (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61567,7 +61512,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61580,7 +61525,7 @@ - (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _N { using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61616,7 +61561,7 @@ - (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61650,7 +61595,7 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61664,7 +61609,7 @@ - (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribePa { using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61699,7 +61644,7 @@ - (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61733,7 +61678,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61745,7 +61690,7 @@ - (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Non { using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61781,7 +61726,7 @@ - (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61815,7 +61760,7 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61829,7 +61774,7 @@ - (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribePa { using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61864,7 +61809,7 @@ - (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61898,7 +61843,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61911,7 +61856,7 @@ - (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _N { using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61946,7 +61891,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -61956,7 +61901,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61991,7 +61936,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62001,7 +61946,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62036,7 +61981,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62045,7 +61990,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62079,7 +62024,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62088,7 +62033,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62122,7 +62067,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62131,7 +62076,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62165,7 +62110,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62174,7 +62119,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64359,13 +64304,12 @@ @implementation MTRBaseClusterWindowCovering - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -64403,7 +64347,7 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64443,7 +64387,7 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64482,7 +64426,7 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64518,7 +64462,7 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p } request.liftValue = params.liftValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64555,7 +64499,7 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage } request.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64591,7 +64535,7 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p } request.tiltValue = params.tiltValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64628,7 +64572,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage } request.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64639,7 +64583,7 @@ - (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64648,7 +64592,7 @@ - (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64683,7 +64627,7 @@ - (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64693,7 +64637,7 @@ - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64729,7 +64673,7 @@ - (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64739,7 +64683,7 @@ - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64774,7 +64718,7 @@ - (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64784,7 +64728,7 @@ - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _N { using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64819,7 +64763,7 @@ - (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64829,7 +64773,7 @@ - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _N { using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64865,7 +64809,7 @@ - (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64875,7 +64819,7 @@ - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64911,7 +64855,7 @@ - (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64921,7 +64865,7 @@ - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64956,7 +64900,7 @@ - (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64965,7 +64909,7 @@ - (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65000,7 +64944,7 @@ - (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65011,7 +64955,7 @@ - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeP { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65047,7 +64991,7 @@ - (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65058,7 +65002,7 @@ - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeP { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65093,7 +65037,7 @@ - (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65102,7 +65046,7 @@ - (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Non { using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65138,7 +65082,7 @@ - (void)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65149,7 +65093,7 @@ - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscrib { using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65186,7 +65130,7 @@ - (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65197,7 +65141,7 @@ - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscrib { using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65233,7 +65177,7 @@ - (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65242,7 +65186,7 @@ - (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65277,7 +65221,7 @@ - (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65288,7 +65232,7 @@ - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscri { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65325,7 +65269,7 @@ - (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65336,7 +65280,7 @@ - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscri { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65373,7 +65317,7 @@ - (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65383,7 +65327,7 @@ - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65419,7 +65363,7 @@ - (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65429,7 +65373,7 @@ - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65465,7 +65409,7 @@ - (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65475,7 +65419,7 @@ - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65511,7 +65455,7 @@ - (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65521,7 +65465,7 @@ - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65556,7 +65500,7 @@ - (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -65590,7 +65534,7 @@ - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -65602,7 +65546,7 @@ - (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65636,7 +65580,7 @@ - (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65645,7 +65589,7 @@ - (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65679,7 +65623,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65689,7 +65633,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65724,7 +65668,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65734,7 +65678,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65769,7 +65713,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65778,7 +65722,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65812,7 +65756,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65821,7 +65765,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65855,7 +65799,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65864,7 +65808,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65898,7 +65842,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65907,7 +65851,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67210,13 +67154,12 @@ @implementation MTRBaseClusterBarrierControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -67252,7 +67195,7 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont } request.percentOpen = params.percentOpen.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67292,7 +67235,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67303,7 +67246,7 @@ - (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67313,7 +67256,7 @@ - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _No { using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67348,7 +67291,7 @@ - (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67358,7 +67301,7 @@ - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _N { using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67393,7 +67336,7 @@ - (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67403,7 +67346,7 @@ - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _N { using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67438,7 +67381,7 @@ - (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67472,7 +67415,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67484,7 +67427,7 @@ - (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67519,7 +67462,7 @@ - (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67553,7 +67496,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67566,7 +67509,7 @@ - (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _No { using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67602,7 +67545,7 @@ - (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67636,7 +67579,7 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)val TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67649,7 +67592,7 @@ - (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams { using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67685,7 +67628,7 @@ - (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67719,7 +67662,7 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67732,7 +67675,7 @@ - (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParam { using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67767,7 +67710,7 @@ - (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67801,7 +67744,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67813,7 +67756,7 @@ - (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67848,7 +67791,7 @@ - (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67882,7 +67825,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67895,7 +67838,7 @@ - (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _No { using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67930,7 +67873,7 @@ - (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67939,7 +67882,7 @@ - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67974,7 +67917,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67984,7 +67927,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68019,7 +67962,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68029,7 +67972,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68064,7 +68007,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68073,7 +68016,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68107,7 +68050,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68116,7 +68059,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68150,7 +68093,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68159,7 +68102,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68193,7 +68136,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68202,7 +68145,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68994,13 +68937,12 @@ @implementation MTRBaseClusterPumpConfigurationAndControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -69010,7 +68952,7 @@ - (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69019,7 +68961,7 @@ - (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69053,7 +68995,7 @@ - (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69062,7 +69004,7 @@ - (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69096,7 +69038,7 @@ - (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69105,7 +69047,7 @@ - (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69139,7 +69081,7 @@ - (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69148,7 +69090,7 @@ - (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69183,7 +69125,7 @@ - (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69192,7 +69134,7 @@ - (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69227,7 +69169,7 @@ - (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69236,7 +69178,7 @@ - (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69271,7 +69213,7 @@ - (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69280,7 +69222,7 @@ - (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69315,7 +69257,7 @@ - (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69324,7 +69266,7 @@ - (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69358,7 +69300,7 @@ - (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69367,7 +69309,7 @@ - (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69401,7 +69343,7 @@ - (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69410,7 +69352,7 @@ - (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69444,7 +69386,7 @@ - (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69453,7 +69395,7 @@ - (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69487,7 +69429,7 @@ - (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69496,7 +69438,7 @@ - (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69530,7 +69472,7 @@ - (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69539,7 +69481,7 @@ - (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69573,7 +69515,7 @@ - (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69582,7 +69524,7 @@ - (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69618,7 +69560,7 @@ - (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)( using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69628,7 +69570,7 @@ - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69664,7 +69606,7 @@ - (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69674,7 +69616,7 @@ - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _ { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69709,7 +69651,7 @@ - (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69718,7 +69660,7 @@ - (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69752,7 +69694,7 @@ - (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69761,7 +69703,7 @@ - (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69795,7 +69737,7 @@ - (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -69834,7 +69776,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -69847,7 +69789,7 @@ - (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _ { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69882,7 +69824,7 @@ - (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69891,7 +69833,7 @@ - (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69926,7 +69868,7 @@ - (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -69965,7 +69907,7 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -69978,7 +69920,7 @@ - (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70014,7 +69956,7 @@ - (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -70048,7 +69990,7 @@ - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -70060,7 +70002,7 @@ - (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70095,7 +70037,7 @@ - (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -70129,7 +70071,7 @@ - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -70141,7 +70083,7 @@ - (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70176,7 +70118,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70186,7 +70128,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70222,7 +70164,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70232,7 +70174,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70267,7 +70209,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70276,7 +70218,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70311,7 +70253,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70320,7 +70262,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70354,7 +70296,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70363,7 +70305,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70397,7 +70339,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70406,7 +70348,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71707,13 +71649,12 @@ @implementation MTRBaseClusterThermostat - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -71750,7 +71691,7 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara request.mode = static_cast>(params.mode.unsignedCharValue); request.amount = params.amount.charValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71824,7 +71765,7 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71862,7 +71803,7 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams request.modeToReturn = static_cast>(params.modeToReturn.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71902,7 +71843,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71913,7 +71854,7 @@ - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -71922,7 +71863,7 @@ - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71957,7 +71898,7 @@ - (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -71967,7 +71908,7 @@ - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72002,7 +71943,7 @@ - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72011,7 +71952,7 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72046,7 +71987,7 @@ - (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72056,7 +71997,7 @@ - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72092,7 +72033,7 @@ - (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72102,7 +72043,7 @@ - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72138,7 +72079,7 @@ - (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72148,7 +72089,7 @@ - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72184,7 +72125,7 @@ - (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72194,7 +72135,7 @@ - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72229,7 +72170,7 @@ - (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72238,7 +72179,7 @@ - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72273,7 +72214,7 @@ - (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72282,7 +72223,7 @@ - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72318,7 +72259,7 @@ - (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72352,7 +72293,7 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72365,7 +72306,7 @@ - (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribePar { using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72401,7 +72342,7 @@ - (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72435,7 +72376,7 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72448,7 +72389,7 @@ - (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribePar { using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72484,7 +72425,7 @@ - (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72518,7 +72459,7 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72531,7 +72472,7 @@ - (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72567,7 +72508,7 @@ - (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72601,7 +72542,7 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72614,7 +72555,7 @@ - (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72650,7 +72591,7 @@ - (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72684,7 +72625,7 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72697,7 +72638,7 @@ - (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParam { using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72733,7 +72674,7 @@ - (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72767,7 +72708,7 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72780,7 +72721,7 @@ - (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParam { using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72815,7 +72756,7 @@ - (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72849,7 +72790,7 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72862,7 +72803,7 @@ - (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72897,7 +72838,7 @@ - (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72931,7 +72872,7 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72944,7 +72885,7 @@ - (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72979,7 +72920,7 @@ - (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73013,7 +72954,7 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73026,7 +72967,7 @@ - (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73061,7 +73002,7 @@ - (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73095,7 +73036,7 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73108,7 +73049,7 @@ - (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73143,7 +73084,7 @@ - (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73177,7 +73118,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73190,7 +73131,7 @@ - (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _N { using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73225,7 +73166,7 @@ - (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73259,7 +73200,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73271,7 +73212,7 @@ - (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73307,7 +73248,7 @@ - (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)( using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73341,7 +73282,7 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)v TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73354,7 +73295,7 @@ - (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribePara { using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73389,7 +73330,7 @@ - (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73423,7 +73364,7 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73435,7 +73376,7 @@ - (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73469,7 +73410,7 @@ - (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73479,7 +73420,7 @@ - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * { using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73514,7 +73455,7 @@ - (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73523,7 +73464,7 @@ - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73558,7 +73499,7 @@ - (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73568,7 +73509,7 @@ - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParam { using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73604,7 +73545,7 @@ - (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73614,7 +73555,7 @@ - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73650,7 +73591,7 @@ - (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73684,7 +73625,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73697,7 +73638,7 @@ - (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73733,7 +73674,7 @@ - (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value @@ -73773,7 +73714,7 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Null nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73787,7 +73728,7 @@ - (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscrib { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73824,7 +73765,7 @@ - (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value @@ -73859,7 +73800,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _N TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73873,7 +73814,7 @@ - (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubsc { using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73910,7 +73851,7 @@ - (void)readAttributeThermostatRunningStateWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73920,7 +73861,7 @@ - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * { using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73955,7 +73896,7 @@ - (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73965,7 +73906,7 @@ - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74000,7 +73941,7 @@ - (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74010,7 +73951,7 @@ - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74046,7 +73987,7 @@ - (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74057,7 +73998,7 @@ - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeP { using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74092,7 +74033,7 @@ - (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -74131,7 +74072,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74143,7 +74084,7 @@ - (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74178,7 +74119,7 @@ - (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74188,7 +74129,7 @@ - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74223,7 +74164,7 @@ - (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74233,7 +74174,7 @@ - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74268,7 +74209,7 @@ - (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -74307,7 +74248,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74319,7 +74260,7 @@ - (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74354,7 +74295,7 @@ - (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74364,7 +74305,7 @@ - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74399,7 +74340,7 @@ - (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74409,7 +74350,7 @@ - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74444,7 +74385,7 @@ - (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74478,7 +74419,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74491,7 +74432,7 @@ - (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74526,7 +74467,7 @@ - (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74560,7 +74501,7 @@ - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74572,7 +74513,7 @@ - (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74606,7 +74547,7 @@ - (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74640,7 +74581,7 @@ - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74652,7 +74593,7 @@ - (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74686,7 +74627,7 @@ - (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74720,7 +74661,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74732,7 +74673,7 @@ - (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74767,7 +74708,7 @@ - (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74801,7 +74742,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74813,7 +74754,7 @@ - (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74848,7 +74789,7 @@ - (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74882,7 +74823,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74894,7 +74835,7 @@ - (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74928,7 +74869,7 @@ - (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74962,7 +74903,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74974,7 +74915,7 @@ - (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75009,7 +74950,7 @@ - (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75018,7 +74959,7 @@ - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75053,7 +74994,7 @@ - (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -75087,7 +75028,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -75099,7 +75040,7 @@ - (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75134,7 +75075,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75144,7 +75085,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75179,7 +75120,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75189,7 +75130,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75224,7 +75165,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75233,7 +75174,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75267,7 +75208,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75276,7 +75217,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75310,7 +75251,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75319,7 +75260,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75353,7 +75294,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75362,7 +75303,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78126,13 +78067,12 @@ @implementation MTRBaseClusterFanControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -78176,7 +78116,7 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRS definedValue_0 = params.lowestOff.boolValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78187,7 +78127,7 @@ - (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78221,7 +78161,7 @@ - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78233,7 +78173,7 @@ - (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78267,7 +78207,7 @@ - (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78301,7 +78241,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78313,7 +78253,7 @@ - (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78348,7 +78288,7 @@ - (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -78387,7 +78327,7 @@ - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78399,7 +78339,7 @@ - (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78433,7 +78373,7 @@ - (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78442,7 +78382,7 @@ - (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78476,7 +78416,7 @@ - (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78485,7 +78425,7 @@ - (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78519,7 +78459,7 @@ - (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -78558,7 +78498,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78570,7 +78510,7 @@ - (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78604,7 +78544,7 @@ - (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78613,7 +78553,7 @@ - (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78647,7 +78587,7 @@ - (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78656,7 +78596,7 @@ - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78690,7 +78630,7 @@ - (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78724,7 +78664,7 @@ - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78736,7 +78676,7 @@ - (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78770,7 +78710,7 @@ - (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78779,7 +78719,7 @@ - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78813,7 +78753,7 @@ - (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78847,7 +78787,7 @@ - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78859,7 +78799,7 @@ - (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78893,7 +78833,7 @@ - (void)readAttributeAirflowDirectionWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78927,7 +78867,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78939,7 +78879,7 @@ - (void)subscribeAttributeAirflowDirectionWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78974,7 +78914,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78984,7 +78924,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79019,7 +78959,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79029,7 +78969,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79064,7 +79004,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79073,7 +79013,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FanControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79107,7 +79047,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79116,7 +79056,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79150,7 +79090,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79159,7 +79099,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79193,7 +79133,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79202,7 +79142,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79999,13 +79939,12 @@ @implementation MTRBaseClusterThermostatUserInterfaceConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -80016,7 +79955,7 @@ - (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80050,7 +79989,7 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -80063,7 +80002,7 @@ - (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80098,7 +80037,7 @@ - (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80132,7 +80071,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -80144,7 +80083,7 @@ - (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80179,7 +80118,7 @@ - (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80213,7 +80152,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnul TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -80227,7 +80166,7 @@ - (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeP { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80263,7 +80202,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80274,7 +80213,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -80309,7 +80248,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80320,7 +80259,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -80355,7 +80294,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80364,7 +80303,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80399,7 +80338,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80408,7 +80347,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80442,7 +80381,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80451,7 +80390,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80485,7 +80424,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80494,7 +80433,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80924,13 +80863,12 @@ @implementation MTRBaseClusterColorControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -80970,7 +80908,7 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81009,7 +80947,7 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completi request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81049,7 +80987,7 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completi request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81088,7 +81026,7 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81127,7 +81065,7 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81167,7 +81105,7 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81208,7 +81146,7 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81248,7 +81186,7 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81287,7 +81225,7 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81327,7 +81265,7 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81367,7 +81305,7 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81409,7 +81347,7 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81448,7 +81386,7 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81488,7 +81426,7 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81529,7 +81467,7 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81573,7 +81511,7 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81610,7 +81548,7 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81652,7 +81590,7 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81695,7 +81633,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81706,7 +81644,7 @@ - (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81715,7 +81653,7 @@ - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81749,7 +81687,7 @@ - (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81758,7 +81696,7 @@ - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81793,7 +81731,7 @@ - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81802,7 +81740,7 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81836,7 +81774,7 @@ - (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81845,7 +81783,7 @@ - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81879,7 +81817,7 @@ - (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81888,7 +81826,7 @@ - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81922,7 +81860,7 @@ - (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81931,7 +81869,7 @@ - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81966,7 +81904,7 @@ - (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81975,7 +81913,7 @@ - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82011,7 +81949,7 @@ - (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82021,7 +81959,7 @@ - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * { using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82056,7 +81994,7 @@ - (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82065,7 +82003,7 @@ - (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82099,7 +82037,7 @@ - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Options::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -82133,7 +82071,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -82145,7 +82083,7 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = ColorControl::Attributes::Options::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82179,7 +82117,7 @@ - (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82188,7 +82126,7 @@ - (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82223,7 +82161,7 @@ - (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82232,7 +82170,7 @@ - (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82266,7 +82204,7 @@ - (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82275,7 +82213,7 @@ - (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82309,7 +82247,7 @@ - (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82318,7 +82256,7 @@ - (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82353,7 +82291,7 @@ - (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82362,7 +82300,7 @@ - (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82396,7 +82334,7 @@ - (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82405,7 +82343,7 @@ - (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82439,7 +82377,7 @@ - (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82448,7 +82386,7 @@ - (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82483,7 +82421,7 @@ - (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82492,7 +82430,7 @@ - (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82526,7 +82464,7 @@ - (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82535,7 +82473,7 @@ - (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82569,7 +82507,7 @@ - (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82578,7 +82516,7 @@ - (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82613,7 +82551,7 @@ - (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82622,7 +82560,7 @@ - (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82656,7 +82594,7 @@ - (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82665,7 +82603,7 @@ - (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82699,7 +82637,7 @@ - (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82708,7 +82646,7 @@ - (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82743,7 +82681,7 @@ - (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82752,7 +82690,7 @@ - (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82786,7 +82724,7 @@ - (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82795,7 +82733,7 @@ - (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82829,7 +82767,7 @@ - (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82838,7 +82776,7 @@ - (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82873,7 +82811,7 @@ - (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82882,7 +82820,7 @@ - (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82916,7 +82854,7 @@ - (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82925,7 +82863,7 @@ - (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82959,7 +82897,7 @@ - (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82968,7 +82906,7 @@ - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83003,7 +82941,7 @@ - (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83037,7 +82975,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83049,7 +82987,7 @@ - (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83083,7 +83021,7 @@ - (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83117,7 +83055,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83129,7 +83067,7 @@ - (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83163,7 +83101,7 @@ - (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83197,7 +83135,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83209,7 +83147,7 @@ - (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83243,7 +83181,7 @@ - (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83277,7 +83215,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83289,7 +83227,7 @@ - (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83323,7 +83261,7 @@ - (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -83362,7 +83300,7 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83375,7 +83313,7 @@ - (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83410,7 +83348,7 @@ - (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83444,7 +83382,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83456,7 +83394,7 @@ - (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83490,7 +83428,7 @@ - (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83524,7 +83462,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83536,7 +83474,7 @@ - (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83570,7 +83508,7 @@ - (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -83609,7 +83547,7 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83622,7 +83560,7 @@ - (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83657,7 +83595,7 @@ - (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83691,7 +83629,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83703,7 +83641,7 @@ - (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83737,7 +83675,7 @@ - (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83771,7 +83709,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83783,7 +83721,7 @@ - (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83817,7 +83755,7 @@ - (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -83856,7 +83794,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83869,7 +83807,7 @@ - (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83904,7 +83842,7 @@ - (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -83914,7 +83852,7 @@ - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _No { using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83949,7 +83887,7 @@ - (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -83958,7 +83896,7 @@ - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83993,7 +83931,7 @@ - (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84002,7 +83940,7 @@ - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84037,7 +83975,7 @@ - (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84047,7 +83985,7 @@ - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _No { using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84082,7 +84020,7 @@ - (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84091,7 +84029,7 @@ - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84126,7 +84064,7 @@ - (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84136,7 +84074,7 @@ - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParam { using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84172,7 +84110,7 @@ - (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84182,7 +84120,7 @@ - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribePara { using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84217,7 +84155,7 @@ - (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84226,7 +84164,7 @@ - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84262,7 +84200,7 @@ - (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84272,7 +84210,7 @@ - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribePara { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84308,7 +84246,7 @@ - (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84318,7 +84256,7 @@ - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribePara { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84354,7 +84292,7 @@ - (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84365,7 +84303,7 @@ - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscrib { using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84402,7 +84340,7 @@ - (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -84441,7 +84379,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullab nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -84455,7 +84393,7 @@ - (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeP { using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84490,7 +84428,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84500,7 +84438,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84535,7 +84473,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84545,7 +84483,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84580,7 +84518,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84589,7 +84527,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84623,7 +84561,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84632,7 +84570,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84666,7 +84604,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84675,7 +84613,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84709,7 +84647,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84718,7 +84656,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87476,13 +87414,12 @@ @implementation MTRBaseClusterBallastConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -87492,7 +87429,7 @@ - (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87501,7 +87438,7 @@ - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87536,7 +87473,7 @@ - (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87545,7 +87482,7 @@ - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87580,7 +87517,7 @@ - (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87589,7 +87526,7 @@ - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87623,7 +87560,7 @@ - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -87657,7 +87594,7 @@ - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87669,7 +87606,7 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87703,7 +87640,7 @@ - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -87737,7 +87674,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87749,7 +87686,7 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87784,7 +87721,7 @@ - (void)readAttributeIntrinsicBallastFactorWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -87823,7 +87760,7 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87836,7 +87773,7 @@ - (void)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams * { using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87872,7 +87809,7 @@ - (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -87911,7 +87848,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)val nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87924,7 +87861,7 @@ - (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams { using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87959,7 +87896,7 @@ - (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87968,7 +87905,7 @@ - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88002,7 +87939,7 @@ - (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -88036,7 +87973,7 @@ - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88048,7 +87985,7 @@ - (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88082,7 +88019,7 @@ - (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -88116,7 +88053,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88128,7 +88065,7 @@ - (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88163,7 +88100,7 @@ - (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -88202,7 +88139,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88214,7 +88151,7 @@ - (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88248,7 +88185,7 @@ - (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -88287,7 +88224,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88299,7 +88236,7 @@ - (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88333,7 +88270,7 @@ - (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -88367,7 +88304,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88379,7 +88316,7 @@ - (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88414,7 +88351,7 @@ - (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -88453,7 +88390,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88466,7 +88403,7 @@ - (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * { using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88502,7 +88439,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88512,7 +88449,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88548,7 +88485,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88558,7 +88495,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88593,7 +88530,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88602,7 +88539,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88636,7 +88573,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88645,7 +88582,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88679,7 +88616,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88688,7 +88625,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88722,7 +88659,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88731,7 +88668,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89710,13 +89647,12 @@ @implementation MTRBaseClusterIlluminanceMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -89726,7 +89662,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89735,7 +89671,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89769,7 +89705,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89778,7 +89714,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89813,7 +89749,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89822,7 +89758,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89857,7 +89793,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89866,7 +89802,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89901,7 +89837,7 @@ - (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89910,7 +89846,7 @@ - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89946,7 +89882,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89956,7 +89892,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89992,7 +89928,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90002,7 +89938,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90037,7 +89973,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90046,7 +89982,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90080,7 +90016,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90089,7 +90025,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90123,7 +90059,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90132,7 +90068,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90166,7 +90102,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90175,7 +90111,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90657,13 +90593,12 @@ @implementation MTRBaseClusterTemperatureMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -90673,7 +90608,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90682,7 +90617,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90716,7 +90651,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90725,7 +90660,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90760,7 +90695,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90769,7 +90704,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90804,7 +90739,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90813,7 +90748,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90848,7 +90783,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90858,7 +90793,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90894,7 +90829,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90904,7 +90839,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90939,7 +90874,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90948,7 +90883,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90982,7 +90917,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90991,7 +90926,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91025,7 +90960,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91034,7 +90969,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91068,7 +91003,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91077,7 +91012,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91515,13 +91450,12 @@ @implementation MTRBaseClusterPressureMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -91531,7 +91465,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91540,7 +91474,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91574,7 +91508,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91583,7 +91517,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91618,7 +91552,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91627,7 +91561,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91662,7 +91596,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91671,7 +91605,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91705,7 +91639,7 @@ - (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91714,7 +91648,7 @@ - (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91748,7 +91682,7 @@ - (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91757,7 +91691,7 @@ - (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91791,7 +91725,7 @@ - (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91800,7 +91734,7 @@ - (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91834,7 +91768,7 @@ - (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91843,7 +91777,7 @@ - (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91878,7 +91812,7 @@ - (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91887,7 +91821,7 @@ - (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91922,7 +91856,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91932,7 +91866,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91967,7 +91901,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91977,7 +91911,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92012,7 +91946,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92021,7 +91955,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92055,7 +91989,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92064,7 +91998,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92098,7 +92032,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92107,7 +92041,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92141,7 +92075,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92150,7 +92084,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92804,13 +92738,12 @@ @implementation MTRBaseClusterFlowMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -92820,7 +92753,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92829,7 +92762,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92863,7 +92796,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92872,7 +92805,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92907,7 +92840,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92916,7 +92849,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92951,7 +92884,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92960,7 +92893,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92994,7 +92927,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93004,7 +92937,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93039,7 +92972,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93049,7 +92982,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93084,7 +93017,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93093,7 +93026,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93127,7 +93060,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93136,7 +93069,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93170,7 +93103,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93179,7 +93112,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93213,7 +93146,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93222,7 +93155,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93660,13 +93593,12 @@ @implementation MTRBaseClusterRelativeHumidityMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -93676,7 +93608,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93685,7 +93617,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93719,7 +93651,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93728,7 +93660,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93763,7 +93695,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93772,7 +93704,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93807,7 +93739,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93816,7 +93748,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93851,7 +93783,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93861,7 +93793,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93897,7 +93829,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93907,7 +93839,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93942,7 +93874,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93951,7 +93883,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93986,7 +93918,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93995,7 +93927,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94029,7 +93961,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94038,7 +93970,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94072,7 +94004,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94081,7 +94013,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94519,13 +94451,12 @@ @implementation MTRBaseClusterOccupancySensing - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -94535,7 +94466,7 @@ - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94544,7 +94475,7 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94579,7 +94510,7 @@ - (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nul using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94589,7 +94520,7 @@ - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _N { using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94625,7 +94556,7 @@ - (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94635,7 +94566,7 @@ - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParam { using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94671,7 +94602,7 @@ - (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -94705,7 +94636,7 @@ - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94719,7 +94650,7 @@ - (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribePa { using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94755,7 +94686,7 @@ - (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -94789,7 +94720,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94803,7 +94734,7 @@ - (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribePa { using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94839,7 +94770,7 @@ - (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -94874,7 +94805,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Non TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94888,7 +94819,7 @@ - (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscri { using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94925,7 +94856,7 @@ - (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^) MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -94960,7 +94891,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _ TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94974,7 +94905,7 @@ - (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubs { using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95011,7 +94942,7 @@ - (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^) MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -95046,7 +94977,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _ TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95060,7 +94991,7 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubs { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95097,7 +95028,7 @@ - (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -95134,7 +95065,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95148,7 +95079,7 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTR { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95185,7 +95116,7 @@ - (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -95222,7 +95153,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumbe TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95236,7 +95167,7 @@ - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MT { using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95273,7 +95204,7 @@ - (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -95310,7 +95241,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumbe TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95324,7 +95255,7 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MT { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95361,7 +95292,7 @@ - (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion: MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -95398,7 +95329,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSN TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95412,7 +95343,7 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95448,7 +95379,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95458,7 +95389,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95493,7 +95424,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95503,7 +95434,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95538,7 +95469,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95547,7 +95478,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95581,7 +95512,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95590,7 +95521,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95624,7 +95555,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95633,7 +95564,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95667,7 +95598,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95676,7 +95607,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96605,13 +96536,12 @@ @implementation MTRBaseClusterCarbonMonoxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -96621,7 +96551,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96630,7 +96560,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96664,7 +96594,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96673,7 +96603,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96708,7 +96638,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96717,7 +96647,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96752,7 +96682,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96761,7 +96691,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96797,7 +96727,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96807,7 +96737,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96842,7 +96772,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96852,7 +96782,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96888,7 +96818,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96898,7 +96828,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96933,7 +96863,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96942,7 +96872,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96977,7 +96907,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96987,7 +96917,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97023,7 +96953,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97033,7 +96963,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97070,7 +97000,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97080,7 +97010,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97114,7 +97044,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97125,7 +97055,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97160,7 +97090,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97171,7 +97101,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97206,7 +97136,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97215,7 +97145,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97250,7 +97180,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97259,7 +97189,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97293,7 +97223,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97302,7 +97232,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97336,7 +97266,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97345,7 +97275,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97381,13 +97311,12 @@ @implementation MTRBaseClusterCarbonDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -97397,7 +97326,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97406,7 +97335,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97440,7 +97369,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97449,7 +97378,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97484,7 +97413,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97493,7 +97422,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97528,7 +97457,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97537,7 +97466,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97573,7 +97502,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97583,7 +97512,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97618,7 +97547,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97628,7 +97557,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97664,7 +97593,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97674,7 +97603,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97709,7 +97638,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97718,7 +97647,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97753,7 +97682,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97763,7 +97692,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97799,7 +97728,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97809,7 +97738,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97846,7 +97775,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97856,7 +97785,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97890,7 +97819,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97901,7 +97830,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97936,7 +97865,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97947,7 +97876,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97982,7 +97911,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97991,7 +97920,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98026,7 +97955,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98035,7 +97964,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98069,7 +97998,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98078,7 +98007,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98112,7 +98041,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98121,7 +98050,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98157,13 +98086,12 @@ @implementation MTRBaseClusterNitrogenDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -98173,7 +98101,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98182,7 +98110,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98216,7 +98144,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98225,7 +98153,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98260,7 +98188,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98269,7 +98197,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98304,7 +98232,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98313,7 +98241,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98349,7 +98277,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98359,7 +98287,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98394,7 +98322,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98404,7 +98332,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98440,7 +98368,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98450,7 +98378,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98485,7 +98413,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98494,7 +98422,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98529,7 +98457,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98539,7 +98467,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98576,7 +98504,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98586,7 +98514,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98623,7 +98551,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98633,7 +98561,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98667,7 +98595,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98678,7 +98606,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98714,7 +98642,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98725,7 +98653,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98760,7 +98688,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98769,7 +98697,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98804,7 +98732,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98813,7 +98741,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98847,7 +98775,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98856,7 +98784,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98890,7 +98818,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98899,7 +98827,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98935,13 +98863,12 @@ @implementation MTRBaseClusterOzoneConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -98951,7 +98878,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98960,7 +98887,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98994,7 +98921,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99003,7 +98930,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99038,7 +98965,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99047,7 +98974,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99082,7 +99009,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99091,7 +99018,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99127,7 +99054,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99137,7 +99064,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99172,7 +99099,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99182,7 +99109,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99218,7 +99145,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99228,7 +99155,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99263,7 +99190,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99272,7 +99199,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99307,7 +99234,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99316,7 +99243,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99352,7 +99279,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99361,7 +99288,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99397,7 +99324,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99406,7 +99333,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99441,7 +99368,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99451,7 +99378,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99487,7 +99414,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99497,7 +99424,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99532,7 +99459,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99541,7 +99468,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99576,7 +99503,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99585,7 +99512,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99619,7 +99546,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99628,7 +99555,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99662,7 +99589,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99671,7 +99598,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99707,13 +99634,12 @@ @implementation MTRBaseClusterPM25ConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -99723,7 +99649,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99732,7 +99658,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99766,7 +99692,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99775,7 +99701,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99810,7 +99736,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99819,7 +99745,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99854,7 +99780,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99863,7 +99789,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99899,7 +99825,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99909,7 +99835,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99944,7 +99870,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99954,7 +99880,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99990,7 +99916,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100000,7 +99926,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100035,7 +99961,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100044,7 +99970,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100079,7 +100005,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100088,7 +100014,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100124,7 +100050,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100133,7 +100059,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100169,7 +100095,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100178,7 +100104,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100213,7 +100139,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100223,7 +100149,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100259,7 +100185,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100269,7 +100195,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100304,7 +100230,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100313,7 +100239,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100348,7 +100274,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100357,7 +100283,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100391,7 +100317,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100400,7 +100326,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100434,7 +100360,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100443,7 +100369,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100479,13 +100405,12 @@ @implementation MTRBaseClusterFormaldehydeConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -100495,7 +100420,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100504,7 +100429,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100538,7 +100463,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100547,7 +100472,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100582,7 +100507,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100591,7 +100516,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100626,7 +100551,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100635,7 +100560,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100671,7 +100596,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100681,7 +100606,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100716,7 +100641,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100726,7 +100651,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100762,7 +100687,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100772,7 +100697,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100807,7 +100732,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100816,7 +100741,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100851,7 +100776,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100861,7 +100786,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -100896,7 +100821,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100906,7 +100831,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -100942,7 +100867,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100951,7 +100876,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100986,7 +100911,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100997,7 +100922,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -101032,7 +100957,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101043,7 +100968,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -101078,7 +101003,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101087,7 +101012,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101122,7 +101047,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101131,7 +101056,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101165,7 +101090,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101174,7 +101099,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101208,7 +101133,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101217,7 +101142,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101253,13 +101178,12 @@ @implementation MTRBaseClusterPM1ConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -101269,7 +101193,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101278,7 +101202,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101312,7 +101236,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101321,7 +101245,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101356,7 +101280,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101365,7 +101289,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101400,7 +101324,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101409,7 +101333,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101445,7 +101369,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101455,7 +101379,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101490,7 +101414,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101500,7 +101424,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101536,7 +101460,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101546,7 +101470,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101581,7 +101505,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101590,7 +101514,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101625,7 +101549,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101634,7 +101558,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101670,7 +101594,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101679,7 +101603,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101715,7 +101639,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101724,7 +101648,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101759,7 +101683,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101769,7 +101693,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101805,7 +101729,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101815,7 +101739,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101850,7 +101774,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101859,7 +101783,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101894,7 +101818,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101903,7 +101827,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101937,7 +101861,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101946,7 +101870,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101980,7 +101904,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101989,7 +101913,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102025,13 +101949,12 @@ @implementation MTRBaseClusterPM10ConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -102041,7 +101964,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102050,7 +101973,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102084,7 +102007,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102093,7 +102016,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102128,7 +102051,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102137,7 +102060,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102172,7 +102095,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102181,7 +102104,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102217,7 +102140,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102227,7 +102150,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102262,7 +102185,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102272,7 +102195,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102308,7 +102231,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102318,7 +102241,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102353,7 +102276,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102362,7 +102285,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102397,7 +102320,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102406,7 +102329,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102442,7 +102365,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102451,7 +102374,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102487,7 +102410,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102496,7 +102419,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102531,7 +102454,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102541,7 +102464,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102577,7 +102500,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102587,7 +102510,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102622,7 +102545,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102631,7 +102554,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102666,7 +102589,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102675,7 +102598,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102709,7 +102632,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102718,7 +102641,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102752,7 +102675,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102761,7 +102684,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102797,13 +102720,12 @@ @implementation MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurem - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -102813,7 +102735,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102822,7 +102744,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102856,7 +102778,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102865,7 +102787,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102900,7 +102822,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102909,7 +102831,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102944,7 +102866,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102953,7 +102875,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102989,7 +102911,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102999,7 +102921,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103035,7 +102957,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103045,7 +102967,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103081,7 +103003,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103091,7 +103013,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103127,7 +103049,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103136,7 +103058,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103172,7 +103094,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl return MTRReadAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge, NSNumber, TypeInfo::DecodableType>( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103183,7 +103105,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge, NSNumber, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103221,7 +103143,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla return MTRReadAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge, NSNumber, TypeInfo::DecodableType>( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103232,7 +103154,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge, NSNumber, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103269,7 +103191,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103279,7 +103201,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge, NSNumber, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103316,7 +103238,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103328,7 +103250,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge, NSArray, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103365,7 +103287,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103376,7 +103298,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103414,7 +103336,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103424,7 +103346,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103460,7 +103382,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103470,7 +103392,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103506,7 +103428,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103515,7 +103437,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103549,7 +103471,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103558,7 +103480,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103594,13 +103516,12 @@ @implementation MTRBaseClusterRadonConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -103610,7 +103531,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103619,7 +103540,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103653,7 +103574,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103662,7 +103583,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103697,7 +103618,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103706,7 +103627,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103741,7 +103662,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103750,7 +103671,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103786,7 +103707,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103796,7 +103717,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103831,7 +103752,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103841,7 +103762,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103877,7 +103798,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103887,7 +103808,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103922,7 +103843,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103931,7 +103852,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103966,7 +103887,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103975,7 +103896,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104011,7 +103932,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104020,7 +103941,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104056,7 +103977,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104065,7 +103986,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104100,7 +104021,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104110,7 +104031,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104146,7 +104067,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104156,7 +104077,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104191,7 +104112,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104200,7 +104121,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104235,7 +104156,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104244,7 +104165,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104278,7 +104199,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104287,7 +104208,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104321,7 +104242,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104330,7 +104251,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104366,13 +104287,12 @@ @implementation MTRBaseClusterWakeOnLAN - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -104382,7 +104302,7 @@ - (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104391,7 +104311,7 @@ - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104425,7 +104345,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104435,7 +104355,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104470,7 +104390,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104480,7 +104400,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104515,7 +104435,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104524,7 +104444,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104558,7 +104478,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104567,7 +104487,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104601,7 +104521,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104610,7 +104530,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104644,7 +104564,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104653,7 +104573,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104962,13 +104882,12 @@ @implementation MTRBaseClusterChannel - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -105001,7 +104920,7 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params } request.match = [self asCharSpan:params.match]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105039,7 +104958,7 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP request.majorNumber = params.majorNumber.unsignedShortValue; request.minorNumber = params.minorNumber.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105075,7 +104994,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params compl } request.count = params.count.shortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105086,7 +105005,7 @@ - (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105095,7 +105014,7 @@ - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105131,7 +105050,7 @@ - (void)readAttributeLineupWithCompletion:(void (^)(MTRChannelClusterLineupInfoS using TypeInfo = Channel::Attributes::Lineup::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105141,7 +105060,7 @@ - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = Channel::Attributes::Lineup::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105178,7 +105097,7 @@ - (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterCha using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105188,7 +105107,7 @@ - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105223,7 +105142,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105233,7 +105152,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105268,7 +105187,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105278,7 +105197,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105313,7 +105232,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105322,7 +105241,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Channel::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105356,7 +105275,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105365,7 +105284,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105399,7 +105318,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105408,7 +105327,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105442,7 +105361,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105451,7 +105370,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105869,13 +105788,12 @@ @implementation MTRBaseClusterTargetNavigator - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -105913,7 +105831,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams definedValue_0 = [self asCharSpan:params.data]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105924,7 +105842,7 @@ - (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105933,7 +105851,7 @@ - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105967,7 +105885,7 @@ - (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105976,7 +105894,7 @@ - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106010,7 +105928,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106020,7 +105938,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106055,7 +105973,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106065,7 +105983,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106100,7 +106018,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106109,7 +106027,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106143,7 +106061,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106152,7 +106070,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106186,7 +106104,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106195,7 +106113,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106229,7 +106147,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106238,7 +106156,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106600,13 +106518,12 @@ @implementation MTRBaseClusterMediaPlayback - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -106644,7 +106561,7 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106683,7 +106600,7 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106722,7 +106639,7 @@ - (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106761,7 +106678,7 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106800,7 +106717,7 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106839,7 +106756,7 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106878,7 +106795,7 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106917,7 +106834,7 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106952,7 +106869,7 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params } request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106987,7 +106904,7 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para } request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -107022,7 +106939,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params } request.position = params.position.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -107033,7 +106950,7 @@ - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107042,7 +106959,7 @@ - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107076,7 +106993,7 @@ - (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107085,7 +107002,7 @@ - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107119,7 +107036,7 @@ - (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107128,7 +107045,7 @@ - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107164,7 +107081,7 @@ - (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClu using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107175,7 +107092,7 @@ - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -107209,7 +107126,7 @@ - (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107218,7 +107135,7 @@ - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107252,7 +107169,7 @@ - (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107261,7 +107178,7 @@ - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107295,7 +107212,7 @@ - (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107304,7 +107221,7 @@ - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107338,7 +107255,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107348,7 +107265,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107383,7 +107300,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107393,7 +107310,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107428,7 +107345,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107437,7 +107354,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107471,7 +107388,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107480,7 +107397,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107514,7 +107431,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107523,7 +107440,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107557,7 +107474,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107566,7 +107483,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108287,13 +108204,12 @@ @implementation MTRBaseClusterMediaInput - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -108328,7 +108244,7 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params co } request.index = params.index.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108368,7 +108284,7 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108408,7 +108324,7 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108445,7 +108361,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params co request.index = params.index.unsignedCharValue; request.name = [self asCharSpan:params.name]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108456,7 +108372,7 @@ - (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108465,7 +108381,7 @@ - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108499,7 +108415,7 @@ - (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108508,7 +108424,7 @@ - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108542,7 +108458,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108552,7 +108468,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108587,7 +108503,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108597,7 +108513,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108632,7 +108548,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108641,7 +108557,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108675,7 +108591,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108684,7 +108600,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108718,7 +108634,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108727,7 +108643,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108761,7 +108677,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108770,7 +108686,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109148,13 +109064,12 @@ @implementation MTRBaseClusterLowPower - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -109192,7 +109107,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params comple } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -109203,7 +109118,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109213,7 +109128,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109248,7 +109163,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109258,7 +109173,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109293,7 +109208,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109302,7 +109217,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LowPower::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109336,7 +109251,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109345,7 +109260,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109379,7 +109294,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109388,7 +109303,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109422,7 +109337,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109431,7 +109346,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109704,13 +109619,12 @@ @implementation MTRBaseClusterKeypadInput - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -109743,7 +109657,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params } request.keyCode = static_cast>(params.keyCode.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -109754,7 +109668,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109764,7 +109678,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109799,7 +109713,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109809,7 +109723,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109844,7 +109758,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109853,7 +109767,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109887,7 +109801,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109896,7 +109810,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109930,7 +109844,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109939,7 +109853,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109973,7 +109887,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109982,7 +109896,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110257,13 +110171,12 @@ @implementation MTRBaseClusterContentLauncher - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -110354,7 +110267,7 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) definedValue_0 = [self asCharSpan:params.data]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -110487,7 +110400,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -110498,7 +110411,7 @@ - (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110507,7 +110420,7 @@ - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110542,7 +110455,7 @@ - (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -110576,7 +110489,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -110589,7 +110502,7 @@ - (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribePar { using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110624,7 +110537,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110634,7 +110547,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110669,7 +110582,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110679,7 +110592,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110714,7 +110627,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110723,7 +110636,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110757,7 +110670,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110766,7 +110679,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110800,7 +110713,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110809,7 +110722,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110843,7 +110756,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110852,7 +110765,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111236,13 +111149,12 @@ @implementation MTRBaseClusterAudioOutput - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -111277,7 +111189,7 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params } request.index = params.index.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -111314,7 +111226,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params request.index = params.index.unsignedCharValue; request.name = [self asCharSpan:params.name]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -111325,7 +111237,7 @@ - (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111334,7 +111246,7 @@ - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111368,7 +111280,7 @@ - (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111377,7 +111289,7 @@ - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111411,7 +111323,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111421,7 +111333,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111456,7 +111368,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111466,7 +111378,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111501,7 +111413,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111510,7 +111422,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111544,7 +111456,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111553,7 +111465,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111587,7 +111499,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111596,7 +111508,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111630,7 +111542,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111639,7 +111551,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112000,13 +111912,12 @@ @implementation MTRBaseClusterApplicationLauncher - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -112050,7 +111961,7 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nul } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112091,7 +112002,7 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullabl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112132,7 +112043,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112143,7 +112054,7 @@ - (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112152,7 +112063,7 @@ - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112188,7 +112099,7 @@ - (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherCl using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value @@ -112235,7 +112146,7 @@ - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicat } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112249,7 +112160,7 @@ - (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -112284,7 +112195,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112294,7 +112205,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112329,7 +112240,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112339,7 +112250,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112374,7 +112285,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112383,7 +112294,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112417,7 +112328,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112426,7 +112337,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112460,7 +112371,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112469,7 +112380,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112503,7 +112414,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112512,7 +112423,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112908,13 +112819,12 @@ @implementation MTRBaseClusterApplicationBasic - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -112924,7 +112834,7 @@ - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112933,7 +112843,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112967,7 +112877,7 @@ - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112976,7 +112886,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113010,7 +112920,7 @@ - (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113019,7 +112929,7 @@ - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113054,7 +112964,7 @@ - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113063,7 +112973,7 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113099,7 +113009,7 @@ - (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClus using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113110,7 +113020,7 @@ - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -113145,7 +113055,7 @@ - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113154,7 +113064,7 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113188,7 +113098,7 @@ - (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113198,7 +113108,7 @@ - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _No { using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113233,7 +113143,7 @@ - (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113242,7 +113152,7 @@ - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113277,7 +113187,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113287,7 +113197,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113322,7 +113232,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113332,7 +113242,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113367,7 +113277,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113376,7 +113286,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113410,7 +113320,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113419,7 +113329,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113453,7 +113363,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113462,7 +113372,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113496,7 +113406,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113505,7 +113415,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114121,13 +114031,12 @@ @implementation MTRBaseClusterAccountLogin - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -114164,7 +114073,7 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params } request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114204,7 +114113,7 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:( request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; request.setupPIN = [self asCharSpan:params.setupPIN]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114246,7 +114155,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114257,7 +114166,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114267,7 +114176,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114302,7 +114211,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114312,7 +114221,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114347,7 +114256,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114356,7 +114265,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114390,7 +114299,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114399,7 +114308,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114433,7 +114342,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114442,7 +114351,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114476,7 +114385,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114485,7 +114394,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114773,13 +114682,12 @@ @implementation MTRBaseClusterElectricalMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -114818,7 +114726,7 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114857,7 +114765,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG request.startTime = params.startTime.unsignedIntValue; request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114868,7 +114776,7 @@ - (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114877,7 +114785,7 @@ - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114912,7 +114820,7 @@ - (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114921,7 +114829,7 @@ - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114955,7 +114863,7 @@ - (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114964,7 +114872,7 @@ - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114998,7 +114906,7 @@ - (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115007,7 +114915,7 @@ - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115041,7 +114949,7 @@ - (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115050,7 +114958,7 @@ - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115084,7 +114992,7 @@ - (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115093,7 +115001,7 @@ - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115127,7 +115035,7 @@ - (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115136,7 +115044,7 @@ - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115170,7 +115078,7 @@ - (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115179,7 +115087,7 @@ - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115213,7 +115121,7 @@ - (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115222,7 +115130,7 @@ - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115256,7 +115164,7 @@ - (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115265,7 +115173,7 @@ - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115299,7 +115207,7 @@ - (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115309,7 +115217,7 @@ - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115344,7 +115252,7 @@ - (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115353,7 +115261,7 @@ - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115388,7 +115296,7 @@ - (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115398,7 +115306,7 @@ - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115433,7 +115341,7 @@ - (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115442,7 +115350,7 @@ - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115477,7 +115385,7 @@ - (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115486,7 +115394,7 @@ - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115521,7 +115429,7 @@ - (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115530,7 +115438,7 @@ - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115564,7 +115472,7 @@ - (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115573,7 +115481,7 @@ - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115607,7 +115515,7 @@ - (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115616,7 +115524,7 @@ - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115650,7 +115558,7 @@ - (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115659,7 +115567,7 @@ - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115693,7 +115601,7 @@ - (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115702,7 +115610,7 @@ - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115736,7 +115644,7 @@ - (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115745,7 +115653,7 @@ - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115780,7 +115688,7 @@ - (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115790,7 +115698,7 @@ - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115825,7 +115733,7 @@ - (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115835,7 +115743,7 @@ - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115871,7 +115779,7 @@ - (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115881,7 +115789,7 @@ - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115917,7 +115825,7 @@ - (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115927,7 +115835,7 @@ - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115963,7 +115871,7 @@ - (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115973,7 +115881,7 @@ - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116009,7 +115917,7 @@ - (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116019,7 +115927,7 @@ - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116055,7 +115963,7 @@ - (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116065,7 +115973,7 @@ - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116101,7 +116009,7 @@ - (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116111,7 +116019,7 @@ - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116147,7 +116055,7 @@ - (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116158,7 +116066,7 @@ - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116195,7 +116103,7 @@ - (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116206,7 +116114,7 @@ - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116243,7 +116151,7 @@ - (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116254,7 +116162,7 @@ - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116291,7 +116199,7 @@ - (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116302,7 +116210,7 @@ - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116339,7 +116247,7 @@ - (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116350,7 +116258,7 @@ - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116387,7 +116295,7 @@ - (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116398,7 +116306,7 @@ - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscri { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116434,7 +116342,7 @@ - (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116444,7 +116352,7 @@ - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116479,7 +116387,7 @@ - (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116489,7 +116397,7 @@ - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116524,7 +116432,7 @@ - (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116533,7 +116441,7 @@ - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116568,7 +116476,7 @@ - (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116577,7 +116485,7 @@ - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116612,7 +116520,7 @@ - (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116622,7 +116530,7 @@ - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParam { using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116658,7 +116566,7 @@ - (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116669,7 +116577,7 @@ - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribe { using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116704,7 +116612,7 @@ - (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116714,7 +116622,7 @@ - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116750,7 +116658,7 @@ - (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116760,7 +116668,7 @@ - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116796,7 +116704,7 @@ - (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116806,7 +116714,7 @@ - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116842,7 +116750,7 @@ - (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116853,7 +116761,7 @@ - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribePa { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116888,7 +116796,7 @@ - (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116898,7 +116806,7 @@ - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116933,7 +116841,7 @@ - (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116942,7 +116850,7 @@ - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116976,7 +116884,7 @@ - (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116985,7 +116893,7 @@ - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117019,7 +116927,7 @@ - (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117028,7 +116936,7 @@ - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117062,7 +116970,7 @@ - (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117071,7 +116979,7 @@ - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117105,7 +117013,7 @@ - (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117114,7 +117022,7 @@ - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117148,7 +117056,7 @@ - (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117157,7 +117065,7 @@ - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117191,7 +117099,7 @@ - (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117200,7 +117108,7 @@ - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117234,7 +117142,7 @@ - (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117243,7 +117151,7 @@ - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117277,7 +117185,7 @@ - (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117286,7 +117194,7 @@ - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117320,7 +117228,7 @@ - (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117329,7 +117237,7 @@ - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117363,7 +117271,7 @@ - (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117372,7 +117280,7 @@ - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117406,7 +117314,7 @@ - (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117415,7 +117323,7 @@ - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117450,7 +117358,7 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value @@ -117485,7 +117393,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _N TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117499,7 +117407,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117536,7 +117444,7 @@ - (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117570,7 +117478,7 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnul TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117584,7 +117492,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeP { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117620,7 +117528,7 @@ - (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117654,7 +117562,7 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117667,7 +117575,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117703,7 +117611,7 @@ - (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117737,7 +117645,7 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117751,7 +117659,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribePa { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117786,7 +117694,7 @@ - (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117820,7 +117728,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117833,7 +117741,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117868,7 +117776,7 @@ - (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117902,7 +117810,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117915,7 +117823,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117950,7 +117858,7 @@ - (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117960,7 +117868,7 @@ - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117995,7 +117903,7 @@ - (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118004,7 +117912,7 @@ - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118039,7 +117947,7 @@ - (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118049,7 +117957,7 @@ - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118084,7 +117992,7 @@ - (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118093,7 +118001,7 @@ - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118128,7 +118036,7 @@ - (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118137,7 +118045,7 @@ - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118172,7 +118080,7 @@ - (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118181,7 +118089,7 @@ - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118215,7 +118123,7 @@ - (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -118249,7 +118157,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -118262,7 +118170,7 @@ - (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118297,7 +118205,7 @@ - (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118306,7 +118214,7 @@ - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118341,7 +118249,7 @@ - (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118350,7 +118258,7 @@ - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118385,7 +118293,7 @@ - (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -118419,7 +118327,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -118432,7 +118340,7 @@ - (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118467,7 +118375,7 @@ - (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118476,7 +118384,7 @@ - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118511,7 +118419,7 @@ - (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118520,7 +118428,7 @@ - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118555,7 +118463,7 @@ - (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118565,7 +118473,7 @@ - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118601,7 +118509,7 @@ - (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118611,7 +118519,7 @@ - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams { using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118646,7 +118554,7 @@ - (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118656,7 +118564,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118692,7 +118600,7 @@ - (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118702,7 +118610,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118737,7 +118645,7 @@ - (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118747,7 +118655,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118783,7 +118691,7 @@ - (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118793,7 +118701,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118828,7 +118736,7 @@ - (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118837,7 +118745,7 @@ - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118871,7 +118779,7 @@ - (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118880,7 +118788,7 @@ - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118915,7 +118823,7 @@ - (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118924,7 +118832,7 @@ - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118959,7 +118867,7 @@ - (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118969,7 +118877,7 @@ - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119004,7 +118912,7 @@ - (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119014,7 +118922,7 @@ - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119049,7 +118957,7 @@ - (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119058,7 +118966,7 @@ - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119093,7 +119001,7 @@ - (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119103,7 +119011,7 @@ - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119138,7 +119046,7 @@ - (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119148,7 +119056,7 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119183,7 +119091,7 @@ - (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119192,7 +119100,7 @@ - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119227,7 +119135,7 @@ - (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119237,7 +119145,7 @@ - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119272,7 +119180,7 @@ - (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119282,7 +119190,7 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119317,7 +119225,7 @@ - (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119326,7 +119234,7 @@ - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119361,7 +119269,7 @@ - (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119371,7 +119279,7 @@ - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119406,7 +119314,7 @@ - (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119416,7 +119324,7 @@ - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119451,7 +119359,7 @@ - (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119461,7 +119369,7 @@ - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119496,7 +119404,7 @@ - (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119506,7 +119414,7 @@ - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119541,7 +119449,7 @@ - (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119550,7 +119458,7 @@ - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119586,7 +119494,7 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119597,7 +119505,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MT { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119634,7 +119542,7 @@ - (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119645,7 +119553,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119682,7 +119590,7 @@ - (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^) MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119693,7 +119601,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubs { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119730,7 +119638,7 @@ - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119741,7 +119649,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscr { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119778,7 +119686,7 @@ - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119789,7 +119697,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119826,7 +119734,7 @@ - (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119836,7 +119744,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParam { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119872,7 +119780,7 @@ - (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119882,7 +119790,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119917,7 +119825,7 @@ - (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119926,7 +119834,7 @@ - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119961,7 +119869,7 @@ - (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119971,7 +119879,7 @@ - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120006,7 +119914,7 @@ - (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120016,7 +119924,7 @@ - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120051,7 +119959,7 @@ - (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120060,7 +119968,7 @@ - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120095,7 +120003,7 @@ - (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120105,7 +120013,7 @@ - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120140,7 +120048,7 @@ - (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120150,7 +120058,7 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120185,7 +120093,7 @@ - (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120194,7 +120102,7 @@ - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120229,7 +120137,7 @@ - (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120239,7 +120147,7 @@ - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120274,7 +120182,7 @@ - (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120284,7 +120192,7 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120319,7 +120227,7 @@ - (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120328,7 +120236,7 @@ - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120363,7 +120271,7 @@ - (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120373,7 +120281,7 @@ - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120408,7 +120316,7 @@ - (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120418,7 +120326,7 @@ - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120453,7 +120361,7 @@ - (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120463,7 +120371,7 @@ - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120498,7 +120406,7 @@ - (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120508,7 +120416,7 @@ - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120543,7 +120451,7 @@ - (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120552,7 +120460,7 @@ - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120588,7 +120496,7 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120599,7 +120507,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MT { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120636,7 +120544,7 @@ - (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120647,7 +120555,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120684,7 +120592,7 @@ - (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^) MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120695,7 +120603,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubs { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120732,7 +120640,7 @@ - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120743,7 +120651,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscr { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120780,7 +120688,7 @@ - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120791,7 +120699,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120828,7 +120736,7 @@ - (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120838,7 +120746,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParam { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120874,7 +120782,7 @@ - (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120884,7 +120792,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120920,7 +120828,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120930,7 +120838,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120966,7 +120874,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120976,7 +120884,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121011,7 +120919,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121020,7 +120928,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121054,7 +120962,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121063,7 +120971,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121097,7 +121005,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121106,7 +121014,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121140,7 +121048,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121149,7 +121057,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -127240,13 +127148,12 @@ @implementation MTRBaseClusterUnitTesting - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -127284,7 +127191,7 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params compl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127324,7 +127231,7 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127363,7 +127270,7 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127403,7 +127310,7 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127439,7 +127346,7 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams request.arg1 = params.arg1.unsignedCharValue; request.arg2 = params.arg2.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127474,7 +127381,7 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu } request.arg1 = params.arg1.boolValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127719,7 +127626,7 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc request.arg5 = static_cast>(params.arg5.unsignedCharValue); request.arg6 = params.arg6.boolValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127760,7 +127667,7 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu request.arg1.g = params.arg1.g.floatValue; request.arg1.h = params.arg1.h.doubleValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127803,7 +127710,7 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest request.arg1.c.g = params.arg1.c.g.floatValue; request.arg1.c.h = params.arg1.c.h.doubleValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127867,7 +127774,7 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127922,7 +127829,7 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128062,7 +127969,7 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128228,7 +128135,7 @@ - (void)testListNestedStructListArgumentRequestWithParams: } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128284,7 +128191,7 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128319,7 +128226,7 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams request.arg1 = static_cast>(params.arg1.unsignedShortValue); request.arg2 = static_cast>(params.arg2.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128364,7 +128271,7 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128569,7 +128476,7 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128611,7 +128518,7 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho request.arg1.g = params.arg1.g.floatValue; request.arg1.h = params.arg1.h.doubleValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128654,7 +128561,7 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128696,7 +128603,7 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128733,7 +128640,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve request.arg2 = static_cast>(params.arg2.unsignedCharValue); request.arg3 = params.arg3.boolValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128771,7 +128678,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve } request.arg1 = params.arg1.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128782,7 +128689,7 @@ - (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -128816,7 +128723,7 @@ - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128828,7 +128735,7 @@ - (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -128862,7 +128769,7 @@ - (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -128896,7 +128803,7 @@ - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128908,7 +128815,7 @@ - (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -128942,7 +128849,7 @@ - (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -128976,7 +128883,7 @@ - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedShortValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128988,7 +128895,7 @@ - (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129022,7 +128929,7 @@ - (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129056,7 +128963,7 @@ - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedIntValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129068,7 +128975,7 @@ - (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129102,7 +129009,7 @@ - (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129136,7 +129043,7 @@ - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedLongLongValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129148,7 +129055,7 @@ - (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129182,7 +129089,7 @@ - (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129216,7 +129123,7 @@ - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129228,7 +129135,7 @@ - (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129262,7 +129169,7 @@ - (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129296,7 +129203,7 @@ - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129308,7 +129215,7 @@ - (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129342,7 +129249,7 @@ - (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129376,7 +129283,7 @@ - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129388,7 +129295,7 @@ - (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129422,7 +129329,7 @@ - (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129456,7 +129363,7 @@ - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129468,7 +129375,7 @@ - (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129502,7 +129409,7 @@ - (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129536,7 +129443,7 @@ - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129548,7 +129455,7 @@ - (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129582,7 +129489,7 @@ - (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129616,7 +129523,7 @@ - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129628,7 +129535,7 @@ - (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129662,7 +129569,7 @@ - (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129696,7 +129603,7 @@ - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129708,7 +129615,7 @@ - (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129742,7 +129649,7 @@ - (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129776,7 +129683,7 @@ - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129788,7 +129695,7 @@ - (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129822,7 +129729,7 @@ - (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129856,7 +129763,7 @@ - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129868,7 +129775,7 @@ - (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129902,7 +129809,7 @@ - (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129936,7 +129843,7 @@ - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129948,7 +129855,7 @@ - (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129982,7 +129889,7 @@ - (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130016,7 +129923,7 @@ - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.intValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130028,7 +129935,7 @@ - (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130062,7 +129969,7 @@ - (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130096,7 +130003,7 @@ - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.intValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130108,7 +130015,7 @@ - (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130142,7 +130049,7 @@ - (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130176,7 +130083,7 @@ - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130188,7 +130095,7 @@ - (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130222,7 +130129,7 @@ - (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130256,7 +130163,7 @@ - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130268,7 +130175,7 @@ - (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130302,7 +130209,7 @@ - (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130336,7 +130243,7 @@ - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130348,7 +130255,7 @@ - (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130382,7 +130289,7 @@ - (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130416,7 +130323,7 @@ - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130428,7 +130335,7 @@ - (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130462,7 +130369,7 @@ - (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130496,7 +130403,7 @@ - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130508,7 +130415,7 @@ - (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130542,7 +130449,7 @@ - (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130576,7 +130483,7 @@ - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130588,7 +130495,7 @@ - (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130622,7 +130529,7 @@ - (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130656,7 +130563,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.floatValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130668,7 +130575,7 @@ - (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130702,7 +130609,7 @@ - (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130736,7 +130643,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.doubleValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130748,7 +130655,7 @@ - (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130782,7 +130689,7 @@ - (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130816,7 +130723,7 @@ - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asByteSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130828,7 +130735,7 @@ - (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130862,7 +130769,7 @@ - (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130917,7 +130824,7 @@ - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130929,7 +130836,7 @@ - (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130963,7 +130870,7 @@ - (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131018,7 +130925,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131030,7 +130937,7 @@ - (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131064,7 +130971,7 @@ - (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131120,7 +131027,7 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131133,7 +131040,7 @@ - (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams * { using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131168,7 +131075,7 @@ - (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131202,7 +131109,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asByteSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131214,7 +131121,7 @@ - (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131248,7 +131155,7 @@ - (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131282,7 +131189,7 @@ - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131294,7 +131201,7 @@ - (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131328,7 +131235,7 @@ - (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131362,7 +131269,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131374,7 +131281,7 @@ - (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131408,7 +131315,7 @@ - (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131442,7 +131349,7 @@ - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131454,7 +131361,7 @@ - (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131488,7 +131395,7 @@ - (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131522,7 +131429,7 @@ - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131534,7 +131441,7 @@ - (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131568,7 +131475,7 @@ - (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131602,7 +131509,7 @@ - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedShortValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131614,7 +131521,7 @@ - (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131650,7 +131557,7 @@ - (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSA using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131877,7 +131784,7 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnu } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131891,7 +131798,7 @@ - (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscrib { using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131927,7 +131834,7 @@ - (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131961,7 +131868,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131973,7 +131880,7 @@ - (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132009,7 +131916,7 @@ - (void)readAttributeStructAttrWithCompletion:(void (^)(MTRUnitTestingClusterSim using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value @@ -132051,7 +131958,7 @@ - (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _ cppValue.g = value.g.floatValue; cppValue.h = value.h.doubleValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132064,7 +131971,7 @@ - (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132099,7 +132006,7 @@ - (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132133,7 +132040,7 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132146,7 +132053,7 @@ - (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132181,7 +132088,7 @@ - (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132215,7 +132122,7 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132228,7 +132135,7 @@ - (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132263,7 +132170,7 @@ - (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132297,7 +132204,7 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132310,7 +132217,7 @@ - (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams * { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132345,7 +132252,7 @@ - (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132379,7 +132286,7 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132392,7 +132299,7 @@ - (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams * { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132427,7 +132334,7 @@ - (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132482,7 +132389,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132495,7 +132402,7 @@ - (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132531,7 +132438,7 @@ - (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)param params = [params copy]; using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132642,7 +132549,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132654,7 +132561,7 @@ - (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132689,7 +132596,7 @@ - (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132723,7 +132630,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132735,7 +132642,7 @@ - (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams * _Non { using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132770,7 +132677,7 @@ - (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132804,7 +132711,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132817,7 +132724,7 @@ - (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132852,7 +132759,7 @@ - (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132886,7 +132793,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132899,7 +132806,7 @@ - (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132934,7 +132841,7 @@ - (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132968,7 +132875,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132980,7 +132887,7 @@ - (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133014,7 +132921,7 @@ - (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133053,7 +132960,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.boolValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133065,7 +132972,7 @@ - (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133100,7 +133007,7 @@ - (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133139,7 +133046,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133151,7 +133058,7 @@ - (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133186,7 +133093,7 @@ - (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133225,7 +133132,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedShortValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133237,7 +133144,7 @@ - (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133272,7 +133179,7 @@ - (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133311,7 +133218,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedIntValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133323,7 +133230,7 @@ - (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133358,7 +133265,7 @@ - (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133397,7 +133304,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedLongLongValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133409,7 +133316,7 @@ - (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133444,7 +133351,7 @@ - (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133483,7 +133390,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133495,7 +133402,7 @@ - (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133529,7 +133436,7 @@ - (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133568,7 +133475,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133580,7 +133487,7 @@ - (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133614,7 +133521,7 @@ - (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133653,7 +133560,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133665,7 +133572,7 @@ - (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133699,7 +133606,7 @@ - (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133738,7 +133645,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133750,7 +133657,7 @@ - (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133784,7 +133691,7 @@ - (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133823,7 +133730,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133835,7 +133742,7 @@ - (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133869,7 +133776,7 @@ - (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133908,7 +133815,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133920,7 +133827,7 @@ - (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133954,7 +133861,7 @@ - (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133993,7 +133900,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134005,7 +133912,7 @@ - (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134039,7 +133946,7 @@ - (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134078,7 +133985,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134090,7 +133997,7 @@ - (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134124,7 +134031,7 @@ - (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134163,7 +134070,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.charValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134175,7 +134082,7 @@ - (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134209,7 +134116,7 @@ - (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134248,7 +134155,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.shortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134260,7 +134167,7 @@ - (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134294,7 +134201,7 @@ - (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134333,7 +134240,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.intValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134345,7 +134252,7 @@ - (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134379,7 +134286,7 @@ - (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134418,7 +134325,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.intValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134430,7 +134337,7 @@ - (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134464,7 +134371,7 @@ - (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134503,7 +134410,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134515,7 +134422,7 @@ - (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134549,7 +134456,7 @@ - (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134588,7 +134495,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134600,7 +134507,7 @@ - (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134634,7 +134541,7 @@ - (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134673,7 +134580,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134685,7 +134592,7 @@ - (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134719,7 +134626,7 @@ - (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134758,7 +134665,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134770,7 +134677,7 @@ - (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134804,7 +134711,7 @@ - (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134843,7 +134750,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134855,7 +134762,7 @@ - (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134889,7 +134796,7 @@ - (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134928,7 +134835,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134940,7 +134847,7 @@ - (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134974,7 +134881,7 @@ - (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135013,7 +134920,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.floatValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135026,7 +134933,7 @@ - (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135061,7 +134968,7 @@ - (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135100,7 +135007,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.doubleValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135113,7 +135020,7 @@ - (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135148,7 +135055,7 @@ - (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135187,7 +135094,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value nonNullValue_0 = [self asByteSpan:value]; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135199,7 +135106,7 @@ - (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135234,7 +135141,7 @@ - (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135273,7 +135180,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value nonNullValue_0 = [self asCharSpan:value]; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135286,7 +135193,7 @@ - (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams * _No { using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135321,7 +135228,7 @@ - (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135360,7 +135267,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135372,7 +135279,7 @@ - (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135409,7 +135316,7 @@ - (void)readAttributeNullableStructWithCompletion:(void (^)(MTRUnitTestingCluste using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value @@ -135458,7 +135365,7 @@ - (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct nonNullValue_0.h = value.h.doubleValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135471,7 +135378,7 @@ - (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135507,7 +135414,7 @@ - (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135546,7 +135453,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullabl nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135560,7 +135467,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribePa { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135596,7 +135503,7 @@ - (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135635,7 +135542,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullabl nonNullValue_0 = value.charValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135649,7 +135556,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribePa { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135685,7 +135592,7 @@ - (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135724,7 +135631,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullab nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135738,7 +135645,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeP { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135774,7 +135681,7 @@ - (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135813,7 +135720,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullab nonNullValue_0 = value.shortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135827,7 +135734,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeP { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135862,7 +135769,7 @@ - (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -135896,7 +135803,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135908,7 +135815,7 @@ - (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135942,7 +135849,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -135952,7 +135859,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135987,7 +135894,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -135997,7 +135904,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136032,7 +135939,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136041,7 +135948,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136075,7 +135982,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136084,7 +135991,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136118,7 +136025,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136127,7 +136034,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitTesting::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136161,7 +136068,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136170,7 +136077,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h index 397bbfb5a97891..9d33718463d50f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h @@ -22,465 +22,372 @@ @interface MTRBaseClusterIdentify () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGroups () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterScenes () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOnOff () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOnOffSwitchConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLevelControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBinaryInputBasic () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPulseWidthModulation () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDescriptor () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBinding () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAccessControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterActions () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBasicInformation () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOTASoftwareUpdateProvider () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOTASoftwareUpdateRequestor () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLocalizationConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTimeFormatLocalization () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterUnitLocalization () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPowerSourceConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPowerSource () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGeneralCommissioning () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterNetworkCommissioning () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDiagnosticLogs () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGeneralDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterSoftwareDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterThreadNetworkDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterWiFiNetworkDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterEthernetNetworkDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTimeSynchronization () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBridgedDeviceBasicInformation () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterSwitch () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAdministratorCommissioning () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOperationalCredentials () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGroupKeyManagement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFixedLabel () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterUserLabel () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBooleanState () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterICDManagement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterModeSelect () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLaundryWasherMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLaundryWasherControls () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRVCRunMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRVCCleanMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTemperatureControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRefrigeratorAlarm () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDishwasherMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAirQuality () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterSmokeCOAlarm () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDishwasherAlarm () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOperationalState () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRVCOperationalState () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterHEPAFilterMonitoring () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterActivatedCarbonFilterMonitoring () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDoorLock () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterWindowCovering () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBarrierControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPumpConfigurationAndControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterThermostat () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFanControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterThermostatUserInterfaceConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterColorControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBallastConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterIlluminanceMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTemperatureMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPressureMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFlowMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRelativeHumidityMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOccupancySensing () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterCarbonMonoxideConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterCarbonDioxideConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterNitrogenDioxideConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOzoneConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPM25ConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFormaldehydeConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPM1ConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPM10ConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRadonConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterWakeOnLAN () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterChannel () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTargetNavigator () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterMediaPlayback () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterMediaInput () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLowPower () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterKeypadInput () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterContentLauncher () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAudioOutput () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterApplicationLauncher () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterApplicationBasic () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAccountLogin () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterElectricalMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterUnitTesting () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index c6806421244642..7c1c7daec4dc44 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -19617,6 +19617,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19629,6 +19630,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19641,6 +19643,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19653,6 +19656,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19665,6 +19669,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19677,6 +19682,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19689,6 +19695,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19701,6 +19708,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19713,6 +19721,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19725,6 +19734,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19737,6 +19747,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19749,6 +19760,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19761,6 +19773,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19773,6 +19786,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19785,6 +19799,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19797,6 +19812,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19809,6 +19825,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19821,6 +19838,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19833,6 +19851,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19845,6 +19864,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19857,6 +19877,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19869,6 +19890,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19881,6 +19903,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19893,6 +19916,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19905,6 +19929,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19917,6 +19942,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19929,6 +19955,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19941,6 +19968,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19953,6 +19981,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19965,6 +19994,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19977,6 +20007,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19990,6 +20021,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20002,6 +20034,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20014,6 +20047,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20026,6 +20060,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20038,6 +20073,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20050,6 +20086,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20062,6 +20099,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20074,6 +20112,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20086,6 +20125,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20098,6 +20138,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20110,6 +20151,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20122,6 +20164,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20134,6 +20177,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20146,6 +20190,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20158,6 +20203,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20170,6 +20216,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20182,6 +20229,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20194,6 +20242,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20206,6 +20255,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20218,6 +20268,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20230,6 +20281,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20242,6 +20294,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20254,6 +20307,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20266,6 +20320,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20278,6 +20333,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20290,6 +20346,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20302,6 +20359,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20314,6 +20372,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20326,6 +20385,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20338,6 +20398,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20350,6 +20411,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20362,6 +20424,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index f433d153adcafb..54316e5bba43da 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -16,6 +16,7 @@ */ #import +#import #import "MTRAsyncCallbackWorkQueue.h" #import "MTRBaseClusterUtils.h" @@ -65,12 +66,11 @@ @implementation MTRClusterIdentify - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -82,53 +82,25 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeIdentifyID, (unsigned int) MTRCommandIDTypeClusterIdentifyCommandIdentifyID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Identify::Commands::Identify::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.identifyTime = params.identifyTime.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster identifyWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -150,56 +122,25 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeIdentifyID, (unsigned int) MTRCommandIDTypeClusterIdentifyCommandTriggerEffectID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Identify::Commands::TriggerEffect::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.effectIdentifier = static_cast>( - params.effectIdentifier.unsignedCharValue); - request.effectVariant - = static_cast>(params.effectVariant.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -217,7 +158,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params - (NSDictionary *)readAttributeIdentifyTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) params:params]; @@ -234,7 +175,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) value:dataValueDictionary @@ -244,7 +185,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeIdentifyTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTypeID) params:params]; @@ -252,7 +193,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeGeneratedCommandListID) params:params]; @@ -260,7 +201,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID) params:params]; @@ -268,7 +209,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeEventListID) params:params]; @@ -276,7 +217,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID) params:params]; @@ -284,7 +225,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeFeatureMapID) params:params]; @@ -292,7 +233,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeClusterRevisionID) params:params]; @@ -333,12 +274,11 @@ @implementation MTRClusterGroups - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -350,54 +290,25 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandAddGroupID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterAddGroupResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsClusterAddGroupResponseCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::AddGroup::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.groupName = [self asCharSpan:params.groupName]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -420,53 +331,25 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandViewGroupID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterViewGroupResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsClusterViewGroupResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::ViewGroup::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -489,75 +372,26 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandGetGroupMembershipID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsClusterGetGroupMembershipResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::GetGroupMembership::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.groupList.count != 0) { - auto * listHolder_0 = new ListHolder(params.groupList.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.groupList.count; ++i_0) { - if (![params.groupList[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.groupList[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; - } - request.groupList = ListType_0(listHolder_0->mList, params.groupList.count); - } else { - request.groupList = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getGroupMembershipWithParams:params + completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -580,54 +414,25 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandRemoveGroupID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterRemoveGroupResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsClusterRemoveGroupResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::RemoveGroup::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeGroupWithParams:params + completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -658,52 +463,25 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandRemoveAllGroupsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::RemoveAllGroups::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeAllGroupsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -725,54 +503,25 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupsID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandAddGroupIfIdentifyingID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::AddGroupIfIdentifying::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.groupName = [self asCharSpan:params.groupName]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addGroupIfIdentifyingWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -790,7 +539,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeNameSupportID) params:params]; @@ -798,7 +547,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeGeneratedCommandListID) params:params]; @@ -806,7 +555,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID) params:params]; @@ -814,7 +563,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeEventListID) params:params]; @@ -822,7 +571,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAttributeListID) params:params]; @@ -830,7 +579,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID) params:params]; @@ -838,7 +587,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeClusterRevisionID) params:params]; @@ -945,12 +694,11 @@ @implementation MTRClusterScenes - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -962,103 +710,25 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandAddSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterAddSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterAddSceneResponseCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::AddScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.sceneName = [self asCharSpan:params.sceneName]; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.extensionFieldSets.count != 0) { - auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.extensionFieldSets.count; ++i_0) { - if (![params.extensionFieldSets[i_0] isKindOfClass:[MTRScenesClusterExtensionFieldSet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRScenesClusterExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterID = element_0.clusterID.unsignedIntValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].attributeValueList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.attributeValueList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.attributeValueList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.attributeValueList.count; ++i_2) { - if (![element_0.attributeValueList[i_2] - isKindOfClass:[MTRScenesClusterAttributeValuePair class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - listHolder_2->mList[i_2].attributeID = element_2.attributeID.unsignedIntValue; - listHolder_2->mList[i_2].attributeValue = element_2.attributeValue.unsignedIntValue; - } - listHolder_0->mList[i_0].attributeValueList - = ListType_2(listHolder_2->mList, element_0.attributeValueList.count); - } else { - listHolder_0->mList[i_0].attributeValueList = ListType_2(); - } - } - } - request.extensionFieldSets = ListType_0(listHolder_0->mList, params.extensionFieldSets.count); - } else { - request.extensionFieldSets = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addSceneWithParams:params + completion:^(MTRScenesClusterAddSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1081,54 +751,25 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandViewSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterViewSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterViewSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::ViewScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster viewSceneWithParams:params + completion:^(MTRScenesClusterViewSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1151,55 +792,25 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRemoveSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterRemoveSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterRemoveSceneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::RemoveScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeSceneWithParams:params + completion:^(MTRScenesClusterRemoveSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1222,54 +833,26 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRemoveAllScenesID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterRemoveAllScenesResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterRemoveAllScenesResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::RemoveAllScenes::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeAllScenesWithParams:params + completion:^( + MTRScenesClusterRemoveAllScenesResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1292,54 +875,25 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandStoreSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterStoreSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterStoreSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::StoreScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster storeSceneWithParams:params + completion:^(MTRScenesClusterStoreSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1361,63 +915,25 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRecallSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::RecallScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - if (params.transitionTime != nil) { - auto & definedValue_0 = request.transitionTime.Emplace(); - if (params.transitionTime == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = params.transitionTime.unsignedShortValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster recallSceneWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1440,54 +956,26 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandGetSceneMembershipID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterGetSceneMembershipResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterGetSceneMembershipResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::GetSceneMembership::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getSceneMembershipWithParams:params + completion:^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1510,104 +998,26 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandEnhancedAddSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterEnhancedAddSceneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::EnhancedAddScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.sceneName = [self asCharSpan:params.sceneName]; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.extensionFieldSets.count != 0) { - auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.extensionFieldSets.count; ++i_0) { - if (![params.extensionFieldSets[i_0] isKindOfClass:[MTRScenesClusterExtensionFieldSet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRScenesClusterExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterID = element_0.clusterID.unsignedIntValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].attributeValueList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.attributeValueList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.attributeValueList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.attributeValueList.count; ++i_2) { - if (![element_0.attributeValueList[i_2] - isKindOfClass:[MTRScenesClusterAttributeValuePair class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - listHolder_2->mList[i_2].attributeID = element_2.attributeID.unsignedIntValue; - listHolder_2->mList[i_2].attributeValue = element_2.attributeValue.unsignedIntValue; - } - listHolder_0->mList[i_0].attributeValueList - = ListType_2(listHolder_2->mList, element_0.attributeValueList.count); - } else { - listHolder_0->mList[i_0].attributeValueList = ListType_2(); - } - } - } - request.extensionFieldSets = ListType_0(listHolder_0->mList, params.extensionFieldSets.count); - } else { - request.extensionFieldSets = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedAddSceneWithParams:params + completion:^( + MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1630,55 +1040,26 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandEnhancedViewSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterEnhancedViewSceneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::EnhancedViewScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedViewSceneWithParams:params + completion:^(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1701,57 +1082,25 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandCopySceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterCopySceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterCopySceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::CopyScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mode = static_cast>(params.mode.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); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster copySceneWithParams:params + completion:^(MTRScenesClusterCopySceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1769,7 +1118,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneCountID) params:params]; @@ -1777,7 +1126,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeCurrentSceneWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentSceneID) params:params]; @@ -1785,7 +1134,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeCurrentGroupWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentGroupID) params:params]; @@ -1793,7 +1142,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeSceneValidWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneValidID) params:params]; @@ -1801,7 +1150,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeNameSupportID) params:params]; @@ -1809,7 +1158,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID) params:params]; @@ -1817,7 +1166,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID) params:params]; @@ -1825,7 +1174,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeRemainingCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeRemainingCapacityID) params:params]; @@ -1833,7 +1182,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID) params:params]; @@ -1841,7 +1190,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID) params:params]; @@ -1849,7 +1198,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeEventListID) params:params]; @@ -1857,7 +1206,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAttributeListID) params:params]; @@ -1865,7 +1214,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeFeatureMapID) params:params]; @@ -1873,7 +1222,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeClusterRevisionID) params:params]; @@ -2032,12 +1381,11 @@ @implementation MTRClusterOnOff - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -2055,52 +1403,25 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::Off::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster offWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2128,52 +1449,25 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::On::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster onWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2201,52 +1495,25 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandToggleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::Toggle::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster toggleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2268,55 +1535,25 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOffWithEffectID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::OffWithEffect::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.effectIdentifier = static_cast>( - params.effectIdentifier.unsignedCharValue); - request.effectVariant = params.effectVariant.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster offWithEffectWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2347,52 +1584,25 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOnOffID, + self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnWithRecallGlobalSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::OnWithRecallGlobalScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster onWithRecallGlobalSceneWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2414,56 +1624,25 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnWithTimedOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::OnWithTimedOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.onOffControl - = static_cast>(params.onOffControl.unsignedCharValue); - request.onTime = params.onTime.unsignedShortValue; - request.offWaitTime = params.offWaitTime.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster onWithTimedOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2481,7 +1660,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params - (NSDictionary *)readAttributeOnOffWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnOffID) params:params]; @@ -2489,7 +1668,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params - (NSDictionary *)readAttributeGlobalSceneControlWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGlobalSceneControlID) params:params]; @@ -2497,7 +1676,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params - (NSDictionary *)readAttributeOnTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) params:params]; @@ -2514,7 +1693,7 @@ - (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) value:dataValueDictionary @@ -2524,7 +1703,7 @@ - (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeOffWaitTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) params:params]; @@ -2541,7 +1720,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) value:dataValueDictionary @@ -2551,7 +1730,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeStartUpOnOffWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) params:params]; @@ -2568,7 +1747,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) value:dataValueDictionary @@ -2578,7 +1757,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGeneratedCommandListID) params:params]; @@ -2586,7 +1765,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID) params:params]; @@ -2594,7 +1773,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeEventListID) params:params]; @@ -2602,7 +1781,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAttributeListID) params:params]; @@ -2610,7 +1789,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID) params:params]; @@ -2618,7 +1797,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID) params:params]; @@ -2735,12 +1914,11 @@ @implementation MTRClusterOnOffSwitchConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -2748,7 +1926,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID) params:params]; @@ -2756,7 +1934,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) params:params]; @@ -2773,7 +1951,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) value:dataValueDictionary @@ -2784,7 +1962,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) params:params]; @@ -2793,7 +1971,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) params:params]; @@ -2801,7 +1979,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID) params:params]; @@ -2809,7 +1987,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID) params:params]; @@ -2817,7 +1995,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID) params:params]; @@ -2825,7 +2003,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID) params:params]; @@ -2846,12 +2024,11 @@ @implementation MTRClusterLevelControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -2863,63 +2040,25 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToLevelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveToLevel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.level = params.level.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2941,64 +2080,25 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::Move::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - if (params.rate == nil) { - request.rate.SetNull(); - } else { - auto & nonNullValue_0 = request.rate.SetNonNull(); - nonNullValue_0 = params.rate.unsignedCharValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3020,65 +2120,25 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::Step::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3100,56 +2160,25 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3171,63 +2200,25 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToLevelWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveToLevelWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.level = params.level.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToLevelWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3249,64 +2240,25 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - if (params.rate == nil) { - request.rate.SetNull(); - } else { - auto & nonNullValue_0 = request.rate.SetNonNull(); - nonNullValue_0 = params.rate.unsignedCharValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3328,65 +2280,25 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStepWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::StepWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3408,56 +2320,25 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStopWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::StopWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3479,53 +2360,25 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToClosestFrequencyID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveToClosestFrequency::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.frequency = params.frequency.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToClosestFrequencyWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3543,7 +2396,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentLevelID) params:params]; @@ -3551,7 +2404,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeRemainingTimeID) params:params]; @@ -3559,7 +2412,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinLevelID) params:params]; @@ -3567,7 +2420,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxLevelID) params:params]; @@ -3575,7 +2428,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeCurrentFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentFrequencyID) params:params]; @@ -3583,7 +2436,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMinFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinFrequencyID) params:params]; @@ -3591,7 +2444,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMaxFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxFrequencyID) params:params]; @@ -3599,7 +2452,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) params:params]; @@ -3616,7 +2469,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) value:dataValueDictionary @@ -3626,7 +2479,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeOnOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) params:params]; @@ -3643,7 +2496,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) value:dataValueDictionary @@ -3653,7 +2506,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary - (NSDictionary *)readAttributeOnLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) params:params]; @@ -3670,7 +2523,7 @@ - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) value:dataValueDictionary @@ -3680,7 +2533,7 @@ - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeOnTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) params:params]; @@ -3697,7 +2550,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) value:dataValueDictionary @@ -3707,7 +2560,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSDictionary *) - (NSDictionary *)readAttributeOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) params:params]; @@ -3724,7 +2577,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) value:dataValueDictionary @@ -3734,7 +2587,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSDictionary * - (NSDictionary *)readAttributeDefaultMoveRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) params:params]; @@ -3751,7 +2604,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) value:dataValueDictionary @@ -3761,7 +2614,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeStartUpCurrentLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) params:params]; @@ -3778,7 +2631,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) value:dataValueDictionary @@ -3788,7 +2641,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeGeneratedCommandListID) params:params]; @@ -3796,7 +2649,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID) params:params]; @@ -3804,7 +2657,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeEventListID) params:params]; @@ -3812,7 +2665,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID) params:params]; @@ -3820,7 +2673,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID) params:params]; @@ -3828,7 +2681,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeClusterRevisionID) params:params]; @@ -3939,12 +2792,11 @@ @implementation MTRClusterBinaryInputBasic - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -3952,7 +2804,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) params:params]; @@ -3969,7 +2821,7 @@ - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) value:dataValueDictionary @@ -3979,7 +2831,7 @@ - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) params:params]; @@ -3996,7 +2848,7 @@ - (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) value:dataValueDictionary @@ -4006,7 +2858,7 @@ - (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeInactiveTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) params:params]; @@ -4023,7 +2875,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) value:dataValueDictionary @@ -4033,7 +2885,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeOutOfServiceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) params:params]; @@ -4050,7 +2902,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) value:dataValueDictionary @@ -4060,7 +2912,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data - (NSDictionary *)readAttributePolarityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID) params:params]; @@ -4068,7 +2920,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data - (NSDictionary *)readAttributePresentValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) params:params]; @@ -4085,7 +2937,7 @@ - (void)writeAttributePresentValueWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) value:dataValueDictionary @@ -4095,7 +2947,7 @@ - (void)writeAttributePresentValueWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeReliabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) params:params]; @@ -4112,7 +2964,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) value:dataValueDictionary @@ -4122,7 +2974,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeStatusFlagsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID) params:params]; @@ -4130,7 +2982,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeApplicationTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID) params:params]; @@ -4138,7 +2990,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID) params:params]; @@ -4146,7 +2998,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID) params:params]; @@ -4154,7 +3006,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID) params:params]; @@ -4162,7 +3014,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID) params:params]; @@ -4170,7 +3022,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID) params:params]; @@ -4178,7 +3030,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID) params:params]; @@ -4199,12 +3051,11 @@ @implementation MTRClusterPulseWidthModulation - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4212,7 +3063,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeGeneratedCommandListID) params:params]; @@ -4220,7 +3071,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID) params:params]; @@ -4228,7 +3079,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID) params:params]; @@ -4236,7 +3087,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID) params:params]; @@ -4244,7 +3095,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeFeatureMapID) params:params]; @@ -4252,7 +3103,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeClusterRevisionID) params:params]; @@ -4264,12 +3115,11 @@ @implementation MTRClusterDescriptor - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4277,7 +3127,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeDeviceTypeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID) params:params]; @@ -4285,7 +3135,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeServerListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeServerListID) params:params]; @@ -4293,7 +3143,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClientListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClientListID) params:params]; @@ -4301,7 +3151,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePartsListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributePartsListID) params:params]; @@ -4309,7 +3159,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeTagListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeTagListID) params:params]; @@ -4317,7 +3167,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeGeneratedCommandListID) params:params]; @@ -4325,7 +3175,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID) params:params]; @@ -4333,7 +3183,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeEventListID) params:params]; @@ -4341,7 +3191,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID) params:params]; @@ -4349,7 +3199,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeFeatureMapID) params:params]; @@ -4357,7 +3207,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClusterRevisionID) params:params]; @@ -4382,12 +3232,11 @@ @implementation MTRClusterBinding - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4395,7 +3244,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) params:params]; @@ -4412,7 +3261,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) value:dataValueDictionary @@ -4422,7 +3271,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeGeneratedCommandListID) params:params]; @@ -4430,7 +3279,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID) params:params]; @@ -4438,7 +3287,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeEventListID) params:params]; @@ -4446,7 +3295,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAttributeListID) params:params]; @@ -4454,7 +3303,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeFeatureMapID) params:params]; @@ -4462,7 +3311,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeClusterRevisionID) params:params]; @@ -4483,12 +3332,11 @@ @implementation MTRClusterAccessControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4496,7 +3344,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeACLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) params:params]; @@ -4513,7 +3361,7 @@ - (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDict { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) value:dataValueDictionary @@ -4523,7 +3371,7 @@ - (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDict - (NSDictionary *)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) params:params]; @@ -4540,7 +3388,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) value:dataValueDictionary @@ -4551,7 +3399,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSubjectsPerAccessControlEntryWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeSubjectsPerAccessControlEntryID) params:params]; @@ -4559,7 +3407,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeTargetsPerAccessControlEntryWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeTargetsPerAccessControlEntryID) params:params]; @@ -4568,7 +3416,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAccessControlEntriesPerFabricWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAccessControlEntriesPerFabricID) params:params]; @@ -4576,7 +3424,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeGeneratedCommandListID) params:params]; @@ -4584,7 +3432,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID) params:params]; @@ -4592,7 +3440,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeEventListID) params:params]; @@ -4600,7 +3448,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID) params:params]; @@ -4608,7 +3456,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeFeatureMapID) params:params]; @@ -4616,7 +3464,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeClusterRevisionID) params:params]; @@ -4652,12 +3500,11 @@ @implementation MTRClusterActions - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4669,57 +3516,25 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandInstantActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::InstantAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster instantActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4741,58 +3556,25 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandInstantActionWithTransitionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::InstantActionWithTransition::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.transitionTime = params.transitionTime.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster instantActionWithTransitionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4814,57 +3596,25 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStartActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::StartAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4886,58 +3636,25 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStartActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::StartActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4959,57 +3676,25 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStopActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::StopAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5031,57 +3716,25 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandPauseActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::PauseAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5103,58 +3756,25 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandPauseActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::PauseActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5176,57 +3796,25 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandResumeActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::ResumeAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resumeActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5248,57 +3836,25 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandEnableActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::EnableAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enableActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5320,58 +3876,25 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandEnableActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::EnableActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enableActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5393,57 +3916,25 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandDisableActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::DisableAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster disableActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5465,58 +3956,25 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandDisableActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::DisableActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster disableActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5534,7 +3992,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeActionListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeActionListID) params:params]; @@ -5542,7 +4000,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeEndpointListsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEndpointListsID) params:params]; @@ -5550,7 +4008,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeSetupURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeSetupURLID) params:params]; @@ -5558,7 +4016,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeGeneratedCommandListID) params:params]; @@ -5566,7 +4024,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID) params:params]; @@ -5574,7 +4032,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEventListID) params:params]; @@ -5582,7 +4040,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAttributeListID) params:params]; @@ -5590,7 +4048,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeFeatureMapID) params:params]; @@ -5598,7 +4056,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeClusterRevisionID) params:params]; @@ -5739,12 +4197,11 @@ @implementation MTRClusterBasicInformation - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -5765,51 +4222,24 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) 0x00000028, (unsigned int) 0x10020000]; + self.endpoint, (unsigned int) 0x00000028, (unsigned int) 0x10020000]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BasicInformation::Commands::MfgSpecificPing::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster mfgSpecificPingWithParams:params + completionHandler:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5827,7 +4257,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeDataModelRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeDataModelRevisionID) params:params]; @@ -5835,7 +4265,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeVendorNameID) params:params]; @@ -5843,7 +4273,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeVendorIDID) params:params]; @@ -5851,7 +4281,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeProductNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductNameID) params:params]; @@ -5859,7 +4289,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductIDID) params:params]; @@ -5867,7 +4297,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeNodeLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeNodeLabelID) params:params]; @@ -5884,7 +4314,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeNodeLabelID) value:dataValueDictionary @@ -5894,7 +4324,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeLocationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocationID) params:params]; @@ -5911,7 +4341,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocationID) value:dataValueDictionary @@ -5921,7 +4351,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeHardwareVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeHardwareVersionID) params:params]; @@ -5929,7 +4359,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeHardwareVersionStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeHardwareVersionStringID) params:params]; @@ -5937,7 +4367,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeSoftwareVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSoftwareVersionID) params:params]; @@ -5945,7 +4375,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeSoftwareVersionStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSoftwareVersionStringID) params:params]; @@ -5953,7 +4383,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeManufacturingDateID) params:params]; @@ -5961,7 +4391,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributePartNumberID) params:params]; @@ -5969,7 +4399,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductURLID) params:params]; @@ -5977,7 +4407,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductLabelID) params:params]; @@ -5985,7 +4415,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSerialNumberID) params:params]; @@ -5993,7 +4423,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLocalConfigDisabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocalConfigDisabledID) params:params]; @@ -6010,7 +4440,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocalConfigDisabledID) value:dataValueDictionary @@ -6020,7 +4450,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeReachableID) params:params]; @@ -6028,7 +4458,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeUniqueIDID) params:params]; @@ -6036,7 +4466,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeCapabilityMinimaWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeCapabilityMinimaID) params:params]; @@ -6044,7 +4474,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID) params:params]; @@ -6052,7 +4482,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID) params:params]; @@ -6060,7 +4490,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID) params:params]; @@ -6068,7 +4498,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeEventListID) params:params]; @@ -6076,7 +4506,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAttributeListID) params:params]; @@ -6084,7 +4514,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeFeatureMapID) params:params]; @@ -6092,7 +4522,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeClusterRevisionID) params:params]; @@ -6134,12 +4564,11 @@ @implementation MTRClusterOTASoftwareUpdateProvider - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6152,96 +4581,26 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandQueryImageID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OTASoftwareUpdateProviderClusterQueryImageResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.vendorID - = static_cast>(params.vendorID.unsignedShortValue); - request.productID = params.productID.unsignedShortValue; - request.softwareVersion = params.softwareVersion.unsignedIntValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.protocolsSupported.count != 0) { - auto * listHolder_0 = new ListHolder(params.protocolsSupported.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.protocolsSupported.count; ++i_0) { - if (![params.protocolsSupported[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.protocolsSupported[i_0]; - listHolder_0->mList[i_0] = static_castmList[i_0])>>( - element_0.unsignedCharValue); - } - request.protocolsSupported = ListType_0(listHolder_0->mList, params.protocolsSupported.count); - } else { - request.protocolsSupported = ListType_0(); - } - } - if (params.hardwareVersion != nil) { - auto & definedValue_0 = request.hardwareVersion.Emplace(); - definedValue_0 = params.hardwareVersion.unsignedShortValue; - } - if (params.location != nil) { - auto & definedValue_0 = request.location.Emplace(); - definedValue_0 = [self asCharSpan:params.location]; - } - if (params.requestorCanConsent != nil) { - auto & definedValue_0 = request.requestorCanConsent.Emplace(); - definedValue_0 = params.requestorCanConsent.boolValue; - } - if (params.metadataForProvider != nil) { - auto & definedValue_0 = request.metadataForProvider.Emplace(); - definedValue_0 = [self asByteSpan:params.metadataForProvider]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster queryImageWithParams:params + completion:^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6264,55 +4623,26 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandApplyUpdateRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateToken = [self asByteSpan:params.updateToken]; - request.newVersion = params.newVersion.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster applyUpdateRequestWithParams:params + completion:^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6334,54 +4664,25 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandNotifyUpdateAppliedID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateToken = [self asByteSpan:params.updateToken]; - request.softwareVersion = params.softwareVersion.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster notifyUpdateAppliedWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6400,7 +4701,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeGeneratedCommandListID) params:params]; @@ -6409,7 +4710,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID) params:params]; @@ -6417,7 +4718,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID) params:params]; @@ -6425,7 +4726,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID) params:params]; @@ -6433,7 +4734,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeFeatureMapID) params:params]; @@ -6441,7 +4742,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeClusterRevisionID) params:params]; @@ -6505,12 +4806,11 @@ @implementation MTRClusterOTASoftwareUpdateRequestor - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6522,62 +4822,25 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateRequestorID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateRequestorID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOTAProviderID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.providerNodeID = params.providerNodeID.unsignedLongLongValue; - request.vendorID - = static_cast>(params.vendorID.unsignedShortValue); - request.announcementReason = static_cast>( - params.announcementReason.unsignedCharValue); - if (params.metadataForNode != nil) { - auto & definedValue_0 = request.metadataForNode.Emplace(); - definedValue_0 = [self asByteSpan:params.metadataForNode]; - } - request.endpoint = params.endpoint.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster announceOTAProviderWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6596,7 +4859,7 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou - (NSDictionary *)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) params:params]; @@ -6613,7 +4876,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) value:dataValueDictionary @@ -6623,7 +4886,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeUpdatePossibleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdatePossibleID) params:params]; @@ -6631,7 +4894,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeUpdateStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateID) params:params]; @@ -6640,7 +4903,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeUpdateStateProgressWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateProgressID) params:params]; @@ -6649,7 +4912,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeGeneratedCommandListID) params:params]; @@ -6658,7 +4921,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID) params:params]; @@ -6666,7 +4929,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID) params:params]; @@ -6674,7 +4937,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID) params:params]; @@ -6682,7 +4945,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeFeatureMapID) params:params]; @@ -6690,7 +4953,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeClusterRevisionID) params:params]; @@ -6740,12 +5003,11 @@ @implementation MTRClusterLocalizationConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6753,7 +5015,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveLocaleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) params:params]; @@ -6770,7 +5032,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) value:dataValueDictionary @@ -6780,7 +5042,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeSupportedLocalesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeSupportedLocalesID) params:params]; @@ -6789,7 +5051,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeGeneratedCommandListID) params:params]; @@ -6798,7 +5060,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID) params:params]; @@ -6806,7 +5068,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID) params:params]; @@ -6814,7 +5076,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID) params:params]; @@ -6822,7 +5084,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeFeatureMapID) params:params]; @@ -6830,7 +5092,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeClusterRevisionID) params:params]; @@ -6851,12 +5113,11 @@ @implementation MTRClusterTimeFormatLocalization - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6864,7 +5125,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeHourFormatWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) params:params]; @@ -6881,7 +5142,7 @@ - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) value:dataValueDictionary @@ -6891,7 +5152,7 @@ - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeActiveCalendarTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) params:params]; @@ -6908,7 +5169,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) value:dataValueDictionary @@ -6919,7 +5180,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeSupportedCalendarTypesWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeSupportedCalendarTypesID) params:params]; @@ -6928,7 +5189,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeGeneratedCommandListID) params:params]; @@ -6936,7 +5197,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID) params:params]; @@ -6944,7 +5205,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID) params:params]; @@ -6952,7 +5213,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID) params:params]; @@ -6960,7 +5221,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeFeatureMapID) params:params]; @@ -6968,7 +5229,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeClusterRevisionID) params:params]; @@ -6989,12 +5250,11 @@ @implementation MTRClusterUnitLocalization - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7002,7 +5262,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeTemperatureUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) params:params]; @@ -7019,7 +5279,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) value:dataValueDictionary @@ -7029,7 +5289,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeGeneratedCommandListID) params:params]; @@ -7037,7 +5297,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID) params:params]; @@ -7045,7 +5305,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID) params:params]; @@ -7053,7 +5313,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID) params:params]; @@ -7061,7 +5321,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeFeatureMapID) params:params]; @@ -7069,7 +5329,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeClusterRevisionID) params:params]; @@ -7090,12 +5350,11 @@ @implementation MTRClusterPowerSourceConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7103,7 +5362,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSourcesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeSourcesID) params:params]; @@ -7112,7 +5371,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeGeneratedCommandListID) params:params]; @@ -7121,7 +5380,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID) params:params]; @@ -7129,7 +5388,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID) params:params]; @@ -7137,7 +5396,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID) params:params]; @@ -7145,7 +5404,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeFeatureMapID) params:params]; @@ -7153,7 +5412,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeClusterRevisionID) params:params]; @@ -7174,12 +5433,11 @@ @implementation MTRClusterPowerSource - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7187,7 +5445,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeStatusID) params:params]; @@ -7195,7 +5453,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOrderWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeOrderID) params:params]; @@ -7203,7 +5461,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeDescriptionID) params:params]; @@ -7211,7 +5469,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredAssessedInputVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputVoltageID) params:params]; @@ -7219,7 +5477,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredAssessedInputFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputFrequencyID) params:params]; @@ -7227,7 +5485,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredCurrentTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredCurrentTypeID) params:params]; @@ -7235,7 +5493,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredAssessedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedCurrentID) params:params]; @@ -7243,7 +5501,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredNominalVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredNominalVoltageID) params:params]; @@ -7251,7 +5509,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredMaximumCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredMaximumCurrentID) params:params]; @@ -7259,7 +5517,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredPresentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredPresentID) params:params]; @@ -7267,7 +5525,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveWiredFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveWiredFaultsID) params:params]; @@ -7275,7 +5533,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatVoltageID) params:params]; @@ -7283,7 +5541,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatPercentRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPercentRemainingID) params:params]; @@ -7291,7 +5549,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatTimeRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeRemainingID) params:params]; @@ -7299,7 +5557,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatChargeLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeLevelID) params:params]; @@ -7307,7 +5565,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatReplacementNeededWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementNeededID) params:params]; @@ -7315,7 +5573,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatReplaceabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplaceabilityID) params:params]; @@ -7323,7 +5581,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatPresentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPresentID) params:params]; @@ -7331,7 +5589,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveBatFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatFaultsID) params:params]; @@ -7339,7 +5597,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatReplacementDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementDescriptionID) params:params]; @@ -7347,7 +5605,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatCommonDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCommonDesignationID) params:params]; @@ -7355,7 +5613,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatANSIDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatANSIDesignationID) params:params]; @@ -7363,7 +5621,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatIECDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatIECDesignationID) params:params]; @@ -7371,7 +5629,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatApprovedChemistryWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatApprovedChemistryID) params:params]; @@ -7379,7 +5637,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCapacityID) params:params]; @@ -7387,7 +5645,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatQuantityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatQuantityID) params:params]; @@ -7395,7 +5653,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatChargeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeStateID) params:params]; @@ -7403,7 +5661,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatTimeToFullChargeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeToFullChargeID) params:params]; @@ -7411,7 +5669,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatFunctionalWhileChargingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatFunctionalWhileChargingID) params:params]; @@ -7419,7 +5677,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatChargingCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargingCurrentID) params:params]; @@ -7427,7 +5685,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveBatChargeFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatChargeFaultsID) params:params]; @@ -7435,7 +5693,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEndpointListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID) params:params]; @@ -7443,7 +5701,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID) params:params]; @@ -7451,7 +5709,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID) params:params]; @@ -7459,7 +5717,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEventListID) params:params]; @@ -7467,7 +5725,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID) params:params]; @@ -7475,7 +5733,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeFeatureMapID) params:params]; @@ -7483,7 +5741,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeClusterRevisionID) params:params]; @@ -7504,12 +5762,11 @@ @implementation MTRClusterGeneralCommissioning - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7522,55 +5779,26 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandArmFailSafeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterArmFailSafeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralCommissioning::Commands::ArmFailSafe::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; - request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster armFailSafeWithParams:params + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -7593,57 +5821,26 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandSetRegulatoryConfigID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterSetRegulatoryConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newRegulatoryConfig = static_cast>( - params.newRegulatoryConfig.unsignedCharValue); - request.countryCode = [self asCharSpan:params.countryCode]; - request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setRegulatoryConfigWithParams:params + completion:^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -7679,54 +5876,27 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandCommissioningCompleteID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterCommissioningCompleteResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralCommissioning::Commands::CommissioningComplete::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + commissioningCompleteWithParams:params + completion:^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -7744,7 +5914,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio - (NSDictionary *)readAttributeBreadcrumbWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) params:params]; @@ -7761,7 +5931,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) value:dataValueDictionary @@ -7772,7 +5942,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeBasicCommissioningInfoWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBasicCommissioningInfoID) params:params]; @@ -7780,7 +5950,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeRegulatoryConfigWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeRegulatoryConfigID) params:params]; @@ -7788,7 +5958,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeLocationCapabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeLocationCapabilityID) params:params]; @@ -7797,7 +5967,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeSupportsConcurrentConnectionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeSupportsConcurrentConnectionID) params:params]; @@ -7805,7 +5975,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID) params:params]; @@ -7813,7 +5983,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID) params:params]; @@ -7821,7 +5991,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID) params:params]; @@ -7829,7 +5999,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID) params:params]; @@ -7837,7 +6007,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeFeatureMapID) params:params]; @@ -7845,7 +6015,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeClusterRevisionID) params:params]; @@ -7926,12 +6096,11 @@ @implementation MTRClusterNetworkCommissioning - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7944,68 +6113,26 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandScanNetworksID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterScanNetworksResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::ScanNetworks::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.ssid != nil) { - auto & definedValue_0 = request.ssid.Emplace(); - if (params.ssid == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.ssid]; - } - } - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster scanNetworksWithParams:params + completion:^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8028,59 +6155,26 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandAddOrUpdateWiFiNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.ssid = [self asByteSpan:params.ssid]; - request.credentials = [self asByteSpan:params.credentials]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addOrUpdateWiFiNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8103,58 +6197,26 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandAddOrUpdateThreadNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.operationalDataset = [self asByteSpan:params.operationalDataset]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addOrUpdateThreadNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8177,58 +6239,26 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandRemoveNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::RemoveNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.networkID = [self asByteSpan:params.networkID]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8251,58 +6281,26 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandConnectNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterConnectNetworkResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::ConnectNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.networkID = [self asByteSpan:params.networkID]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster connectNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8325,59 +6323,26 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandReorderNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::ReorderNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.networkID = [self asByteSpan:params.networkID]; - request.networkIndex = params.networkIndex.unsignedCharValue; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster reorderNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8395,7 +6360,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeMaxNetworksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeMaxNetworksID) params:params]; @@ -8403,7 +6368,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeNetworksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeNetworksID) params:params]; @@ -8411,7 +6376,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeScanMaxTimeSecondsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeScanMaxTimeSecondsID) params:params]; @@ -8419,7 +6384,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeConnectMaxTimeSecondsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeConnectMaxTimeSecondsID) params:params]; @@ -8427,7 +6392,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeInterfaceEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) params:params]; @@ -8444,7 +6409,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) value:dataValueDictionary @@ -8454,7 +6419,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLastNetworkingStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkingStatusID) params:params]; @@ -8462,7 +6427,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLastNetworkIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkIDID) params:params]; @@ -8470,7 +6435,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLastConnectErrorValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastConnectErrorValueID) params:params]; @@ -8478,7 +6443,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeGeneratedCommandListID) params:params]; @@ -8486,7 +6451,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID) params:params]; @@ -8494,7 +6459,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID) params:params]; @@ -8502,7 +6467,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID) params:params]; @@ -8510,7 +6475,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeFeatureMapID) params:params]; @@ -8518,7 +6483,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeClusterRevisionID) params:params]; @@ -8633,12 +6598,11 @@ @implementation MTRClusterDiagnosticLogs - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -8651,60 +6615,26 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDiagnosticLogsID, + self.endpoint, (unsigned int) MTRClusterIDTypeDiagnosticLogsID, (unsigned int) MTRCommandIDTypeClusterDiagnosticLogsCommandRetrieveLogsRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DiagnosticLogsClusterRetrieveLogsResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.intent = static_cast>(params.intent.unsignedCharValue); - request.requestedProtocol = static_cast>( - params.requestedProtocol.unsignedCharValue); - if (params.transferFileDesignator != nil) { - auto & definedValue_0 = request.transferFileDesignator.Emplace(); - definedValue_0 = [self asCharSpan:params.transferFileDesignator]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster retrieveLogsRequestWithParams:params + completion:^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8722,7 +6652,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeGeneratedCommandListID) params:params]; @@ -8730,7 +6660,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID) params:params]; @@ -8738,7 +6668,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID) params:params]; @@ -8746,7 +6676,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID) params:params]; @@ -8754,7 +6684,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeFeatureMapID) params:params]; @@ -8762,7 +6692,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeClusterRevisionID) params:params]; @@ -8798,12 +6728,11 @@ @implementation MTRClusterGeneralDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -8815,54 +6744,25 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterGeneralDiagnosticsCommandTestEventTriggerID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralDiagnostics::Commands::TestEventTrigger::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enableKey = [self asByteSpan:params.enableKey]; - request.eventTrigger = params.eventTrigger.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testEventTriggerWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8880,7 +6780,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeNetworkInterfacesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeNetworkInterfacesID) params:params]; @@ -8888,7 +6788,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeRebootCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeRebootCountID) params:params]; @@ -8896,7 +6796,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeUpTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeUpTimeID) params:params]; @@ -8904,7 +6804,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeTotalOperationalHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTotalOperationalHoursID) params:params]; @@ -8912,7 +6812,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeBootReasonWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeBootReasonID) params:params]; @@ -8920,7 +6820,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeActiveHardwareFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveHardwareFaultsID) params:params]; @@ -8928,7 +6828,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeActiveRadioFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveRadioFaultsID) params:params]; @@ -8936,7 +6836,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeActiveNetworkFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID) params:params]; @@ -8945,7 +6845,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeTestEventTriggersEnabledWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID) params:params]; @@ -8953,7 +6853,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -8961,7 +6861,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -8969,7 +6869,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID) params:params]; @@ -8977,7 +6877,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID) params:params]; @@ -8985,7 +6885,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeFeatureMapID) params:params]; @@ -8993,7 +6893,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeClusterRevisionID) params:params]; @@ -9028,12 +6928,11 @@ @implementation MTRClusterSoftwareDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -9054,52 +6953,25 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeSoftwareDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeSoftwareDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterSoftwareDiagnosticsCommandResetWatermarksID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - SoftwareDiagnostics::Commands::ResetWatermarks::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetWatermarksWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -9117,7 +6989,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeThreadMetricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeThreadMetricsID) params:params]; @@ -9125,7 +6997,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeCurrentHeapFreeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapFreeID) params:params]; @@ -9133,7 +7005,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeCurrentHeapUsedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapUsedID) params:params]; @@ -9142,7 +7014,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeCurrentHeapHighWatermarkWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapHighWatermarkID) params:params]; @@ -9150,7 +7022,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -9158,7 +7030,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -9166,7 +7038,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID) params:params]; @@ -9174,7 +7046,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID) params:params]; @@ -9182,7 +7054,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeFeatureMapID) params:params]; @@ -9190,7 +7062,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeClusterRevisionID) params:params]; @@ -9230,12 +7102,11 @@ @implementation MTRClusterThreadNetworkDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -9256,52 +7127,25 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThreadNetworkDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeThreadNetworkDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterThreadNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ThreadNetworkDiagnostics::Commands::ResetCounts::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -9319,7 +7163,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeChannelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelID) params:params]; @@ -9327,7 +7171,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRoutingRoleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRoutingRoleID) params:params]; @@ -9335,7 +7179,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeNetworkNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNetworkNameID) params:params]; @@ -9343,7 +7187,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePanIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePanIdID) params:params]; @@ -9351,7 +7195,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeExtendedPanIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeExtendedPanIdID) params:params]; @@ -9359,7 +7203,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeMeshLocalPrefixWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeMeshLocalPrefixID) params:params]; @@ -9367,7 +7211,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOverrunCountID) params:params]; @@ -9375,7 +7219,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeNeighborTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNeighborTableID) params:params]; @@ -9383,7 +7227,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRouteTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouteTableID) params:params]; @@ -9391,7 +7235,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePartitionIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdID) params:params]; @@ -9399,7 +7243,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeWeightingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeWeightingID) params:params]; @@ -9407,7 +7251,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeDataVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDataVersionID) params:params]; @@ -9415,7 +7259,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeStableDataVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeStableDataVersionID) params:params]; @@ -9423,7 +7267,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeLeaderRouterIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRouterIdID) params:params]; @@ -9431,7 +7275,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeDetachedRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDetachedRoleCountID) params:params]; @@ -9439,7 +7283,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeChildRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChildRoleCountID) params:params]; @@ -9447,7 +7291,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRouterRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouterRoleCountID) params:params]; @@ -9455,7 +7299,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeLeaderRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRoleCountID) params:params]; @@ -9464,7 +7308,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeAttachAttemptCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttachAttemptCountID) params:params]; @@ -9473,7 +7317,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePartitionIdChangeCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdChangeCountID) params:params]; @@ -9482,7 +7326,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeBetterPartitionAttachAttemptCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeBetterPartitionAttachAttemptCountID) params:params]; @@ -9490,7 +7334,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeParentChangeCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeParentChangeCountID) params:params]; @@ -9498,7 +7342,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxTotalCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxTotalCountID) params:params]; @@ -9506,7 +7350,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxUnicastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxUnicastCountID) params:params]; @@ -9514,7 +7358,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxBroadcastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBroadcastCountID) params:params]; @@ -9523,7 +7367,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxAckRequestedCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckRequestedCountID) params:params]; @@ -9531,7 +7375,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxAckedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckedCountID) params:params]; @@ -9540,7 +7384,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxNoAckRequestedCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxNoAckRequestedCountID) params:params]; @@ -9548,7 +7392,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxDataCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataCountID) params:params]; @@ -9556,7 +7400,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxDataPollCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataPollCountID) params:params]; @@ -9564,7 +7408,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxBeaconCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconCountID) params:params]; @@ -9573,7 +7417,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxBeaconRequestCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconRequestCountID) params:params]; @@ -9581,7 +7425,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxOtherCountID) params:params]; @@ -9589,7 +7433,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxRetryCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxRetryCountID) params:params]; @@ -9598,7 +7442,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDirectMaxRetryExpiryCountID) params:params]; @@ -9607,7 +7451,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxIndirectMaxRetryExpiryCountID) params:params]; @@ -9615,7 +7459,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxErrCcaCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrCcaCountID) params:params]; @@ -9623,7 +7467,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxErrAbortCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrAbortCountID) params:params]; @@ -9632,7 +7476,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxErrBusyChannelCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrBusyChannelCountID) params:params]; @@ -9640,7 +7484,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxTotalCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxTotalCountID) params:params]; @@ -9648,7 +7492,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxUnicastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxUnicastCountID) params:params]; @@ -9656,7 +7500,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxBroadcastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBroadcastCountID) params:params]; @@ -9664,7 +7508,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDataCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataCountID) params:params]; @@ -9672,7 +7516,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDataPollCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataPollCountID) params:params]; @@ -9680,7 +7524,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxBeaconCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconCountID) params:params]; @@ -9689,7 +7533,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxBeaconRequestCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconRequestCountID) params:params]; @@ -9697,7 +7541,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxOtherCountID) params:params]; @@ -9706,7 +7550,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxAddressFilteredCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxAddressFilteredCountID) params:params]; @@ -9715,7 +7559,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDestAddrFilteredCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDestAddrFilteredCountID) params:params]; @@ -9723,7 +7567,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDuplicatedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDuplicatedCountID) params:params]; @@ -9731,7 +7575,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrNoFrameCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrNoFrameCountID) params:params]; @@ -9740,7 +7584,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrUnknownNeighborCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrUnknownNeighborCountID) params:params]; @@ -9749,7 +7593,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrInvalidSrcAddrCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrInvalidSrcAddrCountID) params:params]; @@ -9757,7 +7601,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrSecCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrSecCountID) params:params]; @@ -9765,7 +7609,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrFcsCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrFcsCountID) params:params]; @@ -9773,7 +7617,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrOtherCountID) params:params]; @@ -9781,7 +7625,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeActiveTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveTimestampID) params:params]; @@ -9789,7 +7633,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePendingTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePendingTimestampID) params:params]; @@ -9797,7 +7641,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDelayID) params:params]; @@ -9805,7 +7649,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeSecurityPolicyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeSecurityPolicyID) params:params]; @@ -9813,7 +7657,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeChannelPage0MaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelPage0MaskID) params:params]; @@ -9822,7 +7666,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeOperationalDatasetComponentsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOperationalDatasetComponentsID) params:params]; @@ -9831,7 +7675,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeActiveNetworkFaultsListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveNetworkFaultsListID) params:params]; @@ -9840,7 +7684,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -9849,7 +7693,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -9857,7 +7701,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID) params:params]; @@ -9865,7 +7709,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -9873,7 +7717,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeFeatureMapID) params:params]; @@ -9881,7 +7725,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeClusterRevisionID) params:params]; @@ -9929,12 +7773,11 @@ @implementation MTRClusterWiFiNetworkDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -9955,52 +7798,25 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWiFiNetworkDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeWiFiNetworkDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterWiFiNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WiFiNetworkDiagnostics::Commands::ResetCounts::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10018,7 +7834,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeBSSIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBSSIDID) params:params]; @@ -10026,7 +7842,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeSecurityTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeSecurityTypeID) params:params]; @@ -10034,7 +7850,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeWiFiVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeWiFiVersionID) params:params]; @@ -10042,7 +7858,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeChannelNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeChannelNumberID) params:params]; @@ -10050,7 +7866,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeRSSIWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeRSSIID) params:params]; @@ -10058,7 +7874,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeBeaconLostCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconLostCountID) params:params]; @@ -10066,7 +7882,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeBeaconRxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconRxCountID) params:params]; @@ -10075,7 +7891,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketMulticastRxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastRxCountID) params:params]; @@ -10084,7 +7900,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketMulticastTxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastTxCountID) params:params]; @@ -10093,7 +7909,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketUnicastRxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastRxCountID) params:params]; @@ -10102,7 +7918,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketUnicastTxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastTxCountID) params:params]; @@ -10110,7 +7926,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeCurrentMaxRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeCurrentMaxRateID) params:params]; @@ -10118,7 +7934,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeOverrunCountID) params:params]; @@ -10127,7 +7943,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -10135,7 +7951,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -10143,7 +7959,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID) params:params]; @@ -10151,7 +7967,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -10159,7 +7975,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeFeatureMapID) params:params]; @@ -10167,7 +7983,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeClusterRevisionID) params:params]; @@ -10215,12 +8031,11 @@ @implementation MTRClusterEthernetNetworkDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -10241,52 +8056,25 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeEthernetNetworkDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeEthernetNetworkDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterEthernetNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10304,7 +8092,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributePHYRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePHYRateID) params:params]; @@ -10312,7 +8100,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeFullDuplexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFullDuplexID) params:params]; @@ -10320,7 +8108,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributePacketRxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketRxCountID) params:params]; @@ -10328,7 +8116,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributePacketTxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketTxCountID) params:params]; @@ -10336,7 +8124,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeTxErrCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTxErrCountID) params:params]; @@ -10344,7 +8132,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeCollisionCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCollisionCountID) params:params]; @@ -10352,7 +8140,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeOverrunCountID) params:params]; @@ -10360,7 +8148,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeCarrierDetectWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCarrierDetectID) params:params]; @@ -10368,7 +8156,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeTimeSinceResetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID) params:params]; @@ -10377,7 +8165,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -10386,7 +8174,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -10394,7 +8182,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID) params:params]; @@ -10402,7 +8190,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -10410,7 +8198,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFeatureMapID) params:params]; @@ -10418,7 +8206,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID) params:params]; @@ -10458,12 +8246,11 @@ @implementation MTRClusterTimeSynchronization - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -10475,60 +8262,25 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetUTCTimeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetUTCTime::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.UTCTime = params.utcTime.unsignedLongLongValue; - request.granularity - = static_cast>(params.granularity.unsignedCharValue); - if (params.timeSource != nil) { - auto & definedValue_0 = request.timeSource.Emplace(); - definedValue_0 - = static_cast>(params.timeSource.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setUTCTimeWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10550,59 +8302,25 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetTrustedTimeSourceID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetTrustedTimeSource::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params.trustedTimeSource == nil) { - request.trustedTimeSource.SetNull(); - } else { - auto & nonNullValue_0 = request.trustedTimeSource.SetNonNull(); - nonNullValue_0.nodeID = params.trustedTimeSource.nodeID.unsignedLongLongValue; - nonNullValue_0.endpoint = params.trustedTimeSource.endpoint.unsignedShortValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setTrustedTimeSourceWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10625,80 +8343,26 @@ - (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetTimeZoneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRTimeSynchronizationClusterSetTimeZoneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeSynchronizationClusterSetTimeZoneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetTimeZone::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.timeZone.count != 0) { - auto * listHolder_0 = new ListHolder(params.timeZone.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.timeZone.count; ++i_0) { - if (![params.timeZone[i_0] isKindOfClass:[MTRTimeSynchronizationClusterTimeZoneStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTimeSynchronizationClusterTimeZoneStruct *) params.timeZone[i_0]; - listHolder_0->mList[i_0].offset = element_0.offset.intValue; - listHolder_0->mList[i_0].validAt = element_0.validAt.unsignedLongLongValue; - if (element_0.name != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); - definedValue_2 = [self asCharSpan:element_0.name]; - } - } - request.timeZone = ListType_0(listHolder_0->mList, params.timeZone.count); - } else { - request.timeZone = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setTimeZoneWithParams:params + completion:^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10720,81 +8384,25 @@ - (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetDSTOffsetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetDSTOffset::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.dstOffset.count != 0) { - auto * listHolder_0 = new ListHolder(params.dstOffset.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.dstOffset.count; ++i_0) { - if (![params.dstOffset[i_0] isKindOfClass:[MTRTimeSynchronizationClusterDSTOffsetStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTimeSynchronizationClusterDSTOffsetStruct *) params.dstOffset[i_0]; - listHolder_0->mList[i_0].offset = element_0.offset.intValue; - listHolder_0->mList[i_0].validStarting = element_0.validStarting.unsignedLongLongValue; - if (element_0.validUntil == nil) { - listHolder_0->mList[i_0].validUntil.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].validUntil.SetNonNull(); - nonNullValue_2 = element_0.validUntil.unsignedLongLongValue; - } - } - request.DSTOffset = ListType_0(listHolder_0->mList, params.dstOffset.count); - } else { - request.DSTOffset = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setDSTOffsetWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10816,58 +8424,25 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetDefaultNTPID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetDefaultNTP::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params.defaultNTP == nil) { - request.defaultNTP.SetNull(); - } else { - auto & nonNullValue_0 = request.defaultNTP.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.defaultNTP]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setDefaultNTPWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10885,7 +8460,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeUTCTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeUTCTimeID) params:params]; @@ -10893,7 +8468,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeGranularityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGranularityID) params:params]; @@ -10901,7 +8476,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeSourceID) params:params]; @@ -10909,7 +8484,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTrustedTimeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeSourceID) params:params]; @@ -10917,7 +8492,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeDefaultNTPWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNTPID) params:params]; @@ -10925,7 +8500,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeZoneWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneID) params:params]; @@ -10933,7 +8508,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeDSTOffsetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetID) params:params]; @@ -10941,7 +8516,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeLocalTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeLocalTimeID) params:params]; @@ -10949,7 +8524,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeZoneDatabaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneDatabaseID) params:params]; @@ -10957,7 +8532,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeNTPServerAvailableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeNTPServerAvailableID) params:params]; @@ -10965,7 +8540,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeZoneListMaxSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneListMaxSizeID) params:params]; @@ -10973,7 +8548,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeDSTOffsetListMaxSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetListMaxSizeID) params:params]; @@ -10981,7 +8556,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeSupportsDNSResolveWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeSupportsDNSResolveID) params:params]; @@ -10989,7 +8564,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGeneratedCommandListID) params:params]; @@ -10997,7 +8572,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID) params:params]; @@ -11005,7 +8580,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID) params:params]; @@ -11013,7 +8588,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID) params:params]; @@ -11021,7 +8596,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeFeatureMapID) params:params]; @@ -11029,7 +8604,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeClusterRevisionID) params:params]; @@ -11041,12 +8616,11 @@ @implementation MTRClusterBridgedDeviceBasicInformation - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11054,7 +8628,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeVendorNameID) params:params]; @@ -11062,7 +8636,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeVendorIDID) params:params]; @@ -11070,7 +8644,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeProductNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductNameID) params:params]; @@ -11078,7 +8652,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeNodeLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeNodeLabelID) params:params]; @@ -11095,7 +8669,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeNodeLabelID) value:dataValueDictionary @@ -11106,7 +8680,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeHardwareVersionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeHardwareVersionID) params:params]; @@ -11115,7 +8689,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeHardwareVersionStringWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeHardwareVersionStringID) params:params]; @@ -11124,7 +8698,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSoftwareVersionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionID) params:params]; @@ -11133,7 +8707,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSoftwareVersionStringWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionStringID) params:params]; @@ -11142,7 +8716,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeManufacturingDateID) params:params]; @@ -11150,7 +8724,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributePartNumberID) params:params]; @@ -11158,7 +8732,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductURLID) params:params]; @@ -11166,7 +8740,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductLabelID) params:params]; @@ -11174,7 +8748,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSerialNumberID) params:params]; @@ -11182,7 +8756,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeReachableID) params:params]; @@ -11190,7 +8764,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeUniqueIDID) params:params]; @@ -11199,7 +8773,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID) params:params]; @@ -11208,7 +8782,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeGeneratedCommandListID) params:params]; @@ -11217,7 +8791,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID) params:params]; @@ -11225,7 +8799,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID) params:params]; @@ -11234,7 +8808,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID) params:params]; @@ -11242,7 +8816,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeFeatureMapID) params:params]; @@ -11251,7 +8825,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeClusterRevisionID) params:params]; @@ -11274,12 +8848,11 @@ @implementation MTRClusterSwitch - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11287,7 +8860,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeNumberOfPositionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeNumberOfPositionsID) params:params]; @@ -11295,7 +8868,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeCurrentPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeCurrentPositionID) params:params]; @@ -11303,7 +8876,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMultiPressMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeMultiPressMaxID) params:params]; @@ -11311,7 +8884,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeGeneratedCommandListID) params:params]; @@ -11319,7 +8892,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID) params:params]; @@ -11327,7 +8900,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeEventListID) params:params]; @@ -11335,7 +8908,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAttributeListID) params:params]; @@ -11343,7 +8916,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID) params:params]; @@ -11351,7 +8924,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeClusterRevisionID) params:params]; @@ -11372,12 +8945,11 @@ @implementation MTRClusterAdministratorCommissioning - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11389,61 +8961,26 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandOpenCommissioningWindowID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - request.PAKEPasscodeVerifier = [self asByteSpan:params.pakePasscodeVerifier]; - request.discriminator = params.discriminator.unsignedShortValue; - request.iterations = params.iterations.unsignedIntValue; - request.salt = [self asByteSpan:params.salt]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster openCommissioningWindowWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11465,57 +9002,26 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandOpenBasicCommissioningWindowID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster openBasicCommissioningWindowWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11546,55 +9052,25 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandRevokeCommissioningID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AdministratorCommissioning::Commands::RevokeCommissioning::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster revokeCommissioningWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11612,7 +9088,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeWindowStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeWindowStatusID) params:params]; @@ -11621,7 +9097,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAdminFabricIndexWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminFabricIndexID) params:params]; @@ -11629,7 +9105,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAdminVendorIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminVendorIdID) params:params]; @@ -11638,7 +9114,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeGeneratedCommandListID) params:params]; @@ -11647,7 +9123,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID) params:params]; @@ -11655,7 +9131,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID) params:params]; @@ -11663,7 +9139,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID) params:params]; @@ -11671,7 +9147,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeFeatureMapID) params:params]; @@ -11679,7 +9155,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeClusterRevisionID) params:params]; @@ -11739,12 +9215,11 @@ @implementation MTRClusterOperationalCredentials - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11757,54 +9232,26 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAttestationRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterAttestationResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterAttestationResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AttestationRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.attestationNonce = [self asByteSpan:params.attestationNonce]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster attestationRequestWithParams:params + completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11827,55 +9274,27 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandCertificateChainRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterCertificateChainResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::CertificateChainRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.certificateType = static_cast>( - params.certificateType.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + certificateChainRequestWithParams:params + completion:^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11898,58 +9317,26 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandCSRRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterCSRResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterCSRResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::CSRRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.CSRNonce = [self asByteSpan:params.csrNonce]; - if (params.isForUpdateNOC != nil) { - auto & definedValue_0 = request.isForUpdateNOC.Emplace(); - definedValue_0 = params.isForUpdateNOC.boolValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + CSRRequestWithParams:params + completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11972,62 +9359,26 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAddNOCID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AddNOC::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; - } - request.IPKValue = [self asByteSpan:params.ipkValue]; - request.caseAdminSubject = params.caseAdminSubject.unsignedLongLongValue; - request.adminVendorId = static_cast>( - params.adminVendorId.unsignedShortValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + addNOCWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12050,58 +9401,26 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandUpdateNOCID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateNOC::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + updateNOCWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12124,54 +9443,26 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandUpdateFabricLabelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateFabricLabel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.label = [self asCharSpan:params.label]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster updateFabricLabelWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12194,54 +9485,26 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandRemoveFabricID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::RemoveFabric::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.fabricIndex = params.fabricIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeFabricWithParams:params + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12263,54 +9526,26 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAddTrustedRootCertificateID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.rootCACertificate = [self asByteSpan:params.rootCACertificate]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addTrustedRootCertificateWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12328,7 +9563,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeNOCsID) params:params]; @@ -12336,7 +9571,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFabricsID) params:params]; @@ -12344,7 +9579,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeSupportedFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeSupportedFabricsID) params:params]; @@ -12352,7 +9587,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeCommissionedFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCommissionedFabricsID) params:params]; @@ -12361,7 +9596,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeTrustedRootCertificatesWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeTrustedRootCertificatesID) params:params]; @@ -12369,7 +9604,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeCurrentFabricIndexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCurrentFabricIndexID) params:params]; @@ -12378,7 +9613,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeGeneratedCommandListID) params:params]; @@ -12386,7 +9621,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID) params:params]; @@ -12394,7 +9629,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID) params:params]; @@ -12402,7 +9637,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID) params:params]; @@ -12410,7 +9645,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFeatureMapID) params:params]; @@ -12418,7 +9653,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeClusterRevisionID) params:params]; @@ -12553,12 +9788,11 @@ @implementation MTRClusterGroupKeyManagement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -12570,92 +9804,25 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetWriteID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetWrite::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; - request.groupKeySet.groupKeySecurityPolicy - = static_cast>( - params.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); - if (params.groupKeySet.epochKey0 == nil) { - request.groupKeySet.epochKey0.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey0.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey0]; - } - if (params.groupKeySet.epochStartTime0 == nil) { - request.groupKeySet.epochStartTime0.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime0.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime0.unsignedLongLongValue; - } - if (params.groupKeySet.epochKey1 == nil) { - request.groupKeySet.epochKey1.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey1.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey1]; - } - if (params.groupKeySet.epochStartTime1 == nil) { - request.groupKeySet.epochStartTime1.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime1.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime1.unsignedLongLongValue; - } - if (params.groupKeySet.epochKey2 == nil) { - request.groupKeySet.epochKey2.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey2.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey2]; - } - if (params.groupKeySet.epochStartTime2 == nil) { - request.groupKeySet.epochStartTime2.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime2.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12678,54 +9845,26 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementClusterKeySetReadResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRead::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12747,53 +9886,25 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetRemoveID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRemove::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12827,53 +9938,26 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetReadAllIndicesWithParams:params + completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12891,7 +9975,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl - (NSDictionary *)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) params:params]; @@ -12908,7 +9992,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) value:dataValueDictionary @@ -12918,7 +10002,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupTableID) params:params]; @@ -12926,7 +10010,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeMaxGroupsPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupsPerFabricID) params:params]; @@ -12934,7 +10018,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeMaxGroupKeysPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID) params:params]; @@ -12942,7 +10026,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGeneratedCommandListID) params:params]; @@ -12950,7 +10034,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID) params:params]; @@ -12958,7 +10042,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID) params:params]; @@ -12966,7 +10050,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID) params:params]; @@ -12974,7 +10058,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeFeatureMapID) params:params]; @@ -12982,7 +10066,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeClusterRevisionID) params:params]; @@ -13053,12 +10137,11 @@ @implementation MTRClusterFixedLabel - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13066,7 +10149,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeLabelListID) params:params]; @@ -13074,7 +10157,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeGeneratedCommandListID) params:params]; @@ -13082,7 +10165,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID) params:params]; @@ -13090,7 +10173,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeEventListID) params:params]; @@ -13098,7 +10181,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID) params:params]; @@ -13106,7 +10189,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID) params:params]; @@ -13114,7 +10197,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeClusterRevisionID) params:params]; @@ -13135,12 +10218,11 @@ @implementation MTRClusterUserLabel - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13148,7 +10230,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) params:params]; @@ -13165,7 +10247,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) value:dataValueDictionary @@ -13175,7 +10257,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeGeneratedCommandListID) params:params]; @@ -13183,7 +10265,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID) params:params]; @@ -13191,7 +10273,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeEventListID) params:params]; @@ -13199,7 +10281,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID) params:params]; @@ -13207,7 +10289,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID) params:params]; @@ -13215,7 +10297,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeClusterRevisionID) params:params]; @@ -13236,12 +10318,11 @@ @implementation MTRClusterBooleanState - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13249,7 +10330,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStateValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeStateValueID) params:params]; @@ -13257,7 +10338,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeGeneratedCommandListID) params:params]; @@ -13265,7 +10346,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID) params:params]; @@ -13273,7 +10354,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeEventListID) params:params]; @@ -13281,7 +10362,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID) params:params]; @@ -13289,7 +10370,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID) params:params]; @@ -13297,7 +10378,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID) params:params]; @@ -13318,12 +10399,11 @@ @implementation MTRClusterICDManagement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13336,60 +10416,26 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, (unsigned int) MTRCommandIDTypeClusterICDManagementCommandRegisterClientID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRICDManagementClusterRegisterClientResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ICDManagementClusterRegisterClientResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - IcdManagement::Commands::RegisterClient::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.checkInNodeID = params.checkInNodeID.unsignedLongLongValue; - request.monitoredSubject = params.monitoredSubject.unsignedLongLongValue; - request.key = [self asByteSpan:params.key]; - if (params.verificationKey != nil) { - auto & definedValue_0 = request.verificationKey.Emplace(); - definedValue_0 = [self asByteSpan:params.verificationKey]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster registerClientWithParams:params + completion:^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13411,57 +10457,25 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, (unsigned int) MTRCommandIDTypeClusterICDManagementCommandUnregisterClientID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - IcdManagement::Commands::UnregisterClient::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.checkInNodeID = params.checkInNodeID.unsignedLongLongValue; - if (params.verificationKey != nil) { - auto & definedValue_0 = request.verificationKey.Emplace(); - definedValue_0 = [self asByteSpan:params.verificationKey]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unregisterClientWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13492,52 +10506,25 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, (unsigned int) MTRCommandIDTypeClusterICDManagementCommandStayActiveRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - IcdManagement::Commands::StayActiveRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stayActiveRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13555,7 +10542,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeIdleModeIntervalWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeIdleModeIntervalID) params:params]; @@ -13563,7 +10550,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeActiveModeIntervalWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeIntervalID) params:params]; @@ -13571,7 +10558,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID) params:params]; @@ -13579,7 +10566,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID) params:params]; @@ -13587,7 +10574,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeICDCounterWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID) params:params]; @@ -13595,7 +10582,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID) params:params]; @@ -13603,7 +10590,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID) params:params]; @@ -13611,7 +10598,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID) params:params]; @@ -13619,7 +10606,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeEventListID) params:params]; @@ -13627,7 +10614,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID) params:params]; @@ -13635,7 +10622,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID) params:params]; @@ -13643,7 +10630,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID) params:params]; @@ -13655,12 +10642,11 @@ @implementation MTRClusterModeSelect - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13672,53 +10658,25 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeModeSelectID, + self.endpoint, (unsigned int) MTRClusterIDTypeModeSelectID, (unsigned int) MTRCommandIDTypeClusterModeSelectCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ModeSelect::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13736,7 +10694,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID) params:params]; @@ -13744,7 +10702,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeStandardNamespaceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID) params:params]; @@ -13752,7 +10710,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID) params:params]; @@ -13760,7 +10718,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID) params:params]; @@ -13768,7 +10726,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) params:params]; @@ -13785,7 +10743,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) value:dataValueDictionary @@ -13795,7 +10753,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) params:params]; @@ -13812,7 +10770,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) value:dataValueDictionary @@ -13822,7 +10780,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID) params:params]; @@ -13830,7 +10788,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) params:params]; @@ -13838,7 +10796,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) params:params]; @@ -13846,7 +10804,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) params:params]; @@ -13854,7 +10812,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID) params:params]; @@ -13862,7 +10820,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID) params:params]; @@ -13893,12 +10851,11 @@ @implementation MTRClusterLaundryWasherMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13911,54 +10868,26 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLaundryWasherModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeLaundryWasherModeID, (unsigned int) MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRLaundryWasherModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LaundryWasherModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LaundryWasherMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13976,7 +10905,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID) params:params]; @@ -13984,7 +10913,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID) params:params]; @@ -13992,7 +10921,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) params:params]; @@ -14009,7 +10938,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) value:dataValueDictionary @@ -14019,7 +10948,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) params:params]; @@ -14036,7 +10965,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) value:dataValueDictionary @@ -14046,7 +10975,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID) params:params]; @@ -14054,7 +10983,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID) params:params]; @@ -14062,7 +10991,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID) params:params]; @@ -14070,7 +10999,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID) params:params]; @@ -14078,7 +11007,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID) params:params]; @@ -14086,7 +11015,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID) params:params]; @@ -14098,12 +11027,11 @@ @implementation MTRClusterRefrigeratorAndTemperatureControlledCabinetMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14118,57 +11046,29 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID, (unsigned int) MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast( - bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + changeToModeWithParams:params + completion:^( + MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14187,7 +11087,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID) @@ -14197,7 +11097,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID) @@ -14207,7 +11107,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) @@ -14226,7 +11126,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) @@ -14238,7 +11138,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) params:params]; @@ -14256,7 +11156,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) value:dataValueDictionary @@ -14267,7 +11167,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID) @@ -14277,7 +11177,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID) @@ -14287,7 +11187,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID) params:params]; @@ -14296,7 +11196,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID) @@ -14306,7 +11206,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID) params:params]; @@ -14315,7 +11215,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID) @@ -14328,12 +11228,11 @@ @implementation MTRClusterLaundryWasherControls - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14341,7 +11240,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID) params:params]; @@ -14349,7 +11248,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) params:params]; @@ -14366,7 +11265,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) value:dataValueDictionary @@ -14376,7 +11275,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *) - (NSDictionary *)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) params:params]; @@ -14393,7 +11292,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) value:dataValueDictionary @@ -14403,7 +11302,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID) params:params]; @@ -14411,7 +11310,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID) params:params]; @@ -14419,7 +11318,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) params:params]; @@ -14427,7 +11326,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) params:params]; @@ -14435,7 +11334,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) params:params]; @@ -14443,7 +11342,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID) params:params]; @@ -14451,7 +11350,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID) params:params]; @@ -14463,12 +11362,11 @@ @implementation MTRClusterRVCRunMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14481,54 +11379,26 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCRunModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCRunModeID, (unsigned int) MTRCommandIDTypeClusterRVCRunModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCRunModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCRunModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcRunMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + changeToModeWithParams:params + completion:^(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14546,7 +11416,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID) params:params]; @@ -14554,7 +11424,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID) params:params]; @@ -14562,7 +11432,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeStartUpModeID) params:params]; @@ -14579,7 +11449,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeStartUpModeID) value:dataValueDictionary @@ -14589,7 +11459,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) params:params]; @@ -14606,7 +11476,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) value:dataValueDictionary @@ -14616,7 +11486,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID) params:params]; @@ -14624,7 +11494,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID) params:params]; @@ -14632,7 +11502,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID) params:params]; @@ -14640,7 +11510,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID) params:params]; @@ -14648,7 +11518,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID) params:params]; @@ -14656,7 +11526,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID) params:params]; @@ -14668,12 +11538,11 @@ @implementation MTRClusterRVCCleanMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14686,54 +11555,26 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCCleanModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCCleanModeID, (unsigned int) MTRCommandIDTypeClusterRVCCleanModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCCleanModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCCleanModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcCleanMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^( + MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14751,7 +11592,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID) params:params]; @@ -14759,7 +11600,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID) params:params]; @@ -14767,7 +11608,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeStartUpModeID) params:params]; @@ -14784,7 +11625,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeStartUpModeID) value:dataValueDictionary @@ -14794,7 +11635,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) params:params]; @@ -14811,7 +11652,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) value:dataValueDictionary @@ -14821,7 +11662,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID) params:params]; @@ -14829,7 +11670,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID) params:params]; @@ -14837,7 +11678,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID) params:params]; @@ -14845,7 +11686,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID) params:params]; @@ -14853,7 +11694,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID) params:params]; @@ -14861,7 +11702,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID) params:params]; @@ -14873,12 +11714,11 @@ @implementation MTRClusterTemperatureControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14890,62 +11730,25 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTemperatureControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeTemperatureControlID, (unsigned int) MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TemperatureControl::Commands::SetTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.targetTemperature != nil) { - auto & definedValue_0 = request.targetTemperature.Emplace(); - definedValue_0 = params.targetTemperature.shortValue; - } - if (params.targetTemperatureLevel != nil) { - auto & definedValue_0 = request.targetTemperatureLevel.Emplace(); - definedValue_0 = params.targetTemperatureLevel.unsignedCharValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14963,7 +11766,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID) params:params]; @@ -14971,7 +11774,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID) params:params]; @@ -14979,7 +11782,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID) params:params]; @@ -14987,7 +11790,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeStepWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeStepID) params:params]; @@ -14996,7 +11799,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) params:params]; @@ -15005,7 +11808,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID) params:params]; @@ -15013,7 +11816,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID) params:params]; @@ -15021,7 +11824,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) params:params]; @@ -15029,7 +11832,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) params:params]; @@ -15037,7 +11840,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) params:params]; @@ -15045,7 +11848,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID) params:params]; @@ -15053,7 +11856,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID) params:params]; @@ -15065,12 +11868,11 @@ @implementation MTRClusterRefrigeratorAlarm - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15078,7 +11880,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) params:params]; @@ -15086,7 +11888,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID) params:params]; @@ -15094,7 +11896,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID) params:params]; @@ -15102,7 +11904,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID) params:params]; @@ -15110,7 +11912,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) params:params]; @@ -15118,7 +11920,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) params:params]; @@ -15126,7 +11928,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) params:params]; @@ -15134,7 +11936,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID) params:params]; @@ -15142,7 +11944,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID) params:params]; @@ -15154,12 +11956,11 @@ @implementation MTRClusterDishwasherMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15172,54 +11973,26 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDishwasherModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeDishwasherModeID, (unsigned int) MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDishwasherModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DishwasherModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DishwasherMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^( + MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15237,7 +12010,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID) params:params]; @@ -15245,7 +12018,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID) params:params]; @@ -15253,7 +12026,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) params:params]; @@ -15270,7 +12043,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) value:dataValueDictionary @@ -15280,7 +12053,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) params:params]; @@ -15297,7 +12070,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) value:dataValueDictionary @@ -15307,7 +12080,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID) params:params]; @@ -15315,7 +12088,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID) params:params]; @@ -15323,7 +12096,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID) params:params]; @@ -15331,7 +12104,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID) params:params]; @@ -15339,7 +12112,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID) params:params]; @@ -15347,7 +12120,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID) params:params]; @@ -15359,12 +12132,11 @@ @implementation MTRClusterAirQuality - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15372,7 +12144,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAirQualityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID) params:params]; @@ -15380,7 +12152,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID) params:params]; @@ -15388,7 +12160,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) params:params]; @@ -15396,7 +12168,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) params:params]; @@ -15404,7 +12176,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) params:params]; @@ -15412,7 +12184,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID) params:params]; @@ -15420,7 +12192,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID) params:params]; @@ -15432,12 +12204,11 @@ @implementation MTRClusterSmokeCOAlarm - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15458,52 +12229,25 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeSmokeCOAlarmID, + self.endpoint, (unsigned int) MTRClusterIDTypeSmokeCOAlarmID, (unsigned int) MTRCommandIDTypeClusterSmokeCOAlarmCommandSelfTestRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - SmokeCoAlarm::Commands::SelfTestRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster selfTestRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15521,7 +12265,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeExpressedStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID) params:params]; @@ -15529,7 +12273,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeSmokeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID) params:params]; @@ -15537,7 +12281,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeCOStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID) params:params]; @@ -15545,7 +12289,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeBatteryAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID) params:params]; @@ -15553,7 +12297,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeDeviceMutedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID) params:params]; @@ -15561,7 +12305,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeTestInProgressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID) params:params]; @@ -15569,7 +12313,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeHardwareFaultAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID) params:params]; @@ -15577,7 +12321,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeEndOfServiceAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID) params:params]; @@ -15585,7 +12329,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeInterconnectSmokeAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID) params:params]; @@ -15593,7 +12337,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeInterconnectCOAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID) params:params]; @@ -15601,7 +12345,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID) params:params]; @@ -15609,7 +12353,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeSmokeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) params:params]; @@ -15628,7 +12372,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID) params:params]; @@ -15646,7 +12390,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID) params:params]; @@ -15654,7 +12398,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID) params:params]; @@ -15662,7 +12406,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) params:params]; @@ -15670,7 +12414,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) params:params]; @@ -15678,7 +12422,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID) params:params]; @@ -15686,7 +12430,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID) params:params]; @@ -15698,12 +12442,11 @@ @implementation MTRClusterDishwasherAlarm - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15715,53 +12458,25 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, + self.endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, (unsigned int) MTRCommandIDTypeClusterDishwasherAlarmCommandResetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DishwasherAlarm::Commands::Reset::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.alarms = static_cast>(params.alarms.unsignedIntValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15783,53 +12498,25 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, + self.endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, (unsigned int) MTRCommandIDTypeClusterDishwasherAlarmCommandModifyEnabledAlarmsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DishwasherAlarm::Commands::ModifyEnabledAlarms::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mask = static_cast>(params.mask.unsignedIntValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster modifyEnabledAlarmsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15847,7 +12534,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID) params:params]; @@ -15855,7 +12542,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID) params:params]; @@ -15863,7 +12550,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID) params:params]; @@ -15871,7 +12558,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID) params:params]; @@ -15879,7 +12566,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID) params:params]; @@ -15887,7 +12574,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID) params:params]; @@ -15895,7 +12582,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID) params:params]; @@ -15903,7 +12590,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID) params:params]; @@ -15911,7 +12598,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID) params:params]; @@ -15919,7 +12606,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID) params:params]; @@ -15931,12 +12618,11 @@ @implementation MTRClusterOperationalState - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15956,53 +12642,26 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Pause::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseWithParams:params + completion:^( + MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16032,53 +12691,26 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^( + MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16108,53 +12740,26 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandStartID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Start::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startWithParams:params + completion:^( + MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16184,53 +12789,26 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandResumeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Resume::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resumeWithParams:params + completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16248,7 +12826,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) params:params]; @@ -16256,7 +12834,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) params:params]; @@ -16264,7 +12842,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; @@ -16272,7 +12850,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; @@ -16280,7 +12858,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) params:params]; @@ -16288,7 +12866,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) params:params]; @@ -16296,7 +12874,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) params:params]; @@ -16304,7 +12882,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) params:params]; @@ -16312,7 +12890,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) params:params]; @@ -16320,7 +12898,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) params:params]; @@ -16328,7 +12906,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) params:params]; @@ -16336,7 +12914,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; @@ -16348,12 +12926,11 @@ @implementation MTRClusterRVCOperationalState - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -16373,53 +12950,26 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Pause::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16449,53 +12999,26 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16525,53 +13048,26 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandStartID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Start::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16601,53 +13097,26 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Resume::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resumeWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16665,7 +13134,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; @@ -16673,7 +13142,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; @@ -16681,7 +13150,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; @@ -16689,7 +13158,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; @@ -16697,7 +13166,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID) params:params]; @@ -16705,7 +13174,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID) params:params]; @@ -16713,7 +13182,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID) params:params]; @@ -16721,7 +13190,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID) params:params]; @@ -16729,7 +13198,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID) params:params]; @@ -16737,7 +13206,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID) params:params]; @@ -16745,7 +13214,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID) params:params]; @@ -16753,7 +13222,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID) params:params]; @@ -16765,12 +13234,11 @@ @implementation MTRClusterHEPAFilterMonitoring - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -16791,52 +13259,25 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeHEPAFilterMonitoringID, + self.endpoint, (unsigned int) MTRClusterIDTypeHEPAFilterMonitoringID, (unsigned int) MTRCommandIDTypeClusterHEPAFilterMonitoringCommandResetConditionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - HepaFilterMonitoring::Commands::ResetCondition::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetConditionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16854,7 +13295,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID) params:params]; @@ -16862,7 +13303,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeDegradationDirectionID) params:params]; @@ -16870,7 +13311,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeChangeIndicationID) params:params]; @@ -16878,7 +13319,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeInPlaceIndicatorID) params:params]; @@ -16886,7 +13327,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) params:params]; @@ -16903,7 +13344,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) value:dataValueDictionary @@ -16914,7 +13355,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeReplacementProductListID) params:params]; @@ -16922,7 +13363,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeGeneratedCommandListID) params:params]; @@ -16930,7 +13371,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAcceptedCommandListID) params:params]; @@ -16938,7 +13379,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeEventListID) params:params]; @@ -16946,7 +13387,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAttributeListID) params:params]; @@ -16954,7 +13395,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeFeatureMapID) params:params]; @@ -16962,7 +13403,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeClusterRevisionID) params:params]; @@ -16974,12 +13415,11 @@ @implementation MTRClusterActivatedCarbonFilterMonitoring - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -17000,52 +13440,25 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActivatedCarbonFilterMonitoringID, + self.endpoint, (unsigned int) MTRClusterIDTypeActivatedCarbonFilterMonitoringID, (unsigned int) MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetConditionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17063,7 +13476,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeConditionID) params:params]; @@ -17072,7 +13485,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeDegradationDirectionID) params:params]; @@ -17081,7 +13494,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeChangeIndicationID) params:params]; @@ -17090,7 +13503,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeInPlaceIndicatorID) params:params]; @@ -17099,7 +13512,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeLastChangedTimeID) params:params]; @@ -17116,7 +13529,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeLastChangedTimeID) value:dataValueDictionary @@ -17127,7 +13540,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeReplacementProductListID) params:params]; @@ -17136,7 +13549,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeGeneratedCommandListID) params:params]; @@ -17145,7 +13558,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAcceptedCommandListID) params:params]; @@ -17153,7 +13566,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeEventListID) params:params]; @@ -17162,7 +13575,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAttributeListID) params:params]; @@ -17170,7 +13583,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID) params:params]; @@ -17179,7 +13592,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID) params:params]; @@ -17191,12 +13604,11 @@ @implementation MTRClusterDoorLock - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -17208,61 +13620,25 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandLockDoorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::LockDoor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster lockDoorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17284,61 +13660,25 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockDoorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnlockDoor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unlockDoorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17360,60 +13700,25 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockWithTimeoutID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnlockWithTimeout::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.timeout = params.timeout.unsignedShortValue; - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unlockWithTimeoutWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17435,60 +13740,25 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetWeekDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.daysMask - = static_cast>(params.daysMask.unsignedCharValue); - request.startHour = params.startHour.unsignedCharValue; - request.startMinute = params.startMinute.unsignedCharValue; - request.endHour = params.endHour.unsignedCharValue; - request.endMinute = params.endMinute.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17511,55 +13781,26 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetWeekDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetWeekDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getWeekDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17581,54 +13822,25 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearWeekDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17650,56 +13862,25 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetYearDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17722,55 +13903,26 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetYearDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetYearDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17792,54 +13944,25 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearYearDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17861,57 +13984,25 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - request.operatingMode - = static_cast>(params.operatingMode.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17934,54 +14025,26 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetHolidayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getHolidayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18003,53 +14066,25 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearHolidayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18071,91 +14106,25 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetUserID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.userIndex = params.userIndex.unsignedShortValue; - if (params.userName == nil) { - request.userName.SetNull(); - } else { - auto & nonNullValue_0 = request.userName.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.userName]; - } - if (params.userUniqueID == nil) { - request.userUniqueID.SetNull(); - } else { - auto & nonNullValue_0 = request.userUniqueID.SetNonNull(); - nonNullValue_0 = params.userUniqueID.unsignedIntValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userType.unsignedCharValue); - } - if (params.credentialRule == nil) { - request.credentialRule.SetNull(); - } else { - auto & nonNullValue_0 = request.credentialRule.SetNonNull(); - nonNullValue_0 - = static_cast>(params.credentialRule.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setUserWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18177,53 +14146,25 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetUserID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetUserResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetUserResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18245,56 +14186,25 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearUserID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearUserWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18317,83 +14227,26 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetCredentialID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterSetCredentialResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterSetCredentialResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetCredential::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.credential.credentialType - = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - request.credentialData = [self asByteSpan:params.credentialData]; - if (params.userIndex == nil) { - request.userIndex.SetNull(); - } else { - auto & nonNullValue_0 = request.userIndex.SetNonNull(); - nonNullValue_0 = params.userIndex.unsignedShortValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userType.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + setCredentialWithParams:params + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18416,57 +14269,26 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetCredentialStatusResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetCredentialStatus::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.credential.credentialType - = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18488,63 +14310,25 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearCredentialID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearCredential::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params.credential == nil) { - request.credential.SetNull(); - } else { - auto & nonNullValue_0 = request.credential.SetNonNull(); - nonNullValue_0.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18566,61 +14350,25 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnboltDoor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unboltDoorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18638,7 +14386,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) params:params]; @@ -18646,7 +14394,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeLockTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID) params:params]; @@ -18654,7 +14402,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeActuatorEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID) params:params]; @@ -18662,7 +14410,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeDoorStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID) params:params]; @@ -18670,7 +14418,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeDoorOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) params:params]; @@ -18687,7 +14435,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) value:dataValueDictionary @@ -18697,7 +14445,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeDoorClosedEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) params:params]; @@ -18714,7 +14462,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) value:dataValueDictionary @@ -18724,7 +14472,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *) - (NSDictionary *)readAttributeOpenPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) params:params]; @@ -18741,7 +14489,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) value:dataValueDictionary @@ -18751,7 +14499,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfTotalUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID) params:params]; @@ -18759,7 +14507,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfPINUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID) params:params]; @@ -18767,7 +14515,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfRFIDUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) params:params]; @@ -18776,7 +14524,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) params:params]; @@ -18785,7 +14533,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) params:params]; @@ -18793,7 +14541,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) params:params]; @@ -18801,7 +14549,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMaxPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID) params:params]; @@ -18809,7 +14557,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMinPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID) params:params]; @@ -18817,7 +14565,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMaxRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID) params:params]; @@ -18825,7 +14573,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMinRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID) params:params]; @@ -18833,7 +14581,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeCredentialRulesSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID) params:params]; @@ -18842,7 +14590,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) params:params]; @@ -18850,7 +14598,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeLanguageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) params:params]; @@ -18867,7 +14615,7 @@ - (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) value:dataValueDictionary @@ -18877,7 +14625,7 @@ - (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLEDSettingsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) params:params]; @@ -18894,7 +14642,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) value:dataValueDictionary @@ -18904,7 +14652,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAutoRelockTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) params:params]; @@ -18921,7 +14669,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) value:dataValueDictionary @@ -18931,7 +14679,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSoundVolumeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) params:params]; @@ -18948,7 +14696,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) value:dataValueDictionary @@ -18958,7 +14706,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) params:params]; @@ -18975,7 +14723,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) value:dataValueDictionary @@ -18985,7 +14733,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeSupportedOperatingModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSupportedOperatingModesID) params:params]; @@ -18993,7 +14741,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeDefaultConfigurationRegisterWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDefaultConfigurationRegisterID) params:params]; @@ -19001,7 +14749,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeEnableLocalProgrammingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableLocalProgrammingID) params:params]; @@ -19020,7 +14768,7 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSDictionary *)readAttributeEnableOneTouchLockingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableOneTouchLockingID) params:params]; @@ -19049,7 +14797,7 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSDictionary *)readAttributeEnableInsideStatusLEDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableInsideStatusLEDID) params:params]; @@ -19078,7 +14826,7 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSDictionary *)readAttributeEnablePrivacyModeButtonWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnablePrivacyModeButtonID) params:params]; @@ -19107,7 +14855,7 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSDictionary *)readAttributeLocalProgrammingFeaturesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLocalProgrammingFeaturesID) params:params]; @@ -19136,7 +14884,7 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSDictionary *)readAttributeWrongCodeEntryLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) params:params]; @@ -19163,7 +14911,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) value:dataValueDictionary @@ -19173,7 +14921,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSDictionary - (NSDictionary *)readAttributeUserCodeTemporaryDisableTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeUserCodeTemporaryDisableTimeID) params:params]; @@ -19192,7 +14940,7 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSDictionary *)readAttributeSendPINOverTheAirWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) params:params]; @@ -19219,7 +14967,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) value:dataValueDictionary @@ -19229,7 +14977,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSDictionary * - (NSDictionary *)readAttributeRequirePINforRemoteOperationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeRequirePINforRemoteOperationID) params:params]; @@ -19248,7 +14996,7 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSDictionary *)readAttributeExpiringUserTimeoutWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) params:params]; @@ -19275,7 +15023,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) value:dataValueDictionary @@ -19285,7 +15033,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeGeneratedCommandListID) params:params]; @@ -19293,7 +15041,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID) params:params]; @@ -19301,7 +15049,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEventListID) params:params]; @@ -19309,7 +15057,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID) params:params]; @@ -19317,7 +15065,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeFeatureMapID) params:params]; @@ -19325,7 +15073,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeClusterRevisionID) params:params]; @@ -19554,12 +15302,11 @@ @implementation MTRClusterWindowCovering - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -19577,52 +15324,25 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandUpOrOpenID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::UpOrOpen::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster upOrOpenWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19653,52 +15373,25 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandDownOrCloseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::DownOrClose::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster downOrCloseWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19729,52 +15422,25 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandStopMotionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::StopMotion::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopMotionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19796,53 +15462,25 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToLiftValueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToLiftValue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.liftValue = params.liftValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToLiftValueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19864,53 +15502,25 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToLiftPercentageID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToLiftPercentage::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19932,53 +15542,25 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltValueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToTiltValue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.tiltValue = params.tiltValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToTiltValueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20000,53 +15582,25 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltPercentageID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToTiltPercentage::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20064,7 +15618,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTypeID) params:params]; @@ -20072,7 +15626,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributePhysicalClosedLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitLiftID) params:params]; @@ -20080,7 +15634,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributePhysicalClosedLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitTiltID) params:params]; @@ -20088,7 +15642,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftID) params:params]; @@ -20096,7 +15650,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltID) params:params]; @@ -20104,7 +15658,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeNumberOfActuationsLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsLiftID) params:params]; @@ -20112,7 +15666,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeNumberOfActuationsTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsTiltID) params:params]; @@ -20120,7 +15674,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeConfigStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeConfigStatusID) params:params]; @@ -20129,7 +15683,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionLiftPercentageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercentageID) params:params]; @@ -20138,7 +15692,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionTiltPercentageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercentageID) params:params]; @@ -20146,7 +15700,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeOperationalStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeOperationalStatusID) params:params]; @@ -20155,7 +15709,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeTargetPositionLiftPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionLiftPercent100thsID) params:params]; @@ -20164,7 +15718,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeTargetPositionTiltPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionTiltPercent100thsID) params:params]; @@ -20172,7 +15726,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeEndProductTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEndProductTypeID) params:params]; @@ -20181,7 +15735,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionLiftPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercent100thsID) params:params]; @@ -20190,7 +15744,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionTiltPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercent100thsID) params:params]; @@ -20198,7 +15752,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledOpenLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitLiftID) params:params]; @@ -20206,7 +15760,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledClosedLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitLiftID) params:params]; @@ -20214,7 +15768,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledOpenLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitTiltID) params:params]; @@ -20222,7 +15776,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledClosedLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitTiltID) params:params]; @@ -20230,7 +15784,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) params:params]; @@ -20247,7 +15801,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) value:dataValueDictionary @@ -20257,7 +15811,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeSafetyStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeSafetyStatusID) params:params]; @@ -20265,7 +15819,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeGeneratedCommandListID) params:params]; @@ -20273,7 +15827,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID) params:params]; @@ -20281,7 +15835,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID) params:params]; @@ -20289,7 +15843,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID) params:params]; @@ -20297,7 +15851,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID) params:params]; @@ -20305,7 +15859,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeClusterRevisionID) params:params]; @@ -20423,12 +15977,11 @@ @implementation MTRClusterBarrierControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -20440,53 +15993,25 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, (unsigned int) MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BarrierControl::Commands::BarrierControlGoToPercent::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.percentOpen = params.percentOpen.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster barrierControlGoToPercentWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20517,52 +16042,25 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, (unsigned int) MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BarrierControl::Commands::BarrierControlStop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster barrierControlStopWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20580,7 +16078,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID) params:params]; @@ -20588,7 +16086,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierSafetyStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID) params:params]; @@ -20596,7 +16094,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierCapabilitiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID) params:params]; @@ -20604,7 +16102,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) params:params]; @@ -20621,7 +16119,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) value:dataValueDictionary @@ -20631,7 +16129,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary * - (NSDictionary *)readAttributeBarrierCloseEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) params:params]; @@ -20648,7 +16146,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) value:dataValueDictionary @@ -20658,7 +16156,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary - (NSDictionary *)readAttributeBarrierCommandOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID) params:params]; @@ -20677,7 +16175,7 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)readAttributeBarrierCommandCloseEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID) params:params]; @@ -20706,7 +16204,7 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)readAttributeBarrierOpenPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) params:params]; @@ -20733,7 +16231,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) value:dataValueDictionary @@ -20743,7 +16241,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary * - (NSDictionary *)readAttributeBarrierClosePeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) params:params]; @@ -20760,7 +16258,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) value:dataValueDictionary @@ -20770,7 +16268,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeBarrierPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID) params:params]; @@ -20778,7 +16276,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID) params:params]; @@ -20786,7 +16284,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID) params:params]; @@ -20794,7 +16292,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeEventListID) params:params]; @@ -20802,7 +16300,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID) params:params]; @@ -20810,7 +16308,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID) params:params]; @@ -20818,7 +16316,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID) params:params]; @@ -20868,12 +16366,11 @@ @implementation MTRClusterPumpConfigurationAndControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -20881,7 +16378,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxPressureID) params:params]; @@ -20889,7 +16386,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxSpeedID) params:params]; @@ -20897,7 +16394,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxFlowID) params:params]; @@ -20906,7 +16403,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstPressureID) params:params]; @@ -20915,7 +16412,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstPressureID) params:params]; @@ -20924,7 +16421,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinCompPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinCompPressureID) params:params]; @@ -20933,7 +16430,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxCompPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxCompPressureID) params:params]; @@ -20941,7 +16438,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstSpeedID) params:params]; @@ -20949,7 +16446,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstSpeedID) params:params]; @@ -20957,7 +16454,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstFlowID) params:params]; @@ -20965,7 +16462,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstFlowID) params:params]; @@ -20973,7 +16470,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstTempWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstTempID) params:params]; @@ -20981,7 +16478,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstTempWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstTempID) params:params]; @@ -20989,7 +16486,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePumpStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePumpStatusID) params:params]; @@ -20998,7 +16495,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEffectiveOperationModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID) params:params]; @@ -21007,7 +16504,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEffectiveControlModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveControlModeID) params:params]; @@ -21015,7 +16512,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeCapacityID) params:params]; @@ -21023,7 +16520,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeSpeedID) params:params]; @@ -21032,7 +16529,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLifetimeRunningHoursWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeRunningHoursID) params:params]; @@ -21049,7 +16546,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSDictionary *)readAttributePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePowerID) params:params]; @@ -21068,7 +16565,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSDictionary *)readAttributeLifetimeEnergyConsumedWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeEnergyConsumedID) params:params]; @@ -21088,7 +16585,7 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSDictionary *)readAttributeOperationModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) params:params]; @@ -21115,7 +16612,7 @@ - (void)writeAttributeOperationModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) value:dataValueDictionary @@ -21125,7 +16622,7 @@ - (void)writeAttributeOperationModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeControlModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) params:params]; @@ -21142,7 +16639,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) value:dataValueDictionary @@ -21153,7 +16650,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeGeneratedCommandListID) params:params]; @@ -21162,7 +16659,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID) params:params]; @@ -21170,7 +16667,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID) params:params]; @@ -21178,7 +16675,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID) params:params]; @@ -21186,7 +16683,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeFeatureMapID) params:params]; @@ -21195,7 +16692,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeClusterRevisionID) params:params]; @@ -21216,12 +16713,11 @@ @implementation MTRClusterThermostat - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -21233,54 +16729,25 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandSetpointRaiseLowerID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::SetpointRaiseLower::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mode = static_cast>(params.mode.unsignedCharValue); - request.amount = params.amount.charValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setpointRaiseLowerWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21302,91 +16769,25 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandSetWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::SetWeeklySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; - request.dayOfWeekForSequence = static_cast>( - params.dayOfWeekForSequence.unsignedCharValue); - request.modeForSequence = static_cast>( - params.modeForSequence.unsignedCharValue); - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.transitions.count != 0) { - auto * listHolder_0 = new ListHolder(params.transitions.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.transitions.count; ++i_0) { - if (![params.transitions[i_0] isKindOfClass:[MTRThermostatClusterThermostatScheduleTransition class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRThermostatClusterThermostatScheduleTransition *) params.transitions[i_0]; - listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; - if (element_0.heatSetpoint == nil) { - listHolder_0->mList[i_0].heatSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); - nonNullValue_2 = element_0.heatSetpoint.shortValue; - } - if (element_0.coolSetpoint == nil) { - listHolder_0->mList[i_0].coolSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); - nonNullValue_2 = element_0.coolSetpoint.shortValue; - } - } - request.transitions = ListType_0(listHolder_0->mList, params.transitions.count); - } else { - request.transitions = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setWeeklyScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21409,57 +16810,26 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatClusterGetWeeklyScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::GetWeeklySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.daysToReturn - = static_cast>(params.daysToReturn.unsignedCharValue); - request.modeToReturn - = static_cast>(params.modeToReturn.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getWeeklyScheduleWithParams:params + completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21490,52 +16860,25 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandClearWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::ClearWeeklySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearWeeklyScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21553,7 +16896,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureID) params:params]; @@ -21561,7 +16904,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeOutdoorTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOutdoorTemperatureID) params:params]; @@ -21569,7 +16912,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupancyID) params:params]; @@ -21577,7 +16920,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMinHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinHeatSetpointLimitID) params:params]; @@ -21585,7 +16928,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMaxHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxHeatSetpointLimitID) params:params]; @@ -21593,7 +16936,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMinCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinCoolSetpointLimitID) params:params]; @@ -21601,7 +16944,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMaxCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxCoolSetpointLimitID) params:params]; @@ -21609,7 +16952,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributePICoolingDemandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePICoolingDemandID) params:params]; @@ -21617,7 +16960,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributePIHeatingDemandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID) params:params]; @@ -21625,7 +16968,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeHVACSystemTypeConfigurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID) params:params]; @@ -21644,7 +16987,7 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)readAttributeLocalTemperatureCalibrationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID) params:params]; @@ -21673,7 +17016,7 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSDictionary *)readAttributeOccupiedCoolingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedCoolingSetpointID) params:params]; @@ -21702,7 +17045,7 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSDictionary *)readAttributeOccupiedHeatingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedHeatingSetpointID) params:params]; @@ -21731,7 +17074,7 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSDictionary *)readAttributeUnoccupiedCoolingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedCoolingSetpointID) params:params]; @@ -21760,7 +17103,7 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSDictionary *)readAttributeUnoccupiedHeatingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedHeatingSetpointID) params:params]; @@ -21789,7 +17132,7 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSDictionary *)readAttributeMinHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinHeatSetpointLimitID) params:params]; @@ -21816,7 +17159,7 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSDictionary *)readAttributeMaxHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxHeatSetpointLimitID) params:params]; @@ -21843,7 +17186,7 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSDictionary *)readAttributeMinCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinCoolSetpointLimitID) params:params]; @@ -21870,7 +17213,7 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSDictionary *)readAttributeMaxCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxCoolSetpointLimitID) params:params]; @@ -21897,7 +17240,7 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSDictionary *)readAttributeMinSetpointDeadBandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) params:params]; @@ -21924,7 +17267,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) value:dataValueDictionary @@ -21934,7 +17277,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSDictionary - (NSDictionary *)readAttributeRemoteSensingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) params:params]; @@ -21951,7 +17294,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) value:dataValueDictionary @@ -21961,7 +17304,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeControlSequenceOfOperationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeControlSequenceOfOperationID) params:params]; @@ -21980,7 +17323,7 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSDictionary *)readAttributeSystemModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) params:params]; @@ -22007,7 +17350,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) value:dataValueDictionary @@ -22017,7 +17360,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeThermostatRunningModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningModeID) params:params]; @@ -22025,7 +17368,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeStartOfWeekWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeStartOfWeekID) params:params]; @@ -22033,7 +17376,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfWeeklyTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfWeeklyTransitionsID) params:params]; @@ -22041,7 +17384,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfDailyTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfDailyTransitionsID) params:params]; @@ -22049,7 +17392,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeTemperatureSetpointHoldWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldID) params:params]; @@ -22068,7 +17411,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSDictionary *)readAttributeTemperatureSetpointHoldDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldDurationID) params:params]; @@ -22097,7 +17440,7 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSDictionary *)readAttributeThermostatProgrammingOperationModeWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) params:params]; @@ -22127,7 +17470,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) value:dataValueDictionary @@ -22137,7 +17480,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeThermostatRunningStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningStateID) params:params]; @@ -22145,7 +17488,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeSetpointChangeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceID) params:params]; @@ -22153,7 +17496,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeSetpointChangeAmountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeAmountID) params:params]; @@ -22161,7 +17504,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeSetpointChangeSourceTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceTimestampID) params:params]; @@ -22169,7 +17512,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeOccupiedSetbackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) params:params]; @@ -22186,7 +17529,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) value:dataValueDictionary @@ -22196,7 +17539,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeOccupiedSetbackMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMinID) params:params]; @@ -22204,7 +17547,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeOccupiedSetbackMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMaxID) params:params]; @@ -22212,7 +17555,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeUnoccupiedSetbackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) params:params]; @@ -22229,7 +17572,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) value:dataValueDictionary @@ -22239,7 +17582,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * - (NSDictionary *)readAttributeUnoccupiedSetbackMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMinID) params:params]; @@ -22247,7 +17590,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * - (NSDictionary *)readAttributeUnoccupiedSetbackMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMaxID) params:params]; @@ -22255,7 +17598,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * - (NSDictionary *)readAttributeEmergencyHeatDeltaWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) params:params]; @@ -22272,7 +17615,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) value:dataValueDictionary @@ -22282,7 +17625,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSDictionary - (NSDictionary *)readAttributeACTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) params:params]; @@ -22299,7 +17642,7 @@ - (void)writeAttributeACTypeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) value:dataValueDictionary @@ -22309,7 +17652,7 @@ - (void)writeAttributeACTypeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeACCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) params:params]; @@ -22326,7 +17669,7 @@ - (void)writeAttributeACCapacityWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) value:dataValueDictionary @@ -22336,7 +17679,7 @@ - (void)writeAttributeACCapacityWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeACRefrigerantTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) params:params]; @@ -22353,7 +17696,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) value:dataValueDictionary @@ -22363,7 +17706,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSDictionary * - (NSDictionary *)readAttributeACCompressorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) params:params]; @@ -22380,7 +17723,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) value:dataValueDictionary @@ -22390,7 +17733,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACErrorCodeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) params:params]; @@ -22407,7 +17750,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) value:dataValueDictionary @@ -22417,7 +17760,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeACLouverPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) params:params]; @@ -22434,7 +17777,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) value:dataValueDictionary @@ -22444,7 +17787,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACCoilTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCoilTemperatureID) params:params]; @@ -22452,7 +17795,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACCapacityformatWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) params:params]; @@ -22469,7 +17812,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) value:dataValueDictionary @@ -22479,7 +17822,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID) params:params]; @@ -22487,7 +17830,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID) params:params]; @@ -22495,7 +17838,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEventListID) params:params]; @@ -22503,7 +17846,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAttributeListID) params:params]; @@ -22511,7 +17854,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeFeatureMapID) params:params]; @@ -22519,7 +17862,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeClusterRevisionID) params:params]; @@ -22594,12 +17937,11 @@ @implementation MTRClusterFanControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -22611,62 +17953,25 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeFanControlID, (unsigned int) MTRCommandIDTypeClusterFanControlCommandStepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - FanControl::Commands::Step::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.direction - = static_cast>(params.direction.unsignedCharValue); - if (params.wrap != nil) { - auto & definedValue_0 = request.wrap.Emplace(); - definedValue_0 = params.wrap.boolValue; - } - if (params.lowestOff != nil) { - auto & definedValue_0 = request.lowestOff.Emplace(); - definedValue_0 = params.lowestOff.boolValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -22684,7 +17989,7 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params - (NSDictionary *)readAttributeFanModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) params:params]; @@ -22701,7 +18006,7 @@ - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) value:dataValueDictionary @@ -22711,7 +18016,7 @@ - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeFanModeSequenceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) params:params]; @@ -22728,7 +18033,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) value:dataValueDictionary @@ -22738,7 +18043,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSDictionary *)d - (NSDictionary *)readAttributePercentSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) params:params]; @@ -22755,7 +18060,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) value:dataValueDictionary @@ -22765,7 +18070,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da - (NSDictionary *)readAttributePercentCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentCurrentID) params:params]; @@ -22773,7 +18078,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSpeedMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedMaxID) params:params]; @@ -22781,7 +18086,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSpeedSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) params:params]; @@ -22798,7 +18103,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) value:dataValueDictionary @@ -22808,7 +18113,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedCurrentID) params:params]; @@ -22816,7 +18121,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeRockSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSupportID) params:params]; @@ -22824,7 +18129,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeRockSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) params:params]; @@ -22841,7 +18146,7 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) value:dataValueDictionary @@ -22851,7 +18156,7 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWindSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSupportID) params:params]; @@ -22859,7 +18164,7 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWindSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) params:params]; @@ -22876,7 +18181,7 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) value:dataValueDictionary @@ -22886,7 +18191,7 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAirflowDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) params:params]; @@ -22903,7 +18208,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) value:dataValueDictionary @@ -22913,7 +18218,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeGeneratedCommandListID) params:params]; @@ -22921,7 +18226,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID) params:params]; @@ -22929,7 +18234,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeEventListID) params:params]; @@ -22937,7 +18242,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAttributeListID) params:params]; @@ -22945,7 +18250,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFeatureMapID) params:params]; @@ -22953,7 +18258,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeClusterRevisionID) params:params]; @@ -22974,12 +18279,11 @@ @implementation MTRClusterThermostatUserInterfaceConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -22988,7 +18292,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeTemperatureDisplayModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID: @(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeTemperatureDisplayModeID) @@ -23009,7 +18313,7 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSDictionary *)readAttributeKeypadLockoutWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) params:params]; @@ -23039,7 +18343,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) value:dataValueDictionary @@ -23050,7 +18354,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeScheduleProgrammingVisibilityWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID: @(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeScheduleProgrammingVisibilityID) @@ -23071,7 +18375,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeGeneratedCommandListID) params:params]; @@ -23092,7 +18396,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID) params:params]; @@ -23101,7 +18405,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID) params:params]; @@ -23110,7 +18414,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID) params:params]; @@ -23119,7 +18423,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeFeatureMapID) params:params]; @@ -23128,7 +18432,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeClusterRevisionID) params:params]; @@ -23149,12 +18453,11 @@ @implementation MTRClusterColorControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -23166,58 +18469,25 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.hue = params.hue.unsignedCharValue; - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23239,57 +18509,25 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23311,58 +18549,25 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23384,56 +18589,25 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23455,57 +18629,25 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23527,58 +18669,25 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23600,57 +18709,25 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToHueAndSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToHueAndSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.hue = params.hue.unsignedCharValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToHueAndSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23672,57 +18749,25 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToColorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToColor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.colorX = params.colorX.unsignedShortValue; - request.colorY = params.colorY.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToColorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23744,56 +18789,25 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveColorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveColor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.rateX = params.rateX.shortValue; - request.rateY = params.rateY.shortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveColorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23815,57 +18829,25 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepColorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepColor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepX = params.stepX.shortValue; - request.stepY = params.stepY.shortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepColorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23887,56 +18869,25 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.colorTemperatureMireds = params.colorTemperatureMireds.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23958,58 +18909,25 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveToHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedMoveToHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24031,57 +18949,25 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedMoveHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24103,58 +18989,25 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedStepHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedStepHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedStepHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24176,57 +19029,25 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveToHueAndSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedMoveToHueAndSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24248,61 +19069,25 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandColorLoopSetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::ColorLoopSet::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateFlags - = static_cast>(params.updateFlags.unsignedCharValue); - request.action = static_cast>(params.action.unsignedCharValue); - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.time = params.time.unsignedShortValue; - request.startHue = params.startHue.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster colorLoopSetWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24324,54 +19109,25 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStopMoveStepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StopMoveStep::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopMoveStepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24393,59 +19149,25 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; - request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24467,60 +19189,25 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; - request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24538,7 +19225,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentHueID) params:params]; @@ -24546,7 +19233,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentSaturationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentSaturationID) params:params]; @@ -24554,7 +19241,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeRemainingTimeID) params:params]; @@ -24562,7 +19249,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentXID) params:params]; @@ -24570,7 +19257,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentYID) params:params]; @@ -24578,7 +19265,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeDriftCompensationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeDriftCompensationID) params:params]; @@ -24586,7 +19273,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCompensationTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCompensationTextID) params:params]; @@ -24594,7 +19281,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTemperatureMiredsID) params:params]; @@ -24602,7 +19289,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeColorModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorModeID) params:params]; @@ -24610,7 +19297,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) params:params]; @@ -24627,7 +19314,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) value:dataValueDictionary @@ -24637,7 +19324,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeNumberOfPrimariesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeNumberOfPrimariesID) params:params]; @@ -24645,7 +19332,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary1XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1XID) params:params]; @@ -24653,7 +19340,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary1YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1YID) params:params]; @@ -24661,7 +19348,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary1IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1IntensityID) params:params]; @@ -24669,7 +19356,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary2XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2XID) params:params]; @@ -24677,7 +19364,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary2YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2YID) params:params]; @@ -24685,7 +19372,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary2IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2IntensityID) params:params]; @@ -24693,7 +19380,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary3XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3XID) params:params]; @@ -24701,7 +19388,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary3YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3YID) params:params]; @@ -24709,7 +19396,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary3IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3IntensityID) params:params]; @@ -24717,7 +19404,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary4XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4XID) params:params]; @@ -24725,7 +19412,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary4YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4YID) params:params]; @@ -24733,7 +19420,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary4IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4IntensityID) params:params]; @@ -24741,7 +19428,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary5XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5XID) params:params]; @@ -24749,7 +19436,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary5YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5YID) params:params]; @@ -24757,7 +19444,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary5IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5IntensityID) params:params]; @@ -24765,7 +19452,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary6XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6XID) params:params]; @@ -24773,7 +19460,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary6YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6YID) params:params]; @@ -24781,7 +19468,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary6IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6IntensityID) params:params]; @@ -24789,7 +19476,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeWhitePointXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) params:params]; @@ -24806,7 +19493,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) value:dataValueDictionary @@ -24816,7 +19503,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWhitePointYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) params:params]; @@ -24833,7 +19520,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) value:dataValueDictionary @@ -24843,7 +19530,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeColorPointRXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) params:params]; @@ -24860,7 +19547,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) value:dataValueDictionary @@ -24870,7 +19557,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointRYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) params:params]; @@ -24887,7 +19574,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) value:dataValueDictionary @@ -24897,7 +19584,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointRIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID) params:params]; @@ -24914,7 +19601,7 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSDictionary *)readAttributeColorPointGXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) params:params]; @@ -24941,7 +19628,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) value:dataValueDictionary @@ -24951,7 +19638,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointGYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) params:params]; @@ -24968,7 +19655,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) value:dataValueDictionary @@ -24978,7 +19665,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointGIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID) params:params]; @@ -24995,7 +19682,7 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSDictionary *)readAttributeColorPointBXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) params:params]; @@ -25022,7 +19709,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) value:dataValueDictionary @@ -25032,7 +19719,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointBYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) params:params]; @@ -25049,7 +19736,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) value:dataValueDictionary @@ -25059,7 +19746,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointBIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID) params:params]; @@ -25076,7 +19763,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeEnhancedCurrentHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedCurrentHueID) params:params]; @@ -25094,7 +19781,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeEnhancedColorModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedColorModeID) params:params]; @@ -25102,7 +19789,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopActiveWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopActiveID) params:params]; @@ -25110,7 +19797,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopDirectionID) params:params]; @@ -25118,7 +19805,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopTimeID) params:params]; @@ -25126,7 +19813,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopStartEnhancedHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStartEnhancedHueID) params:params]; @@ -25134,7 +19821,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopStoredEnhancedHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStoredEnhancedHueID) params:params]; @@ -25142,7 +19829,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorCapabilitiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorCapabilitiesID) params:params]; @@ -25150,7 +19837,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorTempPhysicalMinMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMinMiredsID) params:params]; @@ -25158,7 +19845,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorTempPhysicalMaxMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMaxMiredsID) params:params]; @@ -25167,7 +19854,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID) params:params]; @@ -25175,7 +19862,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeStartUpColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID) params:params]; @@ -25194,7 +19881,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeGeneratedCommandListID) params:params]; @@ -25212,7 +19899,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID) params:params]; @@ -25220,7 +19907,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEventListID) params:params]; @@ -25228,7 +19915,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAttributeListID) params:params]; @@ -25236,7 +19923,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID) params:params]; @@ -25244,7 +19931,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeClusterRevisionID) params:params]; @@ -25455,12 +20142,11 @@ @implementation MTRClusterBallastConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -25468,7 +20154,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePhysicalMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMinLevelID) params:params]; @@ -25476,7 +20162,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePhysicalMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMaxLevelID) params:params]; @@ -25484,7 +20170,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBallastStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastStatusID) params:params]; @@ -25492,7 +20178,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) params:params]; @@ -25509,7 +20195,7 @@ - (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) value:dataValueDictionary @@ -25519,7 +20205,7 @@ - (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) params:params]; @@ -25536,7 +20222,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) value:dataValueDictionary @@ -25547,7 +20233,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeIntrinsicBallastFactorWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBallastFactorID) params:params]; @@ -25566,7 +20252,7 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSDictionary *)readAttributeBallastFactorAdjustmentWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID) params:params]; @@ -25596,7 +20282,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)readAttributeLampQuantityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampQuantityID) params:params]; @@ -25614,7 +20300,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)readAttributeLampTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) params:params]; @@ -25631,7 +20317,7 @@ - (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) value:dataValueDictionary @@ -25641,7 +20327,7 @@ - (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLampManufacturerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) params:params]; @@ -25658,7 +20344,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) value:dataValueDictionary @@ -25668,7 +20354,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLampRatedHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) params:params]; @@ -25685,7 +20371,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) value:dataValueDictionary @@ -25695,7 +20381,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeLampBurnHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) params:params]; @@ -25712,7 +20398,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) value:dataValueDictionary @@ -25722,7 +20408,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeLampAlarmModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) params:params]; @@ -25739,7 +20425,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) value:dataValueDictionary @@ -25750,7 +20436,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeLampBurnHoursTripPointWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID) params:params]; @@ -25769,7 +20455,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeGeneratedCommandListID) params:params]; @@ -25787,7 +20473,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID) params:params]; @@ -25795,7 +20481,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID) params:params]; @@ -25803,7 +20489,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID) params:params]; @@ -25811,7 +20497,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeFeatureMapID) params:params]; @@ -25819,7 +20505,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeClusterRevisionID) params:params]; @@ -25857,12 +20543,11 @@ @implementation MTRClusterIlluminanceMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -25870,7 +20555,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMeasuredValueID) params:params]; @@ -25878,7 +20563,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMinMeasuredValueID) params:params]; @@ -25886,7 +20571,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -25894,7 +20579,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeToleranceID) params:params]; @@ -25902,7 +20587,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLightSensorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeLightSensorTypeID) params:params]; @@ -25911,7 +20596,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeGeneratedCommandListID) params:params]; @@ -25919,7 +20604,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID) params:params]; @@ -25927,7 +20612,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID) params:params]; @@ -25935,7 +20620,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID) params:params]; @@ -25943,7 +20628,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeFeatureMapID) params:params]; @@ -25951,7 +20636,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeClusterRevisionID) params:params]; @@ -25972,12 +20657,11 @@ @implementation MTRClusterTemperatureMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -25985,7 +20669,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMeasuredValueID) params:params]; @@ -25993,7 +20677,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26001,7 +20685,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26009,7 +20693,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeToleranceID) params:params]; @@ -26018,7 +20702,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26026,7 +20710,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26034,7 +20718,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID) params:params]; @@ -26042,7 +20726,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID) params:params]; @@ -26050,7 +20734,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeFeatureMapID) params:params]; @@ -26058,7 +20742,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeClusterRevisionID) params:params]; @@ -26079,12 +20763,11 @@ @implementation MTRClusterPressureMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26092,7 +20775,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMeasuredValueID) params:params]; @@ -26100,7 +20783,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26108,7 +20791,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26116,7 +20799,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeToleranceID) params:params]; @@ -26124,7 +20807,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledValueID) params:params]; @@ -26132,7 +20815,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinScaledValueID) params:params]; @@ -26140,7 +20823,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxScaledValueID) params:params]; @@ -26148,7 +20831,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeScaledToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledToleranceID) params:params]; @@ -26156,7 +20839,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeScaleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaleID) params:params]; @@ -26164,7 +20847,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26172,7 +20855,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26180,7 +20863,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID) params:params]; @@ -26188,7 +20871,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID) params:params]; @@ -26196,7 +20879,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeFeatureMapID) params:params]; @@ -26204,7 +20887,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeClusterRevisionID) params:params]; @@ -26225,12 +20908,11 @@ @implementation MTRClusterFlowMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26238,7 +20920,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMeasuredValueID) params:params]; @@ -26246,7 +20928,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26254,7 +20936,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26262,7 +20944,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeToleranceID) params:params]; @@ -26270,7 +20952,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26278,7 +20960,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26286,7 +20968,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID) params:params]; @@ -26294,7 +20976,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID) params:params]; @@ -26302,7 +20984,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID) params:params]; @@ -26310,7 +20992,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeClusterRevisionID) params:params]; @@ -26331,12 +21013,11 @@ @implementation MTRClusterRelativeHumidityMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26344,7 +21025,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMeasuredValueID) params:params]; @@ -26353,7 +21034,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26362,7 +21043,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26370,7 +21051,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeToleranceID) params:params]; @@ -26379,7 +21060,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26388,7 +21069,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26396,7 +21077,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID) params:params]; @@ -26404,7 +21085,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) params:params]; @@ -26412,7 +21093,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID) params:params]; @@ -26421,7 +21102,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID) params:params]; @@ -26442,12 +21123,11 @@ @implementation MTRClusterOccupancySensing - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26455,7 +21135,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID) params:params]; @@ -26463,7 +21143,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOccupancySensorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID) params:params]; @@ -26471,7 +21151,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) params:params]; @@ -26480,7 +21160,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) params:params]; @@ -26499,7 +21179,7 @@ - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)readAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) params:params]; @@ -26529,7 +21209,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)readAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) params:params]; @@ -26560,7 +21240,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) params:params]; @@ -26591,7 +21271,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) value:dataValueDictionary @@ -26602,7 +21282,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary - (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) params:params]; @@ -26622,7 +21302,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) value:dataValueDictionary @@ -26633,7 +21313,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary - (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) params:params]; @@ -26653,7 +21333,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictio NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) value:dataValueDictionary @@ -26664,7 +21344,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictio - (NSDictionary *)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) params:params]; @@ -26684,7 +21364,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDicti NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) value:dataValueDictionary @@ -26695,7 +21375,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDicti - (NSDictionary *)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) params:params]; @@ -26715,7 +21395,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDicti NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) value:dataValueDictionary @@ -26727,7 +21407,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDicti (MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID: @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) @@ -26748,7 +21428,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID: @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) @@ -26759,7 +21439,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID) params:params]; @@ -26767,7 +21447,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) params:params]; @@ -26775,7 +21455,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID) params:params]; @@ -26783,7 +21463,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) params:params]; @@ -26791,7 +21471,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID) params:params]; @@ -26799,7 +21479,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID) params:params]; @@ -26872,12 +21552,11 @@ @implementation MTRClusterCarbonMonoxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26886,7 +21565,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -26895,7 +21574,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26904,7 +21583,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26913,7 +21592,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -26922,7 +21601,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -26932,7 +21611,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueID) @@ -26942,7 +21621,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -26952,7 +21631,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -26961,7 +21640,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -26970,7 +21649,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -26979,7 +21658,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -26988,7 +21667,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeGeneratedCommandListID) @@ -26998,7 +21677,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27007,7 +21686,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID) params:params]; @@ -27016,7 +21695,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27025,7 +21704,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27034,7 +21713,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27046,12 +21725,11 @@ @implementation MTRClusterCarbonDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27060,7 +21738,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27069,7 +21747,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27078,7 +21756,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27087,7 +21765,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27096,7 +21774,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -27106,7 +21784,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27115,7 +21793,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -27125,7 +21803,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27134,7 +21812,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27143,7 +21821,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27152,7 +21830,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27161,7 +21839,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27170,7 +21848,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27179,7 +21857,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID) params:params]; @@ -27188,7 +21866,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27197,7 +21875,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27206,7 +21884,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27218,12 +21896,11 @@ @implementation MTRClusterNitrogenDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27232,7 +21909,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27241,7 +21918,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27250,7 +21927,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27259,7 +21936,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27268,7 +21945,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -27278,7 +21955,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) @@ -27288,7 +21965,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -27298,7 +21975,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27307,7 +21984,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27316,7 +21993,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27325,7 +22002,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27334,7 +22011,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeGeneratedCommandListID) @@ -27344,7 +22021,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID) @@ -27354,7 +22031,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID) params:params]; @@ -27363,7 +22040,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27372,7 +22049,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27381,7 +22058,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27393,12 +22070,11 @@ @implementation MTRClusterOzoneConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27407,7 +22083,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27416,7 +22092,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27425,7 +22101,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27434,7 +22110,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27443,7 +22119,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -27452,7 +22128,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27461,7 +22137,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -27469,7 +22145,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27478,7 +22154,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27487,7 +22163,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27495,7 +22171,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27504,7 +22180,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27513,7 +22189,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27521,7 +22197,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID) params:params]; @@ -27530,7 +22206,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27538,7 +22214,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27547,7 +22223,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27559,12 +22235,11 @@ @implementation MTRClusterPM25ConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27572,7 +22247,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27581,7 +22256,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27590,7 +22265,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27599,7 +22274,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27608,7 +22283,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -27617,7 +22292,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27626,7 +22301,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -27634,7 +22309,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27643,7 +22318,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27652,7 +22327,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27660,7 +22335,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27669,7 +22344,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27678,7 +22353,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27686,7 +22361,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID) params:params]; @@ -27694,7 +22369,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27702,7 +22377,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27711,7 +22386,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27723,12 +22398,11 @@ @implementation MTRClusterFormaldehydeConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27737,7 +22411,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27746,7 +22420,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27755,7 +22429,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27764,7 +22438,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27773,7 +22447,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -27783,7 +22457,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27792,7 +22466,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -27802,7 +22476,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27811,7 +22485,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27820,7 +22494,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27829,7 +22503,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27838,7 +22512,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27847,7 +22521,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27856,7 +22530,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID) params:params]; @@ -27865,7 +22539,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27874,7 +22548,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27883,7 +22557,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27895,12 +22569,11 @@ @implementation MTRClusterPM1ConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27908,7 +22581,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27917,7 +22590,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27926,7 +22599,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27935,7 +22608,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27944,7 +22617,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -27953,7 +22626,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27962,7 +22635,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -27970,7 +22643,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27979,7 +22652,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27988,7 +22661,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27996,7 +22669,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -28005,7 +22678,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -28014,7 +22687,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -28022,7 +22695,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID) params:params]; @@ -28030,7 +22703,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -28038,7 +22711,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -28047,7 +22720,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -28059,12 +22732,11 @@ @implementation MTRClusterPM10ConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28072,7 +22744,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -28081,7 +22753,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -28090,7 +22762,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -28099,7 +22771,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -28108,7 +22780,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -28117,7 +22789,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -28126,7 +22798,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -28134,7 +22806,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -28143,7 +22815,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -28152,7 +22824,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -28160,7 +22832,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -28169,7 +22841,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -28178,7 +22850,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -28186,7 +22858,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID) params:params]; @@ -28194,7 +22866,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -28202,7 +22874,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -28211,7 +22883,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -28223,12 +22895,11 @@ @implementation MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28237,7 +22908,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasuredValueID) @@ -28247,7 +22918,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMinMeasuredValueID) @@ -28257,7 +22928,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMaxMeasuredValueID) @@ -28267,7 +22938,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueID) @@ -28277,7 +22948,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -28287,7 +22958,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueID) @@ -28297,7 +22968,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -28307,7 +22978,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeUncertaintyID) @@ -28317,7 +22988,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementUnitID) @@ -28327,7 +22998,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementMediumID) @@ -28337,7 +23008,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeLevelValueID) @@ -28347,7 +23018,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeGeneratedCommandListID) @@ -28357,7 +23028,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID) @@ -28367,7 +23038,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID) @@ -28377,7 +23048,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID) @@ -28387,7 +23058,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeFeatureMapID) @@ -28397,7 +23068,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeClusterRevisionID) @@ -28410,12 +23081,11 @@ @implementation MTRClusterRadonConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28424,7 +23094,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -28433,7 +23103,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -28442,7 +23112,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -28451,7 +23121,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -28460,7 +23130,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -28469,7 +23139,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -28478,7 +23148,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -28486,7 +23156,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -28495,7 +23165,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -28504,7 +23174,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -28512,7 +23182,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -28521,7 +23191,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -28530,7 +23200,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -28538,7 +23208,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID) params:params]; @@ -28547,7 +23217,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -28555,7 +23225,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -28564,7 +23234,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -28576,12 +23246,11 @@ @implementation MTRClusterWakeOnLAN - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28589,7 +23258,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeMACAddressID) params:params]; @@ -28597,7 +23266,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeGeneratedCommandListID) params:params]; @@ -28605,7 +23274,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID) params:params]; @@ -28613,7 +23282,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID) params:params]; @@ -28621,7 +23290,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID) params:params]; @@ -28629,7 +23298,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID) params:params]; @@ -28637,7 +23306,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeClusterRevisionID) params:params]; @@ -28660,12 +23329,11 @@ @implementation MTRClusterChannel - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28678,54 +23346,26 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandChangeChannelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRChannelClusterChangeChannelResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ChannelClusterChangeChannelResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Channel::Commands::ChangeChannel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.match = [self asCharSpan:params.match]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + changeChannelWithParams:params + completion:^(MTRChannelClusterChangeChannelResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -28747,54 +23387,25 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeChannelID, + self.endpoint, (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandChangeChannelByNumberID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Channel::Commands::ChangeChannelByNumber::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.majorNumber = params.majorNumber.unsignedShortValue; - request.minorNumber = params.minorNumber.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeChannelByNumberWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -28816,53 +23427,25 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandSkipChannelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Channel::Commands::SkipChannel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.count = params.count.shortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster skipChannelWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -28880,7 +23463,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeChannelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeChannelListID) params:params]; @@ -28888,7 +23471,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeLineupWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeLineupID) params:params]; @@ -28896,7 +23479,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeCurrentChannelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeCurrentChannelID) params:params]; @@ -28904,7 +23487,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeGeneratedCommandListID) params:params]; @@ -28912,7 +23495,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID) params:params]; @@ -28920,7 +23503,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeEventListID) params:params]; @@ -28928,7 +23511,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAttributeListID) params:params]; @@ -28936,7 +23519,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeFeatureMapID) params:params]; @@ -28944,7 +23527,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeClusterRevisionID) params:params]; @@ -28999,12 +23582,11 @@ @implementation MTRClusterTargetNavigator - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -29017,58 +23599,26 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTargetNavigatorID, + self.endpoint, (unsigned int) MTRClusterIDTypeTargetNavigatorID, (unsigned int) MTRCommandIDTypeClusterTargetNavigatorCommandNavigateTargetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorClusterNavigateTargetResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TargetNavigator::Commands::NavigateTarget::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.target = params.target.unsignedCharValue; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asCharSpan:params.data]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster navigateTargetWithParams:params + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29086,7 +23636,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeTargetListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeTargetListID) params:params]; @@ -29094,7 +23644,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeCurrentTargetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeCurrentTargetID) params:params]; @@ -29102,7 +23652,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeGeneratedCommandListID) params:params]; @@ -29110,7 +23660,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID) params:params]; @@ -29118,7 +23668,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID) params:params]; @@ -29126,7 +23676,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID) params:params]; @@ -29134,7 +23684,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID) params:params]; @@ -29142,7 +23692,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeClusterRevisionID) params:params]; @@ -29178,12 +23728,11 @@ @implementation MTRClusterMediaPlayback - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -29203,53 +23752,25 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPlayID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Play::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster playWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29279,53 +23800,25 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Pause::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29355,53 +23848,25 @@ - (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29434,53 +23899,25 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandStartOverID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::StartOver::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startOverWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29510,53 +23947,25 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPreviousID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Previous::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster previousWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29586,53 +23995,25 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandNextID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Next::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster nextWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29662,53 +24043,25 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandRewindID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Rewind::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster rewindWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29741,53 +24094,26 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandFastForwardID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::FastForward::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + fastForwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29810,54 +24136,26 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSkipForwardID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::SkipForward::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + skipForwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29880,54 +24178,26 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSkipBackwardID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::SkipBackward::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + skipBackwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29950,54 +24220,25 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSeekID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Seek::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.position = params.position.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster seekWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30015,7 +24256,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeCurrentStateID) params:params]; @@ -30023,7 +24264,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeStartTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeStartTimeID) params:params]; @@ -30031,7 +24272,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeDurationID) params:params]; @@ -30039,7 +24280,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeSampledPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSampledPositionID) params:params]; @@ -30047,7 +24288,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributePlaybackSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributePlaybackSpeedID) params:params]; @@ -30055,7 +24296,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeSeekRangeEndWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeEndID) params:params]; @@ -30063,7 +24304,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeSeekRangeStartWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeStartID) params:params]; @@ -30071,7 +24312,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID) params:params]; @@ -30079,7 +24320,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID) params:params]; @@ -30087,7 +24328,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID) params:params]; @@ -30095,7 +24336,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID) params:params]; @@ -30103,7 +24344,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID) params:params]; @@ -30111,7 +24352,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeClusterRevisionID) params:params]; @@ -30366,12 +24607,11 @@ @implementation MTRClusterMediaInput - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -30383,53 +24623,25 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandSelectInputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::SelectInput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster selectInputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30460,52 +24672,25 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandShowInputStatusID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::ShowInputStatus::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster showInputStatusWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30536,52 +24721,25 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandHideInputStatusID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::HideInputStatus::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster hideInputStatusWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30603,54 +24761,25 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandRenameInputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::RenameInput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster renameInputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30668,7 +24797,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeInputListID) params:params]; @@ -30676,7 +24805,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeCurrentInputWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID) params:params]; @@ -30684,7 +24813,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID) params:params]; @@ -30692,7 +24821,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) params:params]; @@ -30700,7 +24829,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeEventListID) params:params]; @@ -30708,7 +24837,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) params:params]; @@ -30716,7 +24845,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID) params:params]; @@ -30724,7 +24853,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID) params:params]; @@ -30803,12 +24932,11 @@ @implementation MTRClusterLowPower - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -30826,52 +24954,25 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLowPowerID, (unsigned int) MTRCommandIDTypeClusterLowPowerCommandSleepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LowPower::Commands::Sleep::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster sleepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30889,7 +24990,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID) params:params]; @@ -30897,7 +24998,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) params:params]; @@ -30905,7 +25006,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeEventListID) params:params]; @@ -30913,7 +25014,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID) params:params]; @@ -30921,7 +25022,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID) params:params]; @@ -30929,7 +25030,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeClusterRevisionID) params:params]; @@ -30969,12 +25070,11 @@ @implementation MTRClusterKeypadInput - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -30987,54 +25087,25 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeKeypadInputID, (unsigned int) MTRCommandIDTypeClusterKeypadInputCommandSendKeyID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRKeypadInputClusterSendKeyResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - KeypadInputClusterSendKeyResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - KeypadInput::Commands::SendKey::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.keyCode = static_cast>(params.keyCode.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31052,7 +25123,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeGeneratedCommandListID) params:params]; @@ -31060,7 +25131,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID) params:params]; @@ -31068,7 +25139,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeEventListID) params:params]; @@ -31076,7 +25147,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID) params:params]; @@ -31084,7 +25155,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID) params:params]; @@ -31092,7 +25163,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeClusterRevisionID) params:params]; @@ -31127,12 +25198,11 @@ @implementation MTRClusterContentLauncher - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -31145,112 +25215,26 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, (unsigned int) MTRCommandIDTypeClusterContentLauncherCommandLaunchContentID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRContentLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ContentLauncher::Commands::LaunchContent::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.search.parameterList.count != 0) { - auto * listHolder_1 = new ListHolder(params.search.parameterList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.search.parameterList.count; ++i_1) { - if (![params.search.parameterList[i_1] - isKindOfClass:[MTRContentLauncherClusterParameterStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (MTRContentLauncherClusterParameterStruct *) params.search.parameterList[i_1]; - listHolder_1->mList[i_1].type - = static_castmList[i_1].type)>>( - element_1.type.unsignedCharValue); - listHolder_1->mList[i_1].value = [self asCharSpan:element_1.value]; - if (element_1.externalIDList != nil) { - auto & definedValue_3 = listHolder_1->mList[i_1].externalIDList.Emplace(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (element_1.externalIDList.count != 0) { - auto * listHolder_4 = new ListHolder(element_1.externalIDList.count); - if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_4); - for (size_t i_4 = 0; i_4 < element_1.externalIDList.count; ++i_4) { - if (![element_1.externalIDList[i_4] - isKindOfClass:[MTRContentLauncherClusterAdditionalInfoStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_4 - = (MTRContentLauncherClusterAdditionalInfoStruct *) element_1.externalIDList[i_4]; - listHolder_4->mList[i_4].name = [self asCharSpan:element_4.name]; - listHolder_4->mList[i_4].value = [self asCharSpan:element_4.value]; - } - definedValue_3 = ListType_4(listHolder_4->mList, element_1.externalIDList.count); - } else { - definedValue_3 = ListType_4(); - } - } - } - } - request.search.parameterList = ListType_1(listHolder_1->mList, params.search.parameterList.count); - } else { - request.search.parameterList = ListType_1(); - } - } - request.autoPlay = params.autoPlay.boolValue; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asCharSpan:params.data]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster launchContentWithParams:params + completion:^( + MTRContentLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31273,152 +25257,26 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, (unsigned int) MTRCommandIDTypeClusterContentLauncherCommandLaunchURLID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRContentLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ContentLauncher::Commands::LaunchURL::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.contentURL = [self asCharSpan:params.contentURL]; - if (params.displayString != nil) { - auto & definedValue_0 = request.displayString.Emplace(); - definedValue_0 = [self asCharSpan:params.displayString]; - } - if (params.brandingInformation != nil) { - auto & definedValue_0 = request.brandingInformation.Emplace(); - definedValue_0.providerName = [self asCharSpan:params.brandingInformation.providerName]; - if (params.brandingInformation.background != nil) { - auto & definedValue_2 = definedValue_0.background.Emplace(); - if (params.brandingInformation.background.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.background.imageURL]; - } - if (params.brandingInformation.background.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.background.color]; - } - if (params.brandingInformation.background.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.background.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.background.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.background.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.logo != nil) { - auto & definedValue_2 = definedValue_0.logo.Emplace(); - if (params.brandingInformation.logo.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.logo.imageURL]; - } - if (params.brandingInformation.logo.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.logo.color]; - } - if (params.brandingInformation.logo.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.logo.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.logo.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.logo.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.progressBar != nil) { - auto & definedValue_2 = definedValue_0.progressBar.Emplace(); - if (params.brandingInformation.progressBar.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.imageURL]; - } - if (params.brandingInformation.progressBar.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.color]; - } - if (params.brandingInformation.progressBar.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.progressBar.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.progressBar.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.progressBar.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.splash != nil) { - auto & definedValue_2 = definedValue_0.splash.Emplace(); - if (params.brandingInformation.splash.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.splash.imageURL]; - } - if (params.brandingInformation.splash.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.splash.color]; - } - if (params.brandingInformation.splash.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.splash.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.splash.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.splash.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.waterMark != nil) { - auto & definedValue_2 = definedValue_0.waterMark.Emplace(); - if (params.brandingInformation.waterMark.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.imageURL]; - } - if (params.brandingInformation.waterMark.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.color]; - } - if (params.brandingInformation.waterMark.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.waterMark.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.waterMark.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.waterMark.size.metric.unsignedCharValue); - } - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + launchURLWithParams:params + completion:^(MTRContentLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31436,7 +25294,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - (NSDictionary *)readAttributeAcceptHeaderWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptHeaderID) params:params]; @@ -31445,7 +25303,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - (NSDictionary *)readAttributeSupportedStreamingProtocolsWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID) params:params]; @@ -31464,7 +25322,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeGeneratedCommandListID) params:params]; @@ -31482,7 +25340,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID) params:params]; @@ -31490,7 +25348,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeEventListID) params:params]; @@ -31498,7 +25356,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID) params:params]; @@ -31506,7 +25364,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID) params:params]; @@ -31514,7 +25372,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeClusterRevisionID) params:params]; @@ -31563,12 +25421,11 @@ @implementation MTRClusterAudioOutput - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -31580,53 +25437,25 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, + self.endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, (unsigned int) MTRCommandIDTypeClusterAudioOutputCommandSelectOutputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AudioOutput::Commands::SelectOutput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster selectOutputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31648,54 +25477,25 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, + self.endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, (unsigned int) MTRCommandIDTypeClusterAudioOutputCommandRenameOutputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AudioOutput::Commands::RenameOutput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster renameOutputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31713,7 +25513,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeOutputListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeOutputListID) params:params]; @@ -31721,7 +25521,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeCurrentOutputWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeCurrentOutputID) params:params]; @@ -31729,7 +25529,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeGeneratedCommandListID) params:params]; @@ -31737,7 +25537,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID) params:params]; @@ -31745,7 +25545,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeEventListID) params:params]; @@ -31753,7 +25553,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID) params:params]; @@ -31761,7 +25561,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID) params:params]; @@ -31769,7 +25569,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeClusterRevisionID) params:params]; @@ -31810,12 +25610,11 @@ @implementation MTRClusterApplicationLauncher - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -31828,64 +25627,26 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nul NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandLaunchAppID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ApplicationLauncher::Commands::LaunchApp::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.application != nil) { - auto & definedValue_0 = request.application.Emplace(); - definedValue_0.catalogVendorID = params.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = [self asCharSpan:params.application.applicationID]; - } - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asByteSpan:params.data]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster launchAppWithParams:params + completion:^( + MTRApplicationLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31908,60 +25669,26 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullabl NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandStopAppID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ApplicationLauncher::Commands::StopApp::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.application != nil) { - auto & definedValue_0 = request.application.Emplace(); - definedValue_0.catalogVendorID = params.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = [self asCharSpan:params.application.applicationID]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + stopAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31984,60 +25711,26 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandHideAppID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ApplicationLauncher::Commands::HideApp::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.application != nil) { - auto & definedValue_0 = request.application.Emplace(); - definedValue_0.catalogVendorID = params.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = [self asCharSpan:params.application.applicationID]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + hideAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32055,7 +25748,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl - (NSDictionary *)readAttributeCatalogListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCatalogListID) params:params]; @@ -32063,7 +25756,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl - (NSDictionary *)readAttributeCurrentAppWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) params:params]; @@ -32080,7 +25773,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) value:dataValueDictionary @@ -32090,7 +25783,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeGeneratedCommandListID) params:params]; @@ -32098,7 +25791,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID) params:params]; @@ -32106,7 +25799,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID) params:params]; @@ -32114,7 +25807,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID) params:params]; @@ -32122,7 +25815,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeFeatureMapID) params:params]; @@ -32130,7 +25823,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeClusterRevisionID) params:params]; @@ -32193,12 +25886,11 @@ @implementation MTRClusterApplicationBasic - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -32206,7 +25898,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorNameID) params:params]; @@ -32214,7 +25906,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorIDID) params:params]; @@ -32222,7 +25914,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeApplicationNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationNameID) params:params]; @@ -32230,7 +25922,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeProductIDID) params:params]; @@ -32238,7 +25930,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeApplicationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationID) params:params]; @@ -32246,7 +25938,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeStatusID) params:params]; @@ -32254,7 +25946,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeApplicationVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationVersionID) params:params]; @@ -32262,7 +25954,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAllowedVendorListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAllowedVendorListID) params:params]; @@ -32270,7 +25962,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeGeneratedCommandListID) params:params]; @@ -32278,7 +25970,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID) params:params]; @@ -32286,7 +25978,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID) params:params]; @@ -32294,7 +25986,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID) params:params]; @@ -32302,7 +25994,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeFeatureMapID) params:params]; @@ -32310,7 +26002,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeClusterRevisionID) params:params]; @@ -32331,12 +26023,11 @@ @implementation MTRClusterAccountLogin - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -32349,57 +26040,26 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, + self.endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandGetSetupPINID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccountLoginClusterGetSetupPINResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AccountLogin::Commands::GetSetupPIN::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + getSetupPINWithParams:params + completion:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32421,57 +26081,25 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandLoginID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AccountLogin::Commands::Login::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - request.setupPIN = [self asCharSpan:params.setupPIN]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster loginWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32499,55 +26127,25 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandLogoutID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AccountLogin::Commands::Logout::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster logoutWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32565,7 +26163,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeGeneratedCommandListID) params:params]; @@ -32573,7 +26171,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID) params:params]; @@ -32581,7 +26179,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeEventListID) params:params]; @@ -32589,7 +26187,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID) params:params]; @@ -32597,7 +26195,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID) params:params]; @@ -32605,7 +26203,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID) params:params]; @@ -32669,12 +26267,11 @@ @implementation MTRClusterElectricalMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -32695,52 +26292,25 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeElectricalMeasurementID, + self.endpoint, (unsigned int) MTRClusterIDTypeElectricalMeasurementID, (unsigned int) MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ElectricalMeasurement::Commands::GetProfileInfoCommand::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getProfileInfoCommandWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32762,56 +26332,26 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeElectricalMeasurementID, (unsigned int) MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.attributeId = params.attributeId.unsignedShortValue; - request.startTime = params.startTime.unsignedIntValue; - request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getMeasurementProfileCommandWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32829,7 +26369,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID) params:params]; @@ -32837,7 +26377,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID) params:params]; @@ -32845,7 +26385,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID) params:params]; @@ -32853,7 +26393,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID) params:params]; @@ -32861,7 +26401,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID) params:params]; @@ -32869,7 +26409,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID) params:params]; @@ -32877,7 +26417,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID) params:params]; @@ -32885,7 +26425,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID) params:params]; @@ -32893,7 +26433,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID) params:params]; @@ -32901,7 +26441,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID) params:params]; @@ -32909,7 +26449,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID) params:params]; @@ -32917,7 +26457,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID) params:params]; @@ -32925,7 +26465,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID) params:params]; @@ -32933,7 +26473,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID) params:params]; @@ -32941,7 +26481,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID) params:params]; @@ -32949,7 +26489,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID) params:params]; @@ -32957,7 +26497,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID) params:params]; @@ -32965,7 +26505,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID) params:params]; @@ -32973,7 +26513,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID) params:params]; @@ -32981,7 +26521,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeNeutralCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID) params:params]; @@ -32989,7 +26529,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeTotalActivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID) params:params]; @@ -32997,7 +26537,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeTotalReactivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID) params:params]; @@ -33005,7 +26545,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeTotalApparentPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID) params:params]; @@ -33014,7 +26554,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID) params:params]; @@ -33023,7 +26563,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID) params:params]; @@ -33032,7 +26572,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID) params:params]; @@ -33041,7 +26581,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID) params:params]; @@ -33050,7 +26590,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID) params:params]; @@ -33059,7 +26599,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID) params:params]; @@ -33068,7 +26608,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID) params:params]; @@ -33077,7 +26617,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID) params:params]; @@ -33086,7 +26626,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID) params:params]; @@ -33095,7 +26635,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID) params:params]; @@ -33104,7 +26644,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID) params:params]; @@ -33113,7 +26653,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID) params:params]; @@ -33122,7 +26662,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyMultiplierWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID) params:params]; @@ -33130,7 +26670,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID) params:params]; @@ -33138,7 +26678,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID) params:params]; @@ -33146,7 +26686,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID) params:params]; @@ -33155,7 +26695,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID) params:params]; @@ -33164,7 +26704,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID) params:params]; @@ -33172,7 +26712,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID) params:params]; @@ -33181,7 +26721,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousLineCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID) params:params]; @@ -33190,7 +26730,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousActiveCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID) params:params]; @@ -33199,7 +26739,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousReactiveCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID) params:params]; @@ -33207,7 +26747,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID) params:params]; @@ -33215,7 +26755,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID) params:params]; @@ -33223,7 +26763,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsVoltageMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID) params:params]; @@ -33231,7 +26771,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsVoltageMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID) params:params]; @@ -33239,7 +26779,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID) params:params]; @@ -33247,7 +26787,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsCurrentMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID) params:params]; @@ -33255,7 +26795,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsCurrentMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID) params:params]; @@ -33263,7 +26803,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeActivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID) params:params]; @@ -33271,7 +26811,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeActivePowerMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID) params:params]; @@ -33279,7 +26819,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeActivePowerMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID) params:params]; @@ -33287,7 +26827,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeReactivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID) params:params]; @@ -33295,7 +26835,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeApparentPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID) params:params]; @@ -33303,7 +26843,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePowerFactorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID) params:params]; @@ -33312,7 +26852,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) params:params]; @@ -33332,7 +26872,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary< NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) value:dataValueDictionary @@ -33343,7 +26883,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary< - (NSDictionary *)readAttributeAverageRmsUnderVoltageCounterWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) params:params]; @@ -33363,7 +26903,7 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) params:params]; @@ -33394,7 +26934,7 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) params:params]; @@ -33425,7 +26965,7 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)readAttributeRmsVoltageSagPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) params:params]; @@ -33452,7 +26992,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) value:dataValueDictionary @@ -33463,7 +27003,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeRmsVoltageSwellPeriodWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) params:params]; @@ -33482,7 +27022,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID) params:params]; @@ -33500,7 +27040,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID) params:params]; @@ -33508,7 +27048,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID) params:params]; @@ -33516,7 +27056,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID) params:params]; @@ -33524,7 +27064,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID) params:params]; @@ -33532,7 +27072,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcPowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID) params:params]; @@ -33540,7 +27080,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) params:params]; @@ -33557,7 +27097,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) value:dataValueDictionary @@ -33567,7 +27107,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary - (NSDictionary *)readAttributeVoltageOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID) params:params]; @@ -33575,7 +27115,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary - (NSDictionary *)readAttributeCurrentOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID) params:params]; @@ -33583,7 +27123,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary - (NSDictionary *)readAttributeAcOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) params:params]; @@ -33600,7 +27140,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcVoltageOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID) params:params]; @@ -33618,7 +27158,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcCurrentOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID) params:params]; @@ -33627,7 +27167,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcActivePowerOverloadWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID) params:params]; @@ -33636,7 +27176,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcReactivePowerOverloadWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID) params:params]; @@ -33645,7 +27185,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID) params:params]; @@ -33654,7 +27194,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsUnderVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID) params:params]; @@ -33663,7 +27203,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID) params:params]; @@ -33672,7 +27212,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID) params:params]; @@ -33680,7 +27220,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSagWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID) params:params]; @@ -33688,7 +27228,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSwellWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID) params:params]; @@ -33696,7 +27236,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeLineCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID) params:params]; @@ -33704,7 +27244,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID) params:params]; @@ -33713,7 +27253,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID) params:params]; @@ -33721,7 +27261,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltagePhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID) params:params]; @@ -33729,7 +27269,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID) params:params]; @@ -33737,7 +27277,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID) params:params]; @@ -33745,7 +27285,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID) params:params]; @@ -33753,7 +27293,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID) params:params]; @@ -33761,7 +27301,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID) params:params]; @@ -33769,7 +27309,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID) params:params]; @@ -33777,7 +27317,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID) params:params]; @@ -33785,7 +27325,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID) params:params]; @@ -33793,7 +27333,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID) params:params]; @@ -33801,7 +27341,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeApparentPowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID) params:params]; @@ -33809,7 +27349,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributePowerFactorPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID) params:params]; @@ -33818,7 +27358,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID: @(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID) @@ -33828,7 +27368,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID) params:params]; @@ -33837,7 +27377,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID) params:params]; @@ -33846,7 +27386,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID) params:params]; @@ -33855,7 +27395,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID) params:params]; @@ -33864,7 +27404,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID) params:params]; @@ -33873,7 +27413,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID) params:params]; @@ -33881,7 +27421,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeLineCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID) params:params]; @@ -33889,7 +27429,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID) params:params]; @@ -33898,7 +27438,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID) params:params]; @@ -33906,7 +27446,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltagePhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID) params:params]; @@ -33914,7 +27454,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID) params:params]; @@ -33922,7 +27462,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID) params:params]; @@ -33930,7 +27470,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID) params:params]; @@ -33938,7 +27478,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID) params:params]; @@ -33946,7 +27486,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID) params:params]; @@ -33954,7 +27494,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID) params:params]; @@ -33962,7 +27502,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID) params:params]; @@ -33970,7 +27510,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID) params:params]; @@ -33978,7 +27518,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID) params:params]; @@ -33986,7 +27526,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeApparentPowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID) params:params]; @@ -33994,7 +27534,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributePowerFactorPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID) params:params]; @@ -34003,7 +27543,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID: @(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID) @@ -34013,7 +27553,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID) params:params]; @@ -34022,7 +27562,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID) params:params]; @@ -34031,7 +27571,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID) params:params]; @@ -34040,7 +27580,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID) params:params]; @@ -34049,7 +27589,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID) params:params]; @@ -34058,7 +27598,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID) params:params]; @@ -34066,7 +27606,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID) params:params]; @@ -34074,7 +27614,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID) params:params]; @@ -34082,7 +27622,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID) params:params]; @@ -34090,7 +27630,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID) params:params]; @@ -34098,7 +27638,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID) params:params]; @@ -34106,7 +27646,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID) params:params]; @@ -34156,12 +27696,11 @@ @implementation MTRClusterUnitTesting - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -34179,52 +27718,25 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::Test::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34255,52 +27767,25 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNotHandledID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNotHandled::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNotHandledWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34333,53 +27818,26 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSpecificID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestSpecificResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestSpecificResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestSpecific::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testSpecificWithParams:params + completion:^(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34410,52 +27868,25 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestUnknownCommandID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestUnknownCommand::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testUnknownCommandWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34478,55 +27909,26 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestAddArgumentsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestAddArgumentsResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestAddArguments::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.unsignedCharValue; - request.arg2 = params.arg2.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testAddArgumentsWithParams:params + completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34549,54 +27951,26 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSimpleArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestSimpleArgumentResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestSimpleArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.boolValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testSimpleArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34620,265 +27994,27 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestStructArrayArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestStructArrayArgumentResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestStructArrayArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterNestedStructList class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterNestedStructList *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue; - listHolder_0->mList[i_0].c.b = element_0.c.b.boolValue; - listHolder_0->mList[i_0].c.c - = static_castmList[i_0].c.c)>>( - element_0.c.c.unsignedCharValue); - listHolder_0->mList[i_0].c.d = [self asByteSpan:element_0.c.d]; - listHolder_0->mList[i_0].c.e = [self asCharSpan:element_0.c.e]; - listHolder_0->mList[i_0].c.f - = static_castmList[i_0].c.f)>>( - element_0.c.f.unsignedCharValue); - listHolder_0->mList[i_0].c.g = element_0.c.g.floatValue; - listHolder_0->mList[i_0].c.h = element_0.c.h.doubleValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].d)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.d.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.d.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) { - if (![element_0.d[i_2] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRUnitTestingClusterSimpleStruct *) element_0.d[i_2]; - listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; - listHolder_2->mList[i_2].b = element_2.b.boolValue; - listHolder_2->mList[i_2].c - = static_castmList[i_2].c)>>( - element_2.c.unsignedCharValue); - listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; - listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; - listHolder_2->mList[i_2].f - = static_castmList[i_2].f)>>( - element_2.f.unsignedCharValue); - listHolder_2->mList[i_2].g = element_2.g.floatValue; - listHolder_2->mList[i_2].h = element_2.h.doubleValue; - } - listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0.d.count); - } else { - listHolder_0->mList[i_0].d = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].e)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.e.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.e.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.e.count; ++i_2) { - if (![element_0.e[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.e[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedIntValue; - } - listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0.e.count); - } else { - listHolder_0->mList[i_0].e = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].f)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.f.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.f.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.f.count; ++i_2) { - if (![element_0.f[i_2] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSData *) element_0.f[i_2]; - listHolder_2->mList[i_2] = [self asByteSpan:element_2]; - } - listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0.f.count); - } else { - listHolder_0->mList[i_0].f = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].g)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.g.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.g.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.g.count; ++i_2) { - if (![element_0.g[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.g[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedCharValue; - } - listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0.g.count); - } else { - listHolder_0->mList[i_0].g = ListType_2(); - } - } - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg2.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg2.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg2.count; ++i_0) { - if (![params.arg2[i_0] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterSimpleStruct *) params.arg2[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c = static_castmList[i_0].c)>>( - element_0.c.unsignedCharValue); - listHolder_0->mList[i_0].d = [self asByteSpan:element_0.d]; - listHolder_0->mList[i_0].e = [self asCharSpan:element_0.e]; - listHolder_0->mList[i_0].f = static_castmList[i_0].f)>>( - element_0.f.unsignedCharValue); - listHolder_0->mList[i_0].g = element_0.g.floatValue; - listHolder_0->mList[i_0].h = element_0.h.doubleValue; - } - request.arg2 = ListType_0(listHolder_0->mList, params.arg2.count); - } else { - request.arg2 = ListType_0(); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg3.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg3.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg3.count; ++i_0) { - if (![params.arg3[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg3[i_0]; - listHolder_0->mList[i_0] = static_castmList[i_0])>>( - element_0.unsignedCharValue); - } - request.arg3 = ListType_0(listHolder_0->mList, params.arg3.count); - } else { - request.arg3 = ListType_0(); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg4.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg4.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg4.count; ++i_0) { - if (![params.arg4[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg4[i_0]; - listHolder_0->mList[i_0] = element_0.boolValue; - } - request.arg4 = ListType_0(listHolder_0->mList, params.arg4.count); - } else { - request.arg4 = ListType_0(); - } - } - request.arg5 = static_cast>(params.arg5.unsignedCharValue); - request.arg6 = params.arg6.boolValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testStructArrayArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34901,61 +28037,26 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestStructArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); - request.arg1.d = [self asByteSpan:params.arg1.d]; - request.arg1.e = [self asCharSpan:params.arg1.e]; - request.arg1.f = static_cast>(params.arg1.f.unsignedCharValue); - request.arg1.g = params.arg1.g.floatValue; - request.arg1.h = params.arg1.h.doubleValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testStructArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34978,65 +28079,26 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNestedStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNestedStructArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c.a = params.arg1.c.a.unsignedCharValue; - request.arg1.c.b = params.arg1.c.b.boolValue; - request.arg1.c.c - = static_cast>(params.arg1.c.c.unsignedCharValue); - request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; - request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; - request.arg1.c.f - = static_cast>(params.arg1.c.f.unsignedCharValue); - request.arg1.c.g = params.arg1.c.g.floatValue; - request.arg1.c.h = params.arg1.c.h.doubleValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNestedStructArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35059,84 +28121,26 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListStructArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterSimpleStruct *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c = static_castmList[i_0].c)>>( - element_0.c.unsignedCharValue); - listHolder_0->mList[i_0].d = [self asByteSpan:element_0.d]; - listHolder_0->mList[i_0].e = [self asCharSpan:element_0.e]; - listHolder_0->mList[i_0].f = static_castmList[i_0].f)>>( - element_0.f.unsignedCharValue); - listHolder_0->mList[i_0].g = element_0.g.floatValue; - listHolder_0->mList[i_0].h = element_0.h.doubleValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListStructArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35159,75 +28163,26 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListInt8UArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListInt8UArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg1[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListInt8UArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35250,162 +28205,26 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNestedStructListArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNestedStructListArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c.a = params.arg1.c.a.unsignedCharValue; - request.arg1.c.b = params.arg1.c.b.boolValue; - request.arg1.c.c - = static_cast>(params.arg1.c.c.unsignedCharValue); - request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; - request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; - request.arg1.c.f - = static_cast>(params.arg1.c.f.unsignedCharValue); - request.arg1.c.g = params.arg1.c.g.floatValue; - request.arg1.c.h = params.arg1.c.h.doubleValue; - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.d.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.d.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.d.count; ++i_1) { - if (![params.arg1.d[i_1] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (MTRUnitTestingClusterSimpleStruct *) params.arg1.d[i_1]; - listHolder_1->mList[i_1].a = element_1.a.unsignedCharValue; - listHolder_1->mList[i_1].b = element_1.b.boolValue; - listHolder_1->mList[i_1].c = static_castmList[i_1].c)>>( - element_1.c.unsignedCharValue); - listHolder_1->mList[i_1].d = [self asByteSpan:element_1.d]; - listHolder_1->mList[i_1].e = [self asCharSpan:element_1.e]; - listHolder_1->mList[i_1].f = static_castmList[i_1].f)>>( - element_1.f.unsignedCharValue); - listHolder_1->mList[i_1].g = element_1.g.floatValue; - listHolder_1->mList[i_1].h = element_1.h.doubleValue; - } - request.arg1.d = ListType_1(listHolder_1->mList, params.arg1.d.count); - } else { - request.arg1.d = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.e.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.e.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.e.count; ++i_1) { - if (![params.arg1.e[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.arg1.e[i_1]; - listHolder_1->mList[i_1] = element_1.unsignedIntValue; - } - request.arg1.e = ListType_1(listHolder_1->mList, params.arg1.e.count); - } else { - request.arg1.e = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.f.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.f.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.f.count; ++i_1) { - if (![params.arg1.f[i_1] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSData *) params.arg1.f[i_1]; - listHolder_1->mList[i_1] = [self asByteSpan:element_1]; - } - request.arg1.f = ListType_1(listHolder_1->mList, params.arg1.f.count); - } else { - request.arg1.f = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.g.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.g.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.g.count; ++i_1) { - if (![params.arg1.g[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.arg1.g[i_1]; - listHolder_1->mList[i_1] = element_1.unsignedCharValue; - } - request.arg1.g = ListType_1(listHolder_1->mList, params.arg1.g.count); - } else { - request.arg1.g = ListType_1(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNestedStructListArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35429,188 +28248,27 @@ - (void)testListNestedStructListArgumentRequestWithParams: NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListNestedStructListArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterNestedStructList class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterNestedStructList *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue; - listHolder_0->mList[i_0].c.b = element_0.c.b.boolValue; - listHolder_0->mList[i_0].c.c - = static_castmList[i_0].c.c)>>( - element_0.c.c.unsignedCharValue); - listHolder_0->mList[i_0].c.d = [self asByteSpan:element_0.c.d]; - listHolder_0->mList[i_0].c.e = [self asCharSpan:element_0.c.e]; - listHolder_0->mList[i_0].c.f - = static_castmList[i_0].c.f)>>( - element_0.c.f.unsignedCharValue); - listHolder_0->mList[i_0].c.g = element_0.c.g.floatValue; - listHolder_0->mList[i_0].c.h = element_0.c.h.doubleValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].d)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.d.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.d.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) { - if (![element_0.d[i_2] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRUnitTestingClusterSimpleStruct *) element_0.d[i_2]; - listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; - listHolder_2->mList[i_2].b = element_2.b.boolValue; - listHolder_2->mList[i_2].c - = static_castmList[i_2].c)>>( - element_2.c.unsignedCharValue); - listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; - listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; - listHolder_2->mList[i_2].f - = static_castmList[i_2].f)>>( - element_2.f.unsignedCharValue); - listHolder_2->mList[i_2].g = element_2.g.floatValue; - listHolder_2->mList[i_2].h = element_2.h.doubleValue; - } - listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0.d.count); - } else { - listHolder_0->mList[i_0].d = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].e)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.e.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.e.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.e.count; ++i_2) { - if (![element_0.e[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.e[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedIntValue; - } - listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0.e.count); - } else { - listHolder_0->mList[i_0].e = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].f)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.f.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.f.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.f.count; ++i_2) { - if (![element_0.f[i_2] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSData *) element_0.f[i_2]; - listHolder_2->mList[i_2] = [self asByteSpan:element_2]; - } - listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0.f.count); - } else { - listHolder_0->mList[i_0].f = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].g)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.g.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.g.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.g.count; ++i_2) { - if (![element_0.g[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.g[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedCharValue; - } - listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0.g.count); - } else { - listHolder_0->mList[i_0].g = ListType_2(); - } - } - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListNestedStructListArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35633,75 +28291,26 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListInt8UReverseRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestListInt8UReverseResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListInt8UReverseRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg1[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListInt8UReverseRequestWithParams:params + completion:^(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35724,55 +28333,26 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEnumsRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestEnumsResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestEnumsResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestEnumsRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = static_cast>(params.arg1.unsignedShortValue); - request.arg2 = static_cast>(params.arg2.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testEnumsRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestEnumsResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35795,64 +28375,26 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNullableOptionalRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNullableOptionalRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.arg1 != nil) { - auto & definedValue_0 = request.arg1.Emplace(); - if (params.arg1 == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = params.arg1.unsignedCharValue; - } - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNullableOptionalRequestWithParams:params + completion:^(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35877,223 +28419,28 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestComplexNullableOptionalRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestComplexNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestComplexNullableOptionalRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params.nullableInt == nil) { - request.nullableInt.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableInt.SetNonNull(); - nonNullValue_0 = params.nullableInt.unsignedShortValue; - } - if (params.optionalInt != nil) { - auto & definedValue_0 = request.optionalInt.Emplace(); - definedValue_0 = params.optionalInt.unsignedShortValue; - } - if (params.nullableOptionalInt != nil) { - auto & definedValue_0 = request.nullableOptionalInt.Emplace(); - if (params.nullableOptionalInt == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = params.nullableOptionalInt.unsignedShortValue; - } - } - if (params.nullableString == nil) { - request.nullableString.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableString.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.nullableString]; - } - if (params.optionalString != nil) { - auto & definedValue_0 = request.optionalString.Emplace(); - definedValue_0 = [self asCharSpan:params.optionalString]; - } - if (params.nullableOptionalString != nil) { - auto & definedValue_0 = request.nullableOptionalString.Emplace(); - if (params.nullableOptionalString == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = [self asCharSpan:params.nullableOptionalString]; - } - } - if (params.nullableStruct == nil) { - request.nullableStruct.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableStruct.SetNonNull(); - nonNullValue_0.a = params.nullableStruct.a.unsignedCharValue; - nonNullValue_0.b = params.nullableStruct.b.boolValue; - nonNullValue_0.c = static_cast>( - params.nullableStruct.c.unsignedCharValue); - nonNullValue_0.d = [self asByteSpan:params.nullableStruct.d]; - nonNullValue_0.e = [self asCharSpan:params.nullableStruct.e]; - nonNullValue_0.f = static_cast>( - params.nullableStruct.f.unsignedCharValue); - nonNullValue_0.g = params.nullableStruct.g.floatValue; - nonNullValue_0.h = params.nullableStruct.h.doubleValue; - } - if (params.optionalStruct != nil) { - auto & definedValue_0 = request.optionalStruct.Emplace(); - definedValue_0.a = params.optionalStruct.a.unsignedCharValue; - definedValue_0.b = params.optionalStruct.b.boolValue; - definedValue_0.c = static_cast>( - params.optionalStruct.c.unsignedCharValue); - definedValue_0.d = [self asByteSpan:params.optionalStruct.d]; - definedValue_0.e = [self asCharSpan:params.optionalStruct.e]; - definedValue_0.f = static_cast>( - params.optionalStruct.f.unsignedCharValue); - definedValue_0.g = params.optionalStruct.g.floatValue; - definedValue_0.h = params.optionalStruct.h.doubleValue; - } - if (params.nullableOptionalStruct != nil) { - auto & definedValue_0 = request.nullableOptionalStruct.Emplace(); - if (params.nullableOptionalStruct == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1.a = params.nullableOptionalStruct.a.unsignedCharValue; - nonNullValue_1.b = params.nullableOptionalStruct.b.boolValue; - nonNullValue_1.c = static_cast>( - params.nullableOptionalStruct.c.unsignedCharValue); - nonNullValue_1.d = [self asByteSpan:params.nullableOptionalStruct.d]; - nonNullValue_1.e = [self asCharSpan:params.nullableOptionalStruct.e]; - nonNullValue_1.f = static_cast>( - params.nullableOptionalStruct.f.unsignedCharValue); - nonNullValue_1.g = params.nullableOptionalStruct.g.floatValue; - nonNullValue_1.h = params.nullableOptionalStruct.h.doubleValue; - } - } - if (params.nullableList == nil) { - request.nullableList.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableList.SetNonNull(); - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.nullableList.count != 0) { - auto * listHolder_1 = new ListHolder(params.nullableList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.nullableList.count; ++i_1) { - if (![params.nullableList[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.nullableList[i_1]; - listHolder_1->mList[i_1] = static_castmList[i_1])>>( - element_1.unsignedCharValue); - } - nonNullValue_0 = ListType_1(listHolder_1->mList, params.nullableList.count); - } else { - nonNullValue_0 = ListType_1(); - } - } - } - if (params.optionalList != nil) { - auto & definedValue_0 = request.optionalList.Emplace(); - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.optionalList.count != 0) { - auto * listHolder_1 = new ListHolder(params.optionalList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.optionalList.count; ++i_1) { - if (![params.optionalList[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.optionalList[i_1]; - listHolder_1->mList[i_1] = static_castmList[i_1])>>( - element_1.unsignedCharValue); - } - definedValue_0 = ListType_1(listHolder_1->mList, params.optionalList.count); - } else { - definedValue_0 = ListType_1(); - } - } - } - if (params.nullableOptionalList != nil) { - auto & definedValue_0 = request.nullableOptionalList.Emplace(); - if (params.nullableOptionalList == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - { - using ListType_2 = std::remove_reference_t; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (params.nullableOptionalList.count != 0) { - auto * listHolder_2 = new ListHolder(params.nullableOptionalList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < params.nullableOptionalList.count; ++i_2) { - if (![params.nullableOptionalList[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) params.nullableOptionalList[i_2]; - listHolder_2->mList[i_2] - = static_castmList[i_2])>>( - element_2.unsignedCharValue); - } - nonNullValue_1 = ListType_2(listHolder_2->mList, params.nullableOptionalList.count); - } else { - nonNullValue_1 = ListType_2(); - } - } - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testComplexNullableOptionalRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36116,61 +28463,26 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandSimpleStructEchoRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterSimpleStructResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterSimpleStructResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::SimpleStructEchoRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); - request.arg1.d = [self asByteSpan:params.arg1.d]; - request.arg1.e = [self asCharSpan:params.arg1.e]; - request.arg1.f = static_cast>(params.arg1.f.unsignedCharValue); - request.arg1.g = params.arg1.g.floatValue; - request.arg1.h = params.arg1.h.doubleValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster simpleStructEchoRequestWithParams:params + completion:^(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36201,55 +28513,25 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTimedInvokeRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TimedInvokeRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster timedInvokeRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36271,58 +28553,25 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSimpleOptionalArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.arg1 != nil) { - auto & definedValue_0 = request.arg1.Emplace(); - definedValue_0 = params.arg1.boolValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testSimpleOptionalArgumentRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36345,56 +28594,26 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEmitTestEventRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestEmitTestEventResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestEmitTestEventRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.unsignedCharValue; - request.arg2 = static_cast>(params.arg2.unsignedCharValue); - request.arg3 = params.arg3.boolValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testEmitTestEventRequestWithParams:params + completion:^(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36420,56 +28639,29 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEmitTestFabricScopedEventRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testEmitTestFabricScopedEventRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36487,7 +28679,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve - (NSDictionary *)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) params:params]; @@ -36504,7 +28696,7 @@ - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) value:dataValueDictionary @@ -36514,7 +28706,7 @@ - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeBitmap8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID) params:params]; @@ -36531,7 +28723,7 @@ - (void)writeAttributeBitmap8WithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID) value:dataValueDictionary @@ -36541,7 +28733,7 @@ - (void)writeAttributeBitmap8WithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeBitmap16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID) params:params]; @@ -36558,7 +28750,7 @@ - (void)writeAttributeBitmap16WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID) value:dataValueDictionary @@ -36568,7 +28760,7 @@ - (void)writeAttributeBitmap16WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeBitmap32WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID) params:params]; @@ -36585,7 +28777,7 @@ - (void)writeAttributeBitmap32WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID) value:dataValueDictionary @@ -36595,7 +28787,7 @@ - (void)writeAttributeBitmap32WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeBitmap64WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID) params:params]; @@ -36612,7 +28804,7 @@ - (void)writeAttributeBitmap64WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID) value:dataValueDictionary @@ -36622,7 +28814,7 @@ - (void)writeAttributeBitmap64WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID) params:params]; @@ -36639,7 +28831,7 @@ - (void)writeAttributeInt8uWithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID) value:dataValueDictionary @@ -36649,7 +28841,7 @@ - (void)writeAttributeInt8uWithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID) params:params]; @@ -36666,7 +28858,7 @@ - (void)writeAttributeInt16uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID) value:dataValueDictionary @@ -36676,7 +28868,7 @@ - (void)writeAttributeInt16uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt24uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID) params:params]; @@ -36693,7 +28885,7 @@ - (void)writeAttributeInt24uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID) value:dataValueDictionary @@ -36703,7 +28895,7 @@ - (void)writeAttributeInt24uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt32uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID) params:params]; @@ -36720,7 +28912,7 @@ - (void)writeAttributeInt32uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID) value:dataValueDictionary @@ -36730,7 +28922,7 @@ - (void)writeAttributeInt32uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt40uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID) params:params]; @@ -36747,7 +28939,7 @@ - (void)writeAttributeInt40uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID) value:dataValueDictionary @@ -36757,7 +28949,7 @@ - (void)writeAttributeInt40uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt48uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID) params:params]; @@ -36774,7 +28966,7 @@ - (void)writeAttributeInt48uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID) value:dataValueDictionary @@ -36784,7 +28976,7 @@ - (void)writeAttributeInt48uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt56uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID) params:params]; @@ -36801,7 +28993,7 @@ - (void)writeAttributeInt56uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID) value:dataValueDictionary @@ -36811,7 +29003,7 @@ - (void)writeAttributeInt56uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt64uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID) params:params]; @@ -36828,7 +29020,7 @@ - (void)writeAttributeInt64uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID) value:dataValueDictionary @@ -36838,7 +29030,7 @@ - (void)writeAttributeInt64uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID) params:params]; @@ -36855,7 +29047,7 @@ - (void)writeAttributeInt8sWithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID) value:dataValueDictionary @@ -36865,7 +29057,7 @@ - (void)writeAttributeInt8sWithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID) params:params]; @@ -36882,7 +29074,7 @@ - (void)writeAttributeInt16sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID) value:dataValueDictionary @@ -36892,7 +29084,7 @@ - (void)writeAttributeInt16sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt24sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID) params:params]; @@ -36909,7 +29101,7 @@ - (void)writeAttributeInt24sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID) value:dataValueDictionary @@ -36919,7 +29111,7 @@ - (void)writeAttributeInt24sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt32sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID) params:params]; @@ -36936,7 +29128,7 @@ - (void)writeAttributeInt32sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID) value:dataValueDictionary @@ -36946,7 +29138,7 @@ - (void)writeAttributeInt32sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt40sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID) params:params]; @@ -36963,7 +29155,7 @@ - (void)writeAttributeInt40sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID) value:dataValueDictionary @@ -36973,7 +29165,7 @@ - (void)writeAttributeInt40sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt48sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID) params:params]; @@ -36990,7 +29182,7 @@ - (void)writeAttributeInt48sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID) value:dataValueDictionary @@ -37000,7 +29192,7 @@ - (void)writeAttributeInt48sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt56sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID) params:params]; @@ -37017,7 +29209,7 @@ - (void)writeAttributeInt56sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID) value:dataValueDictionary @@ -37027,7 +29219,7 @@ - (void)writeAttributeInt56sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt64sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID) params:params]; @@ -37044,7 +29236,7 @@ - (void)writeAttributeInt64sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID) value:dataValueDictionary @@ -37054,7 +29246,7 @@ - (void)writeAttributeInt64sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEnum8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID) params:params]; @@ -37071,7 +29263,7 @@ - (void)writeAttributeEnum8WithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID) value:dataValueDictionary @@ -37081,7 +29273,7 @@ - (void)writeAttributeEnum8WithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeEnum16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID) params:params]; @@ -37098,7 +29290,7 @@ - (void)writeAttributeEnum16WithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID) value:dataValueDictionary @@ -37108,7 +29300,7 @@ - (void)writeAttributeEnum16WithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFloatSingleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID) params:params]; @@ -37125,7 +29317,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID) value:dataValueDictionary @@ -37135,7 +29327,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFloatDoubleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID) params:params]; @@ -37152,7 +29344,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID) value:dataValueDictionary @@ -37162,7 +29354,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID) params:params]; @@ -37179,7 +29371,7 @@ - (void)writeAttributeOctetStringWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID) value:dataValueDictionary @@ -37189,7 +29381,7 @@ - (void)writeAttributeOctetStringWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeListInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID) params:params]; @@ -37206,7 +29398,7 @@ - (void)writeAttributeListInt8uWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID) value:dataValueDictionary @@ -37216,7 +29408,7 @@ - (void)writeAttributeListInt8uWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeListOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID) params:params]; @@ -37233,7 +29425,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID) value:dataValueDictionary @@ -37243,7 +29435,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeListStructOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListStructOctetStringID) params:params]; @@ -37262,7 +29454,7 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSDictionary *)readAttributeLongOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID) params:params]; @@ -37289,7 +29481,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID) value:dataValueDictionary @@ -37299,7 +29491,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID) params:params]; @@ -37316,7 +29508,7 @@ - (void)writeAttributeCharStringWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID) value:dataValueDictionary @@ -37326,7 +29518,7 @@ - (void)writeAttributeCharStringWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeLongCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID) params:params]; @@ -37343,7 +29535,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID) value:dataValueDictionary @@ -37353,7 +29545,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeEpochUsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID) params:params]; @@ -37370,7 +29562,7 @@ - (void)writeAttributeEpochUsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID) value:dataValueDictionary @@ -37380,7 +29572,7 @@ - (void)writeAttributeEpochUsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeEpochSWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID) params:params]; @@ -37397,7 +29589,7 @@ - (void)writeAttributeEpochSWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID) value:dataValueDictionary @@ -37407,7 +29599,7 @@ - (void)writeAttributeEpochSWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeVendorIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID) params:params]; @@ -37424,7 +29616,7 @@ - (void)writeAttributeVendorIdWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID) value:dataValueDictionary @@ -37435,7 +29627,7 @@ - (void)writeAttributeVendorIdWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeListNullablesAndOptionalsStructWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListNullablesAndOptionalsStructID) params:params]; @@ -37454,7 +29646,7 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSDictionary *)readAttributeEnumAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID) params:params]; @@ -37481,7 +29673,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID) value:dataValueDictionary @@ -37491,7 +29683,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeStructAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID) params:params]; @@ -37508,7 +29700,7 @@ - (void)writeAttributeStructAttrWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID) value:dataValueDictionary @@ -37518,7 +29710,7 @@ - (void)writeAttributeStructAttrWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8uID) params:params]; @@ -37535,7 +29727,7 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSDictionary *)readAttributeRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8sID) params:params]; @@ -37562,7 +29754,7 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSDictionary *)readAttributeRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16uID) params:params]; @@ -37591,7 +29783,7 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSDictionary *)readAttributeRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16sID) params:params]; @@ -37620,7 +29812,7 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSDictionary *)readAttributeListLongOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID) params:params]; @@ -37647,7 +29839,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID) value:dataValueDictionary @@ -37657,7 +29849,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSDictionary - (NSDictionary *)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID) params:params]; @@ -37674,7 +29866,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID) value:dataValueDictionary @@ -37684,7 +29876,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSDictionary *) - (NSDictionary *)readAttributeTimedWriteBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID) params:params]; @@ -37701,7 +29893,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID) value:dataValueDictionary @@ -37711,7 +29903,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSDictionary * - (NSDictionary *)readAttributeGeneralErrorBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID) params:params]; @@ -37728,7 +29920,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID) value:dataValueDictionary @@ -37738,7 +29930,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterErrorBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID) params:params]; @@ -37755,7 +29947,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID) value:dataValueDictionary @@ -37765,7 +29957,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSDictionary - (NSDictionary *)readAttributeUnsupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) params:params]; @@ -37782,7 +29974,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) value:dataValueDictionary @@ -37792,7 +29984,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeNullableBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) params:params]; @@ -37809,7 +30001,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) value:dataValueDictionary @@ -37819,7 +30011,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeNullableBitmap8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID) params:params]; @@ -37836,7 +30028,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID) value:dataValueDictionary @@ -37846,7 +30038,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSDictionary *)d - (NSDictionary *)readAttributeNullableBitmap16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID) params:params]; @@ -37863,7 +30055,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID) value:dataValueDictionary @@ -37873,7 +30065,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableBitmap32WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID) params:params]; @@ -37890,7 +30082,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID) value:dataValueDictionary @@ -37900,7 +30092,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableBitmap64WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID) params:params]; @@ -37917,7 +30109,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID) value:dataValueDictionary @@ -37927,7 +30119,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID) params:params]; @@ -37944,7 +30136,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID) value:dataValueDictionary @@ -37954,7 +30146,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID) params:params]; @@ -37971,7 +30163,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID) value:dataValueDictionary @@ -37981,7 +30173,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt24uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID) params:params]; @@ -37998,7 +30190,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID) value:dataValueDictionary @@ -38008,7 +30200,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt32uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID) params:params]; @@ -38025,7 +30217,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID) value:dataValueDictionary @@ -38035,7 +30227,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt40uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID) params:params]; @@ -38052,7 +30244,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID) value:dataValueDictionary @@ -38062,7 +30254,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt48uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID) params:params]; @@ -38079,7 +30271,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID) value:dataValueDictionary @@ -38089,7 +30281,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt56uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID) params:params]; @@ -38106,7 +30298,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID) value:dataValueDictionary @@ -38116,7 +30308,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt64uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID) params:params]; @@ -38133,7 +30325,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID) value:dataValueDictionary @@ -38143,7 +30335,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID) params:params]; @@ -38160,7 +30352,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID) value:dataValueDictionary @@ -38170,7 +30362,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID) params:params]; @@ -38187,7 +30379,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID) value:dataValueDictionary @@ -38197,7 +30389,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt24sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID) params:params]; @@ -38214,7 +30406,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID) value:dataValueDictionary @@ -38224,7 +30416,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt32sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID) params:params]; @@ -38241,7 +30433,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID) value:dataValueDictionary @@ -38251,7 +30443,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt40sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID) params:params]; @@ -38268,7 +30460,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID) value:dataValueDictionary @@ -38278,7 +30470,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt48sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID) params:params]; @@ -38295,7 +30487,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID) value:dataValueDictionary @@ -38305,7 +30497,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt56sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID) params:params]; @@ -38322,7 +30514,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID) value:dataValueDictionary @@ -38332,7 +30524,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt64sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID) params:params]; @@ -38349,7 +30541,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID) value:dataValueDictionary @@ -38359,7 +30551,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableEnum8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID) params:params]; @@ -38376,7 +30568,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID) value:dataValueDictionary @@ -38386,7 +30578,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableEnum16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID) params:params]; @@ -38403,7 +30595,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID) value:dataValueDictionary @@ -38413,7 +30605,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableFloatSingleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID) params:params]; @@ -38430,7 +30622,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID) value:dataValueDictionary @@ -38440,7 +30632,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableFloatDoubleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID) params:params]; @@ -38457,7 +30649,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID) value:dataValueDictionary @@ -38467,7 +30659,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID) params:params]; @@ -38484,7 +30676,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID) value:dataValueDictionary @@ -38494,7 +30686,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID) params:params]; @@ -38511,7 +30703,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID) value:dataValueDictionary @@ -38521,7 +30713,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableEnumAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID) params:params]; @@ -38538,7 +30730,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID) value:dataValueDictionary @@ -38548,7 +30740,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableStructWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID) params:params]; @@ -38565,7 +30757,7 @@ - (void)writeAttributeNullableStructWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID) value:dataValueDictionary @@ -38575,7 +30767,7 @@ - (void)writeAttributeNullableStructWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8uID) params:params]; @@ -38594,7 +30786,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8sID) params:params]; @@ -38623,7 +30815,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16uID) params:params]; @@ -38652,7 +30844,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16sID) params:params]; @@ -38681,7 +30873,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSDictionary *)readAttributeWriteOnlyInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID) params:params]; @@ -38708,7 +30900,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID) value:dataValueDictionary @@ -38718,7 +30910,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneratedCommandListID) params:params]; @@ -38726,7 +30918,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID) params:params]; @@ -38734,7 +30926,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEventListID) params:params]; @@ -38742,7 +30934,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID) params:params]; @@ -38750,7 +30942,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID) params:params]; @@ -38758,7 +30950,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h index d26b14c35e3001..db2545a83c9ade 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h @@ -22,466 +22,373 @@ #import "MTRDevice_Internal.h" @interface MTRClusterIdentify () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGroups () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterScenes () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOnOff () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOnOffSwitchConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLevelControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBinaryInputBasic () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPulseWidthModulation () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDescriptor () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBinding () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAccessControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterActions () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBasicInformation () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOTASoftwareUpdateProvider () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOTASoftwareUpdateRequestor () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLocalizationConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTimeFormatLocalization () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterUnitLocalization () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPowerSourceConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPowerSource () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGeneralCommissioning () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterNetworkCommissioning () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDiagnosticLogs () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGeneralDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterSoftwareDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterThreadNetworkDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterWiFiNetworkDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterEthernetNetworkDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTimeSynchronization () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBridgedDeviceBasicInformation () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterSwitch () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAdministratorCommissioning () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOperationalCredentials () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGroupKeyManagement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFixedLabel () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterUserLabel () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBooleanState () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterICDManagement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterModeSelect () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLaundryWasherMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRefrigeratorAndTemperatureControlledCabinetMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLaundryWasherControls () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRVCRunMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRVCCleanMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTemperatureControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRefrigeratorAlarm () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDishwasherMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAirQuality () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterSmokeCOAlarm () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDishwasherAlarm () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOperationalState () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRVCOperationalState () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterHEPAFilterMonitoring () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterActivatedCarbonFilterMonitoring () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDoorLock () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterWindowCovering () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBarrierControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPumpConfigurationAndControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterThermostat () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFanControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterThermostatUserInterfaceConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterColorControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBallastConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterIlluminanceMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTemperatureMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPressureMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFlowMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRelativeHumidityMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOccupancySensing () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterCarbonMonoxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterCarbonDioxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterNitrogenDioxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOzoneConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPM25ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFormaldehydeConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPM1ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPM10ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRadonConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterWakeOnLAN () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterChannel () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTargetNavigator () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterMediaPlayback () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterMediaInput () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLowPower () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterKeypadInput () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterContentLauncher () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAudioOutput () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterApplicationLauncher () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterApplicationBasic () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAccountLogin () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterElectricalMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterUnitTesting () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 18639dbed88eb0..16acf214e7f7b8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -21,6 +21,10 @@ NS_ASSUME_NONNULL_BEGIN +@interface MTROperationalCredentialsClusterAttestationResponseParams () +@property (nonatomic, strong) NSData * attestationChallenge; +@end + @interface MTRGroupsClusterAddGroupResponseParams (InternalMethods) - (CHIP_ERROR)_setFieldsFromDecodableStruct: diff --git a/src/platform/Ameba/KeyValueStoreManagerImpl.cpp b/src/platform/Ameba/KeyValueStoreManagerImpl.cpp index 282d58c47c1f65..386127c68656c7 100644 --- a/src/platform/Ameba/KeyValueStoreManagerImpl.cpp +++ b/src/platform/Ameba/KeyValueStoreManagerImpl.cpp @@ -88,16 +88,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, goto exit; } - if (checkExist(key, key)) - { - error = deleteKey(key, key); - err = AmebaUtils::MapError(error, AmebaErrorType::kDctError); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Warning, KVS leakage, failed to remove old kvs value"); - } - } - + deleteKey(key, key); // delete key if it exists error = setPref_new(key, key, (uint8_t *) value, value_size); err = AmebaUtils::MapError(error, AmebaErrorType::kDctError); diff --git a/src/platform/ESP32/CHIPDevicePlatformConfig.h b/src/platform/ESP32/CHIPDevicePlatformConfig.h index 493d240000c203..f7d59b60197bde 100644 --- a/src/platform/ESP32/CHIPDevicePlatformConfig.h +++ b/src/platform/ESP32/CHIPDevicePlatformConfig.h @@ -24,6 +24,7 @@ */ #pragma once +#include // ==================== Platform Adaptations ==================== @@ -72,8 +73,10 @@ #define CHIP_DEVICE_CONFIG_ENABLE_WIFI CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP | CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION #endif // CONFIG_IDF_TARGET_ESP32H2 -#define CHIP_DEVICE_CONFIG_ENABLE_SED \ - !CONFIG_ENABLE_ETHERNET_TELEMETRY && (CONFIG_WIFI_POWER_SAVE_MIN || CONFIG_WIFI_POWER_SAVE_MAX) +#if CONFIG_ENABLE_ICD_SERVER +#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_ICD_SLOW_POLL_INTERVAL) +#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_ICD_FAST_POLL_INTERVAL) +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE CONFIG_ENABLE_CHIPOBLE #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY CONFIG_ENABLE_EXTENDED_DISCOVERY diff --git a/src/platform/ESP32/ConnectivityManagerImpl.h b/src/platform/ESP32/ConnectivityManagerImpl.h index bc12092c506391..97d07b894cb9c2 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl.h +++ b/src/platform/ESP32/ConnectivityManagerImpl.h @@ -119,10 +119,8 @@ class ConnectivityManagerImpl final : public ConnectivityManager, void _OnWiFiScanDone(); void _OnWiFiStationProvisionChange(); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + CHIP_ERROR _SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); #endif // ===== Private members reserved for use by this class only. diff --git a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp index e79ba6e5830aaf..27ecfbcfd74bc5 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp @@ -423,10 +423,7 @@ CHIP_ERROR ConnectivityManagerImpl::InitWiFi() std::min(sizeof(wifiConfig.sta.password), strlen(CONFIG_DEFAULT_WIFI_PASSWORD))); wifiConfig.sta.scan_method = WIFI_ALL_CHANNEL_SCAN; wifiConfig.sta.sort_method = WIFI_CONNECT_AP_BY_SIGNAL; -#if CONFIG_WIFI_POWER_SAVE_MAX - wifiConfig.sta.listen_interval = CONFIG_WIFI_PS_LISTEN_INTERVAL; -#endif - esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &wifiConfig); + esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &wifiConfig); if (err != ESP_OK) { ChipLogError(DeviceLayer, "esp_wifi_set_config() failed: %s", esp_err_to_name(err)); @@ -1112,32 +1109,15 @@ void ConnectivityManagerImpl::OnStationIPv6AddressAvailable(const ip_event_got_i #endif } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -static constexpr uint32_t kBeaconIntervalMs = 100; -static constexpr uint32_t kDefaultDTIMInterval = 3; // this is determined by the AP, use a constant value for it. - -CHIP_ERROR ConnectivityManagerImpl::_GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & sedIntervalsConfig) -{ - sedIntervalsConfig.ActiveIntervalMS = chip::System::Clock::Milliseconds32(kBeaconIntervalMs); -#if CONFIG_WIFI_POWER_SAVE_MIN - sedIntervalsConfig.IdleIntervalMS = chip::System::Clock::Milliseconds32(kDefaultDTIMInterval * kBeaconIntervalMs); -#elif CONFIG_WIFI_POWER_SAVE_MAX - sedIntervalsConfig.IdleIntervalMS = chip::System::Clock::Milliseconds32(CONFIG_WIFI_PS_LISTEN_INTERVAL * kBeaconIntervalMs); -#endif - return CHIP_NO_ERROR; -} - -CHIP_ERROR ConnectivityManagerImpl::_SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} +#if CHIP_CONFIG_ENABLE_ICD_SERVER -CHIP_ERROR ConnectivityManagerImpl::_RequestSEDActiveMode(bool onOff, bool delayIdle) +CHIP_ERROR ConnectivityManagerImpl::_SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) { - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + (void) pollingInterval; + // For ESP32 platform, the listen interval of the legacy power-saving mode can only be configured before connecting to AP. + return CHIP_ERROR_NOT_IMPLEMENTED; } - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SED +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index e04d807507cb42..0afc494ac6cc29 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -231,12 +231,14 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** { ifp->hardwareAddress = ByteSpan(ifp->MacAddress, 6); } +#if !CONFIG_DISABLE_IPV4 if (esp_netif_get_ip_info(ifa, &ipv4_info) == ESP_OK) { memcpy(ifp->Ipv4AddressesBuffer[0], &(ipv4_info.ip.addr), kMaxIPv4AddrSize); ifp->Ipv4AddressSpans[0] = ByteSpan(ifp->Ipv4AddressesBuffer[0], kMaxIPv4AddrSize); ifp->IPv4Addresses = app::DataModel::List(ifp->Ipv4AddressSpans, 1); } +#endif static_assert(kMaxIPv6AddrCount <= UINT8_MAX, "Count might not fit in ipv6_addr_count"); static_assert(ArraySize(ip6_addr) >= LWIP_IPV6_NUM_ADDRESSES, "Not enough space for our addresses."); diff --git a/src/platform/ESP32/ESP32Utils.cpp b/src/platform/ESP32/ESP32Utils.cpp index c5000929ab08dd..4a03d08282dcda 100644 --- a/src/platform/ESP32/ESP32Utils.cpp +++ b/src/platform/ESP32/ESP32Utils.cpp @@ -117,13 +117,6 @@ CHIP_ERROR ESP32Utils::StartWiFiLayer(void) ChipLogError(DeviceLayer, "esp_wifi_start() failed: %s", esp_err_to_name(err)); return ESP32Utils::MapError(err); } -#if CONFIC_WIFI_POWER_SAVE_MIN - esp_wifi_set_ps(WIFI_PS_MIN_MODEM); -#elif CONFIC_WIFI_POWER_SAVE_MAX - esp_wifi_set_ps(WIFI_PS_MAX_MODEM); -#elif CONFIG_WIFI_POWER_SAVE_NONE - esp_wifi_set_ps(WIFI_PS_NONE); -#endif } return CHIP_NO_ERROR; diff --git a/src/platform/ESP32/NetworkCommissioningDriver.cpp b/src/platform/ESP32/NetworkCommissioningDriver.cpp index 2c597da14d2ad3..e2ef8bb660ed0b 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.cpp +++ b/src/platform/ESP32/NetworkCommissioningDriver.cpp @@ -223,9 +223,6 @@ CHIP_ERROR ESPWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, memset(&wifiConfig, 0, sizeof(wifiConfig)); memcpy(wifiConfig.sta.ssid, ssid, std::min(ssidLen, static_cast(sizeof(wifiConfig.sta.ssid)))); memcpy(wifiConfig.sta.password, key, std::min(keyLen, static_cast(sizeof(wifiConfig.sta.password)))); -#if CONFIG_WIFI_POWER_SAVE_MAX - wifiConfig.sta..listen_interval = CONFIG_WIFI_PS_LISTEN_INTERVAL; -#endif // Configure the ESP WiFi interface. esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &wifiConfig); diff --git a/src/platform/silabs/efr32/psa_crypto_config.h b/src/platform/silabs/efr32/psa_crypto_config.h index 165a7b94967e74..450f9233cb9c4b 100644 --- a/src/platform/silabs/efr32/psa_crypto_config.h +++ b/src/platform/silabs/efr32/psa_crypto_config.h @@ -121,3 +121,8 @@ #endif #endif // TFM_CONFIG_SL_SECURE_LIBRARY + +/* Defaults in GSDK 4.3.0 */ +#define SL_PSA_ITS_SUPPORT_V1_DRIVER 0 +#define SL_PSA_ITS_SUPPORT_V2_DRIVER 0 +#define SL_PSA_ITS_SUPPORT_V3_DRIVER 1 diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 1d3f3fc944514e..67f5bc4f952b8c 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -27,10 +27,7 @@ import chip.clusters as Clusters import chip.tlv -from chip import discovery from chip.clusters.Attribute import ValueDecodeFailure -from chip.exceptions import ChipStackError -from chip.setup_payload import SetupPayload from matter_testing_support import AttributePathLocation, MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts @@ -171,32 +168,10 @@ async def setup_class(self): dump_device_composition_path: Optional[str] = self.user_params.get("dump_device_composition_path", None) if do_test_over_pase: - if self.matter_test_config.qr_code_content is not None: - qr_code = self.matter_test_config.qr_code_content - try: - setup_payload = SetupPayload().ParseQrCode(qr_code) - except ChipStackError: - asserts.fail(f"QR code '{qr_code} failed to parse properly as a Matter setup code.") - - elif self.matter_test_config.manual_code is not None: - manual_code = self.matter_test_config.manual_code - try: - setup_payload = SetupPayload().ParseManualPairingCode(manual_code) - except ChipStackError: - asserts.fail( - f"Manual code code '{manual_code}' failed to parse properly as a Matter setup code. Check that all digits are correct and length is 11 or 21 characters.") - else: - asserts.fail("Require either --qr-code or --manual-code to proceed with PASE needed for test.") - - if setup_payload.short_discriminator is not None: - filter_type = discovery.FilterType.SHORT_DISCRIMINATOR - filter_value = setup_payload.short_discriminator - else: - filter_type = discovery.FilterType.LONG_DISCRIMINATOR - filter_value = setup_payload.long_discriminator + info = self.get_setup_payload_info() commissionable_nodes = dev_ctrl.DiscoverCommissionableNodes( - filter_type, filter_value, stopOnFirst=True, timeoutSecond=15) + info.filter_type, info.filter_value, stopOnFirst=True, timeoutSecond=15) logging.info(f"Commissionable nodes: {commissionable_nodes}") # TODO: Support BLE if commissionable_nodes is not None and len(commissionable_nodes) > 0: @@ -208,7 +183,7 @@ async def setup_class(self): logging.info(f"Found instance {instance_name}, VID={vid}, PID={pid}, Address={address}") node_id = 1 - dev_ctrl.EstablishPASESessionIP(address, setup_payload.setup_passcode, node_id) + dev_ctrl.EstablishPASESessionIP(address, info.passcode, node_id) else: asserts.fail("Failed to find the DUT according to command line arguments.") else: @@ -465,8 +440,20 @@ def test_TC_PS_3_1(self): for endpoint_id, endpoint in self.endpoints.items(): if Clusters.PowerSource not in endpoint: continue + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) + cluster_revision = Clusters.PowerSource.Attributes.ClusterRevision + if cluster_revision not in endpoint[Clusters.PowerSource]: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, + attribute_id=cluster_revision.attribute_id) + self.record_error(self.get_test_name( + ), location=location, problem=f'Did not find Cluster revision on {location.as_cluster_string(self.cluster_mapper)}', spec_location='Global attributes') + if endpoint[Clusters.PowerSource][cluster_revision] < 2: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, + attribute_id=cluster_revision.attribute_id) + self.record_note(self.get_test_name(), location=location, + problem='Power source ClusterRevision is < 2, skipping remainder of test for this endpoint') + continue if Clusters.PowerSource.Attributes.EndpointList not in endpoint[Clusters.PowerSource]: - location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) self.record_error(self.get_test_name(), location=location, problem=f'Did not find {attribute_string} on {location.as_cluster_string(self.cluster_mapper)}', spec_location="EndpointList Attribute") success = False diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 008848177b3271..a394952445de60 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -47,9 +47,12 @@ import chip.clusters as Clusters import chip.logging import chip.native +from chip import discovery from chip.ChipStack import ChipStack from chip.clusters.Attribute import EventReadResult, SubscriptionTransaction +from chip.exceptions import ChipStackError from chip.interaction_model import InteractionModelError, Status +from chip.setup_payload import SetupPayload from chip.storage import PersistentStorage from chip.tracing import TracingContext from mobly import asserts, base_test, signals, utils @@ -350,6 +353,13 @@ class ProblemNotice: spec_location: str = "" +@dataclass +class SetupPayloadInfo: + filter_type: discovery.FilterType = discovery.FilterType.LONG_DISCRIMINATOR + filter_value: int = 0 + passcode: int = 0 + + class MatterStackState: def __init__(self, config: MatterTestConfig): self._logger = logger @@ -550,6 +560,35 @@ def record_warning(self, test_name: str, location: Union[AttributePathLocation, def record_note(self, test_name: str, location: Union[AttributePathLocation, EventPathLocation, CommandPathLocation], problem: str, spec_location: str = ""): self.problems.append(ProblemNotice(test_name, location, ProblemSeverity.NOTE, problem, spec_location)) + def get_setup_payload_info(self) -> SetupPayloadInfo: + if self.matter_test_config.qr_code_content is not None: + qr_code = self.matter_test_config.qr_code_content + try: + setup_payload = SetupPayload().ParseQrCode(qr_code) + except ChipStackError: + asserts.fail(f"QR code '{qr_code} failed to parse properly as a Matter setup code.") + + elif self.matter_test_config.manual_code is not None: + manual_code = self.matter_test_config.manual_code + try: + setup_payload = SetupPayload().ParseManualPairingCode(manual_code) + except ChipStackError: + asserts.fail( + f"Manual code code '{manual_code}' failed to parse properly as a Matter setup code. Check that all digits are correct and length is 11 or 21 characters.") + else: + asserts.fail("Require either --qr-code or --manual-code.") + + info = SetupPayloadInfo() + info.passcode = setup_payload.setup_passcode + if setup_payload.short_discriminator is not None: + info.filter_type = discovery.FilterType.SHORT_DISCRIMINATOR + info.filter_value = setup_payload.short_discriminator + else: + info.filter_type = discovery.FilterType.LONG_DISCRIMINATOR + info.filter_value = setup_payload.long_discriminator + + return info + def generate_mobly_test_config(matter_test_config: MatterTestConfig): test_run_config = TestRunConfig() @@ -755,12 +794,15 @@ def populate_commissioning_args(args: argparse.Namespace, config: MatterTestConf print("error: supplied number of discriminators does not match number of passcodes") return False - if len(config.dut_node_ids) > len(config.discriminators): + device_descriptors = [config.qr_code_content] if config.qr_code_content is not None else [ + config.manual_code] if config.manual_code is not None else config.discriminators + + if len(config.dut_node_ids) > len(device_descriptors): print("error: More node IDs provided than discriminators") return False - if len(config.dut_node_ids) < len(config.discriminators): - missing = len(config.discriminators) - len(config.dut_node_ids) + if len(config.dut_node_ids) < len(device_descriptors): + missing = len(device_descriptors) - len(config.dut_node_ids) # We generate new node IDs sequentially from the last one seen for all # missing NodeIDs when commissioning many nodes at once. for i in range(missing): @@ -985,27 +1027,35 @@ def _commission_device(self, i) -> bool: dev_ctrl = self.default_controller conf = self.matter_test_config - # TODO: support by manual code and QR + # TODO: qr code and manual code aren't lists + + if conf.qr_code_content or conf.manual_code: + info = self.get_setup_payload_info() + else: + info = SetupPayloadInfo() + info.passcode = conf.setup_passcodes[i] + info.filter_type = DiscoveryFilterType.LONG_DISCRIMINATOR + info.filter_value = conf.discriminators[i] if conf.commissioning_method == "on-network": return dev_ctrl.CommissionOnNetwork( nodeId=conf.dut_node_ids[i], - setupPinCode=conf.setup_passcodes[i], - filterType=DiscoveryFilterType.LONG_DISCRIMINATOR, - filter=conf.discriminators[i] + setupPinCode=info.passcode, + filterType=info.filter_type, + filter=info.filter_value ) elif conf.commissioning_method == "ble-wifi": return dev_ctrl.CommissionWiFi( - conf.discriminators[i], - conf.setup_passcodes[i], + info.filter_value, + info.passcode, conf.dut_node_ids[i], conf.wifi_ssid, conf.wifi_passphrase ) elif conf.commissioning_method == "ble-thread": return dev_ctrl.CommissionThread( - conf.discriminators[i], - conf.setup_passcodes[i], + info.filter_value, + info.passcode, conf.dut_node_ids[i], conf.thread_operational_dataset ) @@ -1013,7 +1063,7 @@ def _commission_device(self, i) -> bool: logging.warning("==== USING A DIRECT IP COMMISSIONING METHOD NOT SUPPORTED IN THE LONG TERM ====") return dev_ctrl.CommissionIP( ipaddr=conf.commissionee_ip_address_just_for_testing, - setupPinCode=conf.setup_passcodes[i], nodeid=conf.dut_node_ids[i] + setupPinCode=info.passcode, nodeid=conf.dut_node_ids[i] ) else: raise ValueError("Invalid commissioning method %s!" % conf.commissioning_method) diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h index d0188ca70f46e2..dceac0f8a49479 100644 --- a/src/system/SystemConfig.h +++ b/src/system/SystemConfig.h @@ -293,23 +293,17 @@ #endif // CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING && CHIP_SYSTEM_CONFIG_NO_LOCKING /** - * @def CHIP_SYSTEM_HEADER_RESERVE_SIZE + * @def CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE * * @brief * The number of bytes to reserve in a network packet buffer to contain - * the CHIP message and exchange headers. - * - * This number was calculated as follows: + * the Matter crypto headers. * - * CHIP Crypto Header: - * - * 4 -- Length of encrypted block - * 4 -- Reserve - * 8 -- Initialization Vector - * 8 -- Encryption Tag + * This is 0, because Matter does not have any crypto headers. This define + * is still here only for backwards compatibility. */ #ifndef CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE -#define CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE 24 +#define CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE 0 #endif /** @@ -317,31 +311,39 @@ * * @brief * The number of bytes to reserve in a network packet buffer to contain - * the CHIP message and exchange headers. + * the CHIP message and payload headers. * * This number was calculated as follows: * - * CHIP Message Header: + * Matter Message Header: * * 2 -- Frame Length - * 2 -- Message Header - * 4 -- Message Id - * 8 -- Source Node Id - * 8 -- Destination Node Id - * 2 -- Key Id + * 1 -- Message Flags + * 2 -- Session ID + * 1 -- Security Flags + * 4 -- Message Counter + * 8 -- Source Node ID + * 8 -- Destination Node ID + * + * Total: 26 bytes. + * + * Matter Payload Header: * - * CHIP Exchange Header: + * 1 -- Exhange Flags + * 1 -- Protocol Opcode + * 2 -- Exchange ID + * 2 -- Protocol Vendor ID + * 2 -- Protocol ID + * 4 -- Acknowledged MEssage Counter * - * 1 -- Application Version - * 1 -- Message Type - * 2 -- Exchange Id - * 4 -- Profile Id - * 4 -- Acknowledged Message Id + * Total: 12 bytes. * - * @note A number of these fields are optional or not presently used. So most headers will be considerably smaller than this. + * @note A number of these fields are optional or not presently used. So most + * headers will be considerably smaller than this. + * @note This calculation assumes ther are no Message Extensions or Secured Extensions. */ #ifndef CHIP_SYSTEM_HEADER_RESERVE_SIZE -#define CHIP_SYSTEM_HEADER_RESERVE_SIZE (38 + CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE) +#define CHIP_SYSTEM_HEADER_RESERVE_SIZE (26 + 12 + CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE) #endif /* CHIP_SYSTEM_HEADER_RESERVE_SIZE */ /** diff --git a/src/transport/raw/MessageHeader.h b/src/transport/raw/MessageHeader.h index ec957315714bbb..aa7185d8ff7412 100644 --- a/src/transport/raw/MessageHeader.h +++ b/src/transport/raw/MessageHeader.h @@ -35,15 +35,42 @@ #include #include #include +#include #include #include #include namespace chip { +namespace detail { +// Figure out the max size of a packet we can allocate, including all headers. +static constexpr size_t kMaxIPPacketSizeBytes = 1280; +static constexpr size_t kMaxUDPAndIPHeaderSizeBytes = 48; + +static_assert(kMaxIPPacketSizeBytes >= kMaxUDPAndIPHeaderSizeBytes + CHIP_SYSTEM_HEADER_RESERVE_SIZE, + "Matter headers and IP headers must fit in an MTU."); + +// Max space we have for our Application Payload and MIC, per spec. +static constexpr size_t kMaxPerSpecApplicationPayloadAndMICSizeBytes = + kMaxIPPacketSizeBytes - kMaxUDPAndIPHeaderSizeBytes - CHIP_SYSTEM_HEADER_RESERVE_SIZE; + +// Max space we have for our Application Payload and MIC in our actual packet +// buffers. This is the size _excluding_ the header reserve. +static constexpr size_t kMaxPacketBufferApplicationPayloadAndMICSizeBytes = System::PacketBuffer::kMaxSize; + +static constexpr size_t kMaxApplicationPayloadAndMICSizeBytes = + min(kMaxPerSpecApplicationPayloadAndMICSizeBytes, kMaxPacketBufferApplicationPayloadAndMICSizeBytes); + +} // namespace detail + static constexpr size_t kMaxTagLen = 16; -static constexpr size_t kMaxAppMessageLen = 1200; +static_assert(detail::kMaxApplicationPayloadAndMICSizeBytes > kMaxTagLen, "Need to be able to fit our tag in a message"); + +// This is somewhat of an under-estimate, because in practice any time we have a +// tag we will not have source/destination node IDs, but above we are including +// those in the header sizes. +static constexpr size_t kMaxAppMessageLen = detail::kMaxApplicationPayloadAndMICSizeBytes - kMaxTagLen; static constexpr uint16_t kMsgUnicastSessionIdUnsecured = 0x0000; diff --git a/third_party/imgui/repo b/third_party/imgui/repo index 19ae142bdddf9f..226923fa7e9d73 160000 --- a/third_party/imgui/repo +++ b/third_party/imgui/repo @@ -1 +1 @@ -Subproject commit 19ae142bdddf9fcb840549b4b1279739a36c3fa6 +Subproject commit 226923fa7e9d73e28958a04884943318797d9991 diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index e15b8d21d62a68..f97832a5ecb422 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit e15b8d21d62a68ac602c4f8dbfd6cb17d04bf06c +Subproject commit f97832a5ecb422b9fe75d39bc168962d763648e8 diff --git a/third_party/ot-br-posix/repo b/third_party/ot-br-posix/repo index 8a6c5a03a2eec6..b0bbad3ed28e60 160000 --- a/third_party/ot-br-posix/repo +++ b/third_party/ot-br-posix/repo @@ -1 +1 @@ -Subproject commit 8a6c5a03a2eec6e71cfed0fe35451841ca24bb4e +Subproject commit b0bbad3ed28e60bef7cd206c15a9a46e0528f919 diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index cdb7b4274c4968..b64115bee8df00 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -125,6 +125,7 @@ class TestList : public Command printf("Test_TC_CGEN_2_1\n"); printf("Test_TC_DGGEN_1_1\n"); printf("Test_TC_DGGEN_2_1\n"); + printf("Test_TC_GRPKEY_1_1\n"); printf("Test_TC_ICDM_1_1\n"); printf("Test_TC_ICDM_2_1\n"); printf("Test_TC_I_1_1\n"); @@ -218,6 +219,7 @@ class TestList : public Command printf("Test_TC_SMOKECO_2_6\n"); printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_1\n"); + printf("Test_TC_RVCOPSTATE_1_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); printf("Test_TC_TSTAT_1_1\n"); @@ -376,6 +378,7 @@ class ManualTestList : public Command printf("TestGroupDemoConfig\n"); printf("Test_TC_G_2_2\n"); printf("Test_TC_G_2_3\n"); + printf("Test_TC_G_2_4\n"); printf("Test_TC_G_3_2\n"); printf("Test_TC_BDX_1_1\n"); printf("Test_TC_BDX_1_2\n"); @@ -417,9 +420,6 @@ class ManualTestList : public Command printf("Test_TC_CNET_4_14\n"); printf("Test_TC_CNET_4_15\n"); printf("Test_TC_CNET_4_16\n"); - printf("Test_TC_CNET_4_17\n"); - printf("Test_TC_CNET_4_18\n"); - printf("Test_TC_CNET_4_19\n"); printf("Test_TC_CNET_4_20\n"); printf("Test_TC_CNET_4_21\n"); printf("Test_TC_CNET_4_22\n"); @@ -441,12 +441,9 @@ class ManualTestList : public Command printf("Test_TC_DISHM_3_2\n"); printf("Test_TC_DISHM_3_3\n"); printf("Test_TC_DESC_2_1\n"); - printf("Test_TC_FAN_3_3\n"); - printf("Test_TC_FAN_3_5\n"); printf("Test_TC_CGEN_2_2\n"); printf("Test_TC_DGGEN_2_2\n"); printf("Test_TC_DGGEN_2_3\n"); - printf("Test_TC_DGGEN_3_1\n"); printf("Test_TC_ICDM_2_2\n"); printf("Test_TC_ICDM_2_3\n"); printf("Test_TC_I_3_2\n"); @@ -467,6 +464,8 @@ class ManualTestList : public Command printf("Test_TC_IDM_6_4\n"); printf("Test_TC_IDM_7_1\n"); printf("Test_TC_IDM_8_1\n"); + printf("Test_TC_IDM_10_1\n"); + printf("Test_TC_IDM_11_1\n"); printf("Test_TC_LOWPOWER_2_2\n"); printf("Test_TC_APPLAUNCHER_3_7_1\n"); printf("Test_TC_APPLAUNCHER_3_8_1\n"); @@ -512,6 +511,8 @@ class ManualTestList : public Command printf("Test_TC_CADMIN_1_13\n"); printf("Test_TC_CADMIN_1_23\n"); printf("Test_TC_CADMIN_1_24\n"); + printf("Test_TC_CADMIN_1_25\n"); + printf("Test_TC_CADMIN_1_26\n"); printf("Test_TC_MOD_1_2\n"); printf("Test_TC_MOD_1_3\n"); printf("Test_TC_MOD_2_1\n"); @@ -576,9 +577,7 @@ class ManualTestList : public Command printf("Test_TC_CC_9_3\n"); printf("Test_TC_DRLK_2_10\n"); printf("Test_TC_DRLK_3_2\n"); - printf("Test_TC_DRLK_3_3\n"); printf("Test_TC_LCFG_2_1\n"); - printf("Test_TC_LVL_8_1\n"); printf("Test_TC_LWM_1_1\n"); printf("Test_TC_LWM_1_2\n"); printf("Test_TC_LWM_2_1\n"); @@ -624,26 +623,19 @@ class ManualTestList : public Command printf("Test_TC_TCTL_3_2\n"); printf("Test_TC_TCTL_3_3\n"); printf("Test_TC_TMP_2_2\n"); - printf("Test_TC_TSTAT_3_1\n"); printf("Test_TC_TSTAT_3_2\n"); printf("Test_TC_DGTHREAD_2_5\n"); printf("Test_TC_ACT_2_1\n"); printf("Test_TC_ACT_2_2\n"); printf("Test_TC_ACT_3_2\n"); - printf("Test_TC_LTIME_2_1\n"); printf("Test_TC_LTIME_3_1\n"); - printf("Test_TC_TIMESYNC_2_15\n"); printf("Test_TC_BIND_2_1\n"); printf("Test_TC_BIND_2_2\n"); printf("Test_TC_BIND_2_3\n"); printf("Test_TC_S_1_1\n"); printf("Test_TC_S_2_1\n"); - printf("Test_TC_S_2_2\n"); - printf("Test_TC_S_2_3\n"); - printf("Test_TC_S_2_4\n"); printf("Test_TC_S_2_5\n"); printf("Test_TC_S_2_6\n"); - printf("Test_TC_S_3_1\n"); printf("Test_TC_BRBINFO_2_2\n"); printf("Test_TC_BRBINFO_3_1\n"); printf("Test_TC_WASHERCTRL_1_1\n"); @@ -10837,12 +10829,7 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -11072,8 +11059,13 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "Step 3: TH reads the FeatureMap from DUT"); @@ -12640,12 +12632,7 @@ class Test_TC_CC_1_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -13387,8 +13374,13 @@ class Test_TC_CC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ClusterRevision::Id, - true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); @@ -16923,7 +16915,7 @@ class Test_TC_CC_4_3Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 19: { - LogStep(19, "TStep 3c: H reads CurrentSaturation attribute from DUT"); + LogStep(19, "Step 3c: H reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); @@ -16994,7 +16986,7 @@ class Test_TC_CC_4_3Suite : public TestCommand chip::NullOptional); } case 28: { - LogStep(28, "TStep 4b: H reads EnhancedColorMode attribute from DUT"); + LogStep(28, "Step 4b: H reads EnhancedColorMode attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, true, chip::NullOptional); @@ -19240,7 +19232,7 @@ class Test_TC_CC_6_1Suite : public TestCommand ); } case 3: { - LogStep(3, "TStep 1a: H reads ColorTempPhysicalMinMireds attribute from DUT"); + LogStep(3, "Step 1a: H reads ColorTempPhysicalMinMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); @@ -22345,7 +22337,7 @@ class Test_TC_CC_8_1Suite : public TestCommand } case 3: { LogStep(3, - "TStep 2a: H sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " + "Step 2a: H sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " "TransitionTime=0 (immediately)."); VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -24288,7 +24280,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand { public: Test_TC_CDOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CDOCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_CDOCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -24339,8 +24331,8 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -24349,7 +24341,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -24358,7 +24350,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -24367,10 +24359,19 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -24380,16 +24381,17 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -24399,16 +24401,17 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -24418,16 +24421,17 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -24437,16 +24441,17 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24461,7 +24466,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24475,7 +24480,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24484,7 +24489,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24493,7 +24498,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24505,7 +24510,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24518,7 +24523,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24528,7 +24533,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24538,7 +24543,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24548,7 +24553,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24558,7 +24563,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24567,7 +24572,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24576,7 +24581,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24588,7 +24593,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24600,7 +24605,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24636,185 +24641,190 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !CDOCONC.S.F00 && !CDOCONC.S.F01 && !CDOCONC.S.F02 && !CDOCONC.S.F03 && !CDOCONC.S.F04 && !CDOCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F02 && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F02 && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F03 && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F03 && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F04 && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F04 && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F05 && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F05 && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.A0007 && CDOCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CDOCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.A0007 && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CDOCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "CDOCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "CDOCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "CDOCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "CDOCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, + CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -25064,7 +25074,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand { public: Test_TC_CMOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CMOCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_CMOCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25115,8 +25125,8 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -25125,7 +25135,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -25134,7 +25144,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -25143,10 +25153,19 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25156,7 +25175,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25165,7 +25184,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25175,7 +25194,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25184,7 +25203,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25194,7 +25213,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25203,7 +25222,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25213,7 +25232,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25222,7 +25241,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25237,7 +25256,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25251,7 +25270,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25260,7 +25279,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25269,7 +25288,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25281,7 +25300,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25294,7 +25313,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25304,7 +25323,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25314,7 +25333,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25324,7 +25343,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25334,7 +25353,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25343,7 +25362,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25352,7 +25371,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25364,7 +25383,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25376,7 +25395,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25412,185 +25431,190 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !CMOCONC.S.F00 && !CMOCONC.S.F01 && !CMOCONC.S.F02 && !CMOCONC.S.F03 && !CMOCONC.S.F04 && !CMOCONC.S.F05 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F02 && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F02 && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F03 && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F03 && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F04 && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F04 && !CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F05 && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F05 && !CMOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.A0007 && CMOCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CMOCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.A0007 && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CMOCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "CMOCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "CMOCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "CMOCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "CMOCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, + CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -25842,7 +25866,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand { public: Test_TC_FLDCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_FLDCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_FLDCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25893,8 +25917,8 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -25903,7 +25927,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -25912,7 +25936,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -25921,10 +25945,19 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25934,7 +25967,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25943,7 +25976,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25953,7 +25986,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25962,7 +25995,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25972,7 +26005,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25981,7 +26014,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25991,7 +26024,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26000,7 +26033,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26015,7 +26048,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26029,7 +26062,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26038,7 +26071,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26047,7 +26080,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26059,7 +26092,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26072,7 +26105,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26082,7 +26115,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26092,7 +26125,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26102,7 +26135,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26112,7 +26145,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26121,7 +26154,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26130,7 +26163,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26142,7 +26175,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26154,7 +26187,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26190,185 +26223,190 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !FLDCONC.S.F00 && !FLDCONC.S.F01 && !FLDCONC.S.F02 && !FLDCONC.S.F03 && !FLDCONC.S.F04 && !FLDCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F02 && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F02 && !FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F03 && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F03 && !FLDCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F04 && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F04 && !FLDCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F05 && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F05 && !FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.A0007 && FLDCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when FLDCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.A0007 && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when FLDCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "FLDCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "FLDCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "FLDCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "FLDCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, + FormaldehydeConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -26616,7 +26654,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand { public: Test_TC_NDOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_NDOCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_NDOCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -26667,8 +26705,8 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -26677,7 +26715,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -26686,7 +26724,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -26695,10 +26733,19 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26708,7 +26755,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26717,7 +26764,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26727,7 +26774,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26736,7 +26783,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26746,7 +26793,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26755,7 +26802,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26765,7 +26812,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26774,7 +26821,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26789,7 +26836,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26803,7 +26850,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26812,7 +26859,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26821,7 +26868,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26833,7 +26880,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26846,7 +26893,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26856,7 +26903,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26866,7 +26913,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26876,7 +26923,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26886,7 +26933,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26895,7 +26942,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26904,7 +26951,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26916,7 +26963,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26928,7 +26975,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26964,186 +27011,191 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !NDOCONC.S.F00 && !NDOCONC.S.F01 && !NDOCONC.S.F02 && !NDOCONC.S.F03 && !NDOCONC.S.F04 && !NDOCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F02 && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F02 && !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F03 && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F03 && !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F04 && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F04 && NDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F05 && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F05 && !NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.A0007 && NDOCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when NDOCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.A0007 && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when NDOCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "NDOCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "NDOCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "NDOCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "NDOCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, + NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -27395,7 +27447,7 @@ class Test_TC_NDOCONC_2_1Suite : public TestCommand class Test_TC_OZCONC_1_1Suite : public TestCommand { public: - Test_TC_OZCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OZCONC_1_1", 29, credsIssuerConfig) + Test_TC_OZCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OZCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -27446,8 +27498,8 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -27456,7 +27508,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -27465,7 +27517,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -27474,10 +27526,19 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27487,7 +27548,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27496,7 +27557,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27506,7 +27567,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27515,7 +27576,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27525,7 +27586,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27534,7 +27595,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27544,7 +27605,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27553,7 +27614,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27568,7 +27629,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27582,7 +27643,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27591,7 +27652,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27600,7 +27661,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27612,7 +27673,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27625,7 +27686,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27635,7 +27696,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27645,7 +27706,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27655,7 +27716,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27665,7 +27726,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27674,7 +27735,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27683,7 +27744,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27695,7 +27756,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27707,7 +27768,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27743,184 +27804,188 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip(" !OZCONC.S.F00 && !OZCONC.S.F01 && !OZCONC.S.F02 && !OZCONC.S.F03 && !OZCONC.S.F04 && !OZCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F02 && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F02 && !OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F03 && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F03 && !OZCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F04 && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F04 && !OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F05 && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F05 && !OZCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.A0007 && OZCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when OZCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("OZCONC.S.A0007 && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when OZCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when OZCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when OZCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "OZCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "OZCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "OZCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "OZCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + OzoneConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, + OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -28164,7 +28229,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand { public: Test_TC_PMHCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMHCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_PMHCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -28215,8 +28280,8 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -28225,7 +28290,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -28234,7 +28299,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -28243,10 +28308,19 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28256,7 +28330,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28265,7 +28339,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28275,7 +28349,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28284,7 +28358,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28294,7 +28368,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28303,7 +28377,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28313,7 +28387,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28322,7 +28396,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28337,7 +28411,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28351,7 +28425,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28360,7 +28434,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28369,7 +28443,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28381,7 +28455,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28394,7 +28468,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28404,7 +28478,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28414,7 +28488,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28424,7 +28498,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28434,7 +28508,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28443,7 +28517,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28452,7 +28526,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28464,7 +28538,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28476,7 +28550,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28512,184 +28586,189 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !PMHCONC.S.F00 && !PMHCONC.S.F01 && !PMHCONC.S.F02 && !PMHCONC.S.F03 && !PMHCONC.S.F04 && !PMHCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F02 && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F02 && !PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F03 && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F03 && !PMHCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F04 && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F04 && PMHCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F05 && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F05 && !PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.A0007 && PMHCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMHCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.A0007 && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMHCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMHCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "PMHCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "PMHCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "PMHCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + Pm1ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, + Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -28933,7 +29012,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand { public: Test_TC_PMICONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMICONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_PMICONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -28984,8 +29063,8 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -28994,7 +29073,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -29003,7 +29082,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -29012,10 +29091,19 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29025,7 +29113,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29034,7 +29122,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29044,7 +29132,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29053,7 +29141,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29063,7 +29151,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29072,7 +29160,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29082,7 +29170,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29091,7 +29179,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29106,7 +29194,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29120,7 +29208,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29129,7 +29217,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29138,7 +29226,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29150,7 +29238,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29163,7 +29251,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29173,7 +29261,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29183,7 +29271,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29193,7 +29281,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29203,7 +29291,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29212,7 +29300,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29221,7 +29309,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29233,7 +29321,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29245,7 +29333,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29281,184 +29369,189 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !PMICONC.S.F00 && !PMICONC.S.F01 && !PMICONC.S.F02 && !PMICONC.S.F03 && !PMICONC.S.F04 && !PMICONC.S.F05 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F02 && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F02 && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F03 && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F03 && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F04 && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F04 && !PMICONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F05 && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F05 && !PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.A0007 && PMICONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMICONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("PMICONC.S.A0007 && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMICONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when PMICONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when PMICONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMICONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "PMICONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "PMICONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "PMICONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + Pm25ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, + Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -29703,7 +29796,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand { public: Test_TC_PMKCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMKCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_PMKCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -29754,8 +29847,8 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -29764,7 +29857,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -29773,7 +29866,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -29782,10 +29875,19 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29795,7 +29897,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29804,7 +29906,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29814,7 +29916,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29823,7 +29925,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29833,7 +29935,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29842,7 +29944,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29852,7 +29954,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29861,7 +29963,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29876,7 +29978,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29890,7 +29992,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29899,7 +30001,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29908,7 +30010,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29920,7 +30022,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29933,7 +30035,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29943,7 +30045,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29953,7 +30055,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29963,7 +30065,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29973,7 +30075,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29982,7 +30084,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29991,7 +30093,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30003,7 +30105,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30015,7 +30117,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30051,184 +30153,189 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !PMKCONC.S.F00 && !PMKCONC.S.F01 && !PMKCONC.S.F02 && !PMKCONC.S.F03 && !PMKCONC.S.F04 && !PMKCONC.S.F05 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F02 && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F02 && !PMKCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F03 && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F03 && !PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F04 && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F04 && !PMKCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F05 && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F05 && !PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.A0007 && PMKCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMKCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.A0007 && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMKCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMKCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "PMKCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "PMKCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "PMKCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + Pm10ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, + Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -30472,7 +30579,7 @@ class Test_TC_PMKCONC_2_1Suite : public TestCommand class Test_TC_RNCONC_1_1Suite : public TestCommand { public: - Test_TC_RNCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RNCONC_1_1", 29, credsIssuerConfig) + Test_TC_RNCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RNCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -30523,8 +30630,8 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -30533,7 +30640,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -30542,7 +30649,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -30551,10 +30658,19 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30564,7 +30680,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30573,7 +30689,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30583,7 +30699,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30592,7 +30708,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30602,7 +30718,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30611,7 +30727,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30621,7 +30737,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30630,7 +30746,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30645,7 +30761,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30659,7 +30775,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30668,7 +30784,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30677,7 +30793,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30689,7 +30805,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30702,7 +30818,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30712,7 +30828,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30722,7 +30838,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30732,7 +30848,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30742,7 +30858,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30751,7 +30867,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30760,7 +30876,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30772,7 +30888,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30784,7 +30900,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30820,184 +30936,188 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip(" !RNCONC.S.F00 && !RNCONC.S.F01 && !RNCONC.S.F02 && !RNCONC.S.F03 && !RNCONC.S.F04 && !RNCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F02 && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F02 && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F03 && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F03 && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F04 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F04 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F05 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F05 && !RNCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.A0007 && RNCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when RNCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("RNCONC.S.A0007 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when RNCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when RNCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when RNCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "RNCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "RNCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "RNCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "RNCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + RadonConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, + RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -31241,7 +31361,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand { public: Test_TC_TVOCCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TVOCCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_TVOCCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -31292,8 +31412,8 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -31302,7 +31422,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -31311,7 +31431,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -31320,10 +31440,19 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31333,7 +31462,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31342,7 +31471,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31352,7 +31481,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31361,7 +31490,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31371,7 +31500,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31380,7 +31509,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31390,7 +31519,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31399,7 +31528,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31414,7 +31543,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31428,7 +31557,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31437,7 +31566,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31446,7 +31575,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31458,7 +31587,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31471,7 +31600,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31481,7 +31610,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31491,7 +31620,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31501,7 +31630,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31511,7 +31640,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31520,7 +31649,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31529,7 +31658,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31541,7 +31670,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31553,7 +31682,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31589,211 +31718,216 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F00 && !TVOCCONC.S.F01 && !TVOCCONC.S.F02 && !TVOCCONC.S.F03 && !TVOCCONC.S.F04 " + "&& !TVOCCONC.S.F05 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F02 && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F02 && !TVOCCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F03 && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F03 && !TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F04 && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F04 && !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F05 && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F05 && !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, + TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.A0007 && TVOCCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when TVOCCONC.S.A0007 is not " - "set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0007 && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when TVOCCONC.S.A0007 is not " + "set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "TVOCCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "TVOCCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "TVOCCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "TVOCCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5l: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id, true, + TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5l: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, + TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, + TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -35314,25 +35448,23 @@ class Test_TC_DESC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("DESC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("DESC.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DESC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DESC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -35344,7 +35476,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -35359,7 +35491,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -35374,7 +35506,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -35389,7 +35521,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -38685,7 +38817,7 @@ class Test_TC_FAN_3_2Suite : public TestCommand chip::NullOptional); } case 2: { - LogStep(2, "Step 3: TH writes TH writes to the DUT the a value less than or equal to the value read in step 2"); + LogStep(2, "Step 3: TH writes to the DUT the a value less than or equal to the value read in step 2"); VerifyOrDo(!ShouldSkip("FAN.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::Nullable value; @@ -38703,13 +38835,13 @@ class Test_TC_FAN_3_2Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Step 4: TH reads from the DUT the the SpeedSetting attribute"); + LogStep(4, "Step 4: TH reads from the DUT the SpeedSetting attribute"); VerifyOrDo(!ShouldSkip("FAN.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 5: TH reads from the DUT the the SpeedCurrent attribute"); + LogStep(5, "Step 5: TH reads from the DUT the SpeedCurrent attribute"); VerifyOrDo(!ShouldSkip("FAN.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedCurrent::Id, true, chip::NullOptional); @@ -39913,6 +40045,292 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand } }; +class Test_TC_GRPKEY_1_1Suite : public TestCommand +{ +public: + Test_TC_GRPKEY_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GRPKEY_1_1", 13, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_GRPKEY_1_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 + { + 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)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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; + switch (testIndex) + { + case 0: { + LogStep(0, "Step 1: 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, "Step 2: TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Step 3a: TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip(" !GRPKEY.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip(" !PICS_EVENT_LIST_ENABLED "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, + "Step 4b: The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - " + "0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain values in the Manufacturer Extensible " + "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " + "these values SHALL be ignored. 3.TThe list SHALL NOT contain any values in the Test Vendor or invalid range: " + "(0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), " + "where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "Step 5a: TH1 reads EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::EventList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, + "Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " + "standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1)"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "Step 6a: TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, + "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1)"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "Step 7a: TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, + "Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1)"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_ICDM_1_1Suite : public TestCommand { public: @@ -65662,6 +66080,276 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand } }; +class Test_TC_RVCOPSTATE_1_1Suite : public TestCommand +{ +public: + Test_TC_RVCOPSTATE_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_RVCOPSTATE_1_1", 13, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_RVCOPSTATE_1_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 + { + 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)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + 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; + switch (testIndex) + { + case 0: { + LogStep(0, "Step 1: 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, "Step 2: TH reads the ClusterRevision attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Step 3: TH reads the FeatureMap attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Step 5a: TH reads from the DUT the EventList attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::EventList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::EventList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 6a: Read the optional command(Pause) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "Step 6b: Read the optional command(Stop) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "Step 6c: Read the optional command(Start) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "Step 6d: Read the optional command(Resume) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C03.Rsp || RVCOPSTATE.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "Step 7: Read the global attribute: GeneratedCommandList"); + VerifyOrDo( + !ShouldSkip(" RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp || RVCOPSTATE.S.C03.Rsp "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_TMP_1_1Suite : public TestCommand { public: @@ -66006,7 +66694,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand class Test_TC_TSTAT_1_1Suite : public TestCommand { public: - Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 26, credsIssuerConfig) + Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 59, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -66045,12 +66733,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -66116,6 +66799,15 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand } break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 64UL)); + } + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66132,7 +66824,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66148,7 +66840,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66157,7 +66849,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66166,7 +66858,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66175,7 +66867,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66184,7 +66876,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66193,7 +66885,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66204,7 +66896,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66215,7 +66907,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66226,7 +66918,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66237,16 +66929,295 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 21: + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + } + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); + } + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); + } + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 29UL)); + } + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); + } + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); + } + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); + } + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); + } + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 48UL)); + } + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); + } + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 50UL)); + } + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 58UL)); + } + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); + } + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); + } + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); + } + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 67UL)); + } + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 68UL)); + } + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 69UL)); + } + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 70UL)); + } + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 71UL)); + } + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); + } + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); + } + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + } + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + } + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); + } + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); + } + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 30UL)); + } + break; + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66258,7 +67229,16 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 22: + case 54: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66270,7 +67250,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 23: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66279,7 +67259,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 24: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66288,7 +67268,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 25: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -66316,8 +67296,13 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ClusterRevision::Id, true, - chip::NullOptional); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); @@ -66363,102 +67348,301 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::NullOptional); } case 9: { - LogStep(9, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + LogStep(9, "Step 3h: Given TSTAT.S.F06(LTNE) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F06"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { LogStep(10, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(18, "Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "Step 5a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); + LogStep(20, "Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 21: { - LogStep(21, "Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList"); + LogStep(21, "Step 4k: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 22: { + LogStep(22, "Step 4l: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 23: { + LogStep(23, "Step 4m: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 24: { + LogStep(24, "Step 4n: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 25: { + LogStep(25, "Step 4o: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 26: { + LogStep(26, "Step 4p: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 27: { + LogStep(27, "Step 4q: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 28: { + LogStep(28, "Step 4r: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 29: { + LogStep(29, "Step 4s: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 30: { + LogStep(30, "Step 4t: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 31: { + LogStep(31, "Step 4u: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 32: { + LogStep(32, "Step 4x: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 33: { + LogStep(33, "Step 5y: Read the optional attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 34: { + LogStep(34, "Step 4z: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0040"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 35: { + LogStep(35, "Step 4A: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0041"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 36: { + LogStep(36, "Step 4B: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0042"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 37: { + LogStep(37, "Step 4C: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0043"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 38: { + LogStep(38, "Step 5D: Read the optional attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0044"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 39: { + LogStep(39, "Step 4E: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0045"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 40: { + LogStep(40, "Step 4F: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0046"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 41: { + LogStep(41, "Step 5G: Read the optional attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0047"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 42: { + LogStep(42, "Step 4H: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 43: { + LogStep(43, "Step 4I: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 44: { + LogStep(44, "Step 4J: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 45: { + LogStep(45, "Step 4K: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 46: { + LogStep(46, "Step 4L: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 47: { + LogStep(47, "Step 4M: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 48: { + LogStep(48, "Step 4N: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 49: { + LogStep(49, "Step 4O: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 50: { + LogStep(50, "Step 4P: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 51: { + LogStep(51, "Step 4Q: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 52: { + LogStep(52, "Step 4R: Read the Feature dependent(TSTAT.S.F05(AUTO)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 53: { + LogStep(53, "Step 5a: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Step 6a: Read the global attribute: GeneratedCommandList"); + case 54: { + LogStep(54, "Step 5b: Read the optional attribute: AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); + } + case 55: { + LogStep(55, "Step 6a: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip(" !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList"); + case 56: { + LogStep(56, "Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList"); + case 57: { + LogStep(57, "Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("TSTAT.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, + case 58: { + LogStep(58, "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -108156,7 +109340,7 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } case 16: { - LogStep(16, "TStep 10a: H reads the WrongCodeEntryLimit attribute from the DUT"); + LogStep(16, "Step 10a: H reads the WrongCodeEntryLimit attribute from the DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, true, chip::NullOptional); @@ -113993,7 +115177,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand { public: Test_TC_ACFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ACFREMON_1_1", 14, credsIssuerConfig) + TestCommand("Test_TC_ACFREMON_1_1", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -114125,6 +115309,24 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand } break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114136,7 +115338,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114144,7 +115346,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114153,7 +115355,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114236,30 +115438,42 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0003) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 5: TH reads EventList attribute from DUT"); + LogStep(10, "Step 4d: Read the optional attribute LastChangedTime (ACFREMON.S.A0004) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "Step 4e: Read the optional attribute ReplacementProductList (ACFREMON.S.F02) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "Step 5: TH reads EventList attribute from DUT"); VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 6a: Read the global attribute: AcceptedCommandList"); + case 13: { + LogStep(13, "Step 6a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); + case 14: { + LogStep(14, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("ACFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Step 7: Read the global attribute: GeneratedCommandList"); + case 15: { + LogStep(15, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -114432,7 +115646,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand { public: Test_TC_HEPAFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_HEPAFREMON_1_1", 14, credsIssuerConfig) + TestCommand("Test_TC_HEPAFREMON_1_1", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -114564,6 +115778,24 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand } break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114575,7 +115807,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114583,7 +115815,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114592,7 +115824,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114669,36 +115901,48 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList"); + LogStep(8, "Step 4b: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4b: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4c: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0003) in AttributeList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 5: TH reads EventList attribute from DUT"); + LogStep(10, "Step 4d: Read the optional attribute LastChangedTime (HEPAFREMON.S.A0004) in AttributeList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "Step 4e: Read the optional attribute ReplacementProductList (HEPAFREMON.S.F02) in AttributeList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "Step 5: TH reads EventList attribute from DUT"); VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 6a: Read the global attribute: AcceptedCommandList"); + case 13: { + LogStep(13, "Step 6a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); + case 14: { + LogStep(14, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("HEPAFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Step 7: Read the global attribute: GeneratedCommandList"); + case 15: { + LogStep(15, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -117304,6 +118548,61 @@ class Test_TC_G_2_3Suite : public TestCommand } }; +class Test_TC_G_2_4Suite : public TestCommand +{ +public: + Test_TC_G_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_4", 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_G_2_4Suite() {} + + 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 + { + 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; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + class Test_TC_G_3_2Suite : public TestCommand { public: @@ -119565,65 +120864,10 @@ class Test_TC_CNET_4_16Suite : public TestCommand } }; -class Test_TC_CNET_4_17Suite : public TestCommand -{ -public: - Test_TC_CNET_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_17", 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_CNET_4_17Suite() {} - - 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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_18Suite : public TestCommand +class Test_TC_CNET_4_20Suite : public TestCommand { public: - Test_TC_CNET_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_18", 0, credsIssuerConfig) + Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119631,7 +120875,7 @@ class Test_TC_CNET_4_18Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_18Suite() {} + ~Test_TC_CNET_4_20Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119675,10 +120919,10 @@ class Test_TC_CNET_4_18Suite : public TestCommand } }; -class Test_TC_CNET_4_19Suite : public TestCommand +class Test_TC_CNET_4_21Suite : public TestCommand { public: - Test_TC_CNET_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_19", 0, credsIssuerConfig) + Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119686,7 +120930,7 @@ class Test_TC_CNET_4_19Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_19Suite() {} + ~Test_TC_CNET_4_21Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119730,10 +120974,10 @@ class Test_TC_CNET_4_19Suite : public TestCommand } }; -class Test_TC_CNET_4_20Suite : public TestCommand +class Test_TC_CNET_4_22Suite : public TestCommand { public: - Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 0, credsIssuerConfig) + Test_TC_CNET_4_22Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_22", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119741,7 +120985,7 @@ class Test_TC_CNET_4_20Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_20Suite() {} + ~Test_TC_CNET_4_22Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119785,10 +121029,10 @@ class Test_TC_CNET_4_20Suite : public TestCommand } }; -class Test_TC_CNET_4_21Suite : public TestCommand +class Test_TC_DLOG_2_1Suite : public TestCommand { public: - Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 0, credsIssuerConfig) + Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119796,7 +121040,7 @@ class Test_TC_CNET_4_21Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_21Suite() {} + ~Test_TC_DLOG_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119840,10 +121084,10 @@ class Test_TC_CNET_4_21Suite : public TestCommand } }; -class Test_TC_CNET_4_22Suite : public TestCommand +class Test_TC_DLOG_2_2Suite : public TestCommand { public: - Test_TC_CNET_4_22Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_22", 0, credsIssuerConfig) + Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119851,7 +121095,7 @@ class Test_TC_CNET_4_22Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_22Suite() {} + ~Test_TC_DLOG_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119895,10 +121139,10 @@ class Test_TC_CNET_4_22Suite : public TestCommand } }; -class Test_TC_DLOG_2_1Suite : public TestCommand +class Test_TC_DLOG_3_1Suite : public TestCommand { public: - Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) + Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119906,7 +121150,7 @@ class Test_TC_DLOG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_1Suite() {} + ~Test_TC_DLOG_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119950,10 +121194,11 @@ class Test_TC_DLOG_2_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_2Suite : public TestCommand +class Test_TC_DISHALM_1_1Suite : public TestCommand { public: - Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) + Test_TC_DISHALM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DISHALM_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119961,7 +121206,7 @@ class Test_TC_DLOG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_2Suite() {} + ~Test_TC_DISHALM_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120005,10 +121250,11 @@ class Test_TC_DLOG_2_2Suite : public TestCommand } }; -class Test_TC_DLOG_3_1Suite : public TestCommand +class Test_TC_DISHALM_2_1Suite : public TestCommand { public: - Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) + Test_TC_DISHALM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DISHALM_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120016,7 +121262,7 @@ class Test_TC_DLOG_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_3_1Suite() {} + ~Test_TC_DISHALM_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120060,11 +121306,11 @@ class Test_TC_DLOG_3_1Suite : public TestCommand } }; -class Test_TC_DISHALM_1_1Suite : public TestCommand +class Test_TC_DISHALM_3_1Suite : public TestCommand { public: - Test_TC_DISHALM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_1_1", 0, credsIssuerConfig) + Test_TC_DISHALM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DISHALM_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120072,7 +121318,7 @@ class Test_TC_DISHALM_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DISHALM_1_1Suite() {} + ~Test_TC_DISHALM_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120116,11 +121362,11 @@ class Test_TC_DISHALM_1_1Suite : public TestCommand } }; -class Test_TC_DISHALM_2_1Suite : public TestCommand +class Test_TC_DISHALM_3_2Suite : public TestCommand { public: - Test_TC_DISHALM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_2_1", 0, credsIssuerConfig) + Test_TC_DISHALM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DISHALM_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120128,7 +121374,7 @@ class Test_TC_DISHALM_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DISHALM_2_1Suite() {} + ~Test_TC_DISHALM_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120172,11 +121418,11 @@ class Test_TC_DISHALM_2_1Suite : public TestCommand } }; -class Test_TC_DISHALM_3_1Suite : public TestCommand +class Test_TC_DISHALM_3_3Suite : public TestCommand { public: - Test_TC_DISHALM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_1", 0, credsIssuerConfig) + Test_TC_DISHALM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DISHALM_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120184,119 +121430,7 @@ class Test_TC_DISHALM_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DISHALM_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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_3_2Suite : public TestCommand -{ -public: - Test_TC_DISHALM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_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_DISHALM_3_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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_3_3Suite : public TestCommand -{ -public: - Test_TC_DISHALM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_3", 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_DISHALM_3_3Suite() {} + ~Test_TC_DISHALM_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120893,116 +122027,6 @@ class Test_TC_DESC_2_1Suite : public TestCommand } }; -class Test_TC_FAN_3_3Suite : public TestCommand -{ -public: - Test_TC_FAN_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_3", 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_FAN_3_3Suite() {} - - 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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_3_5Suite : public TestCommand -{ -public: - Test_TC_FAN_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_5", 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_FAN_3_5Suite() {} - - 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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_CGEN_2_2Suite : public TestCommand { public: @@ -121168,10 +122192,10 @@ class Test_TC_DGGEN_2_3Suite : public TestCommand } }; -class Test_TC_DGGEN_3_1Suite : public TestCommand +class Test_TC_ICDM_2_2Suite : public TestCommand { public: - Test_TC_DGGEN_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_3_1", 0, credsIssuerConfig) + Test_TC_ICDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121179,7 +122203,7 @@ class Test_TC_DGGEN_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGGEN_3_1Suite() {} + ~Test_TC_ICDM_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121223,10 +122247,10 @@ class Test_TC_DGGEN_3_1Suite : public TestCommand } }; -class Test_TC_ICDM_2_2Suite : public TestCommand +class Test_TC_ICDM_2_3Suite : public TestCommand { public: - Test_TC_ICDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_2", 0, credsIssuerConfig) + Test_TC_ICDM_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121234,7 +122258,7 @@ class Test_TC_ICDM_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ICDM_2_2Suite() {} + ~Test_TC_ICDM_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121278,10 +122302,10 @@ class Test_TC_ICDM_2_2Suite : public TestCommand } }; -class Test_TC_ICDM_2_3Suite : public TestCommand +class Test_TC_I_3_2Suite : public TestCommand { public: - Test_TC_ICDM_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_3", 0, credsIssuerConfig) + Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121289,7 +122313,7 @@ class Test_TC_ICDM_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ICDM_2_3Suite() {} + ~Test_TC_I_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121333,10 +122357,10 @@ class Test_TC_ICDM_2_3Suite : public TestCommand } }; -class Test_TC_I_3_2Suite : public TestCommand +class Test_TC_IDM_1_1Suite : public TestCommand { public: - Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) + Test_TC_IDM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121344,7 +122368,7 @@ class Test_TC_I_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_3_2Suite() {} + ~Test_TC_IDM_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121388,10 +122412,10 @@ class Test_TC_I_3_2Suite : public TestCommand } }; -class Test_TC_IDM_1_1Suite : public TestCommand +class Test_TC_IDM_2_1Suite : public TestCommand { public: - Test_TC_IDM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_1_1", 0, credsIssuerConfig) + Test_TC_IDM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121399,7 +122423,7 @@ class Test_TC_IDM_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_1_1Suite() {} + ~Test_TC_IDM_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121443,10 +122467,10 @@ class Test_TC_IDM_1_1Suite : public TestCommand } }; -class Test_TC_IDM_2_1Suite : public TestCommand +class Test_TC_IDM_2_2Suite : public TestCommand { public: - Test_TC_IDM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_1", 0, credsIssuerConfig) + Test_TC_IDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121454,7 +122478,7 @@ class Test_TC_IDM_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_2_1Suite() {} + ~Test_TC_IDM_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121498,10 +122522,10 @@ class Test_TC_IDM_2_1Suite : public TestCommand } }; -class Test_TC_IDM_2_2Suite : public TestCommand +class Test_TC_IDM_3_1Suite : public TestCommand { public: - Test_TC_IDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_2", 0, credsIssuerConfig) + Test_TC_IDM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121509,7 +122533,7 @@ class Test_TC_IDM_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_2_2Suite() {} + ~Test_TC_IDM_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121553,10 +122577,10 @@ class Test_TC_IDM_2_2Suite : public TestCommand } }; -class Test_TC_IDM_3_1Suite : public TestCommand +class Test_TC_IDM_3_2Suite : public TestCommand { public: - Test_TC_IDM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_1", 0, credsIssuerConfig) + Test_TC_IDM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121564,7 +122588,7 @@ class Test_TC_IDM_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_3_1Suite() {} + ~Test_TC_IDM_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121608,10 +122632,10 @@ class Test_TC_IDM_3_1Suite : public TestCommand } }; -class Test_TC_IDM_3_2Suite : public TestCommand +class Test_TC_IDM_4_1Suite : public TestCommand { public: - Test_TC_IDM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_2", 0, credsIssuerConfig) + Test_TC_IDM_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121619,7 +122643,7 @@ class Test_TC_IDM_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_3_2Suite() {} + ~Test_TC_IDM_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121663,10 +122687,10 @@ class Test_TC_IDM_3_2Suite : public TestCommand } }; -class Test_TC_IDM_4_1Suite : public TestCommand +class Test_TC_IDM_4_2Suite : public TestCommand { public: - Test_TC_IDM_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_1", 0, credsIssuerConfig) + Test_TC_IDM_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121674,7 +122698,7 @@ class Test_TC_IDM_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_1Suite() {} + ~Test_TC_IDM_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121718,10 +122742,10 @@ class Test_TC_IDM_4_1Suite : public TestCommand } }; -class Test_TC_IDM_4_2Suite : public TestCommand +class Test_TC_IDM_4_3Suite : public TestCommand { public: - Test_TC_IDM_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_2", 0, credsIssuerConfig) + Test_TC_IDM_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121729,7 +122753,7 @@ class Test_TC_IDM_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_2Suite() {} + ~Test_TC_IDM_4_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121773,10 +122797,10 @@ class Test_TC_IDM_4_2Suite : public TestCommand } }; -class Test_TC_IDM_4_3Suite : public TestCommand +class Test_TC_IDM_4_4Suite : public TestCommand { public: - Test_TC_IDM_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_3", 0, credsIssuerConfig) + Test_TC_IDM_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121784,7 +122808,7 @@ class Test_TC_IDM_4_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_3Suite() {} + ~Test_TC_IDM_4_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121828,10 +122852,10 @@ class Test_TC_IDM_4_3Suite : public TestCommand } }; -class Test_TC_IDM_4_4Suite : public TestCommand +class Test_TC_IDM_5_1Suite : public TestCommand { public: - Test_TC_IDM_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_4", 0, credsIssuerConfig) + Test_TC_IDM_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121839,7 +122863,7 @@ class Test_TC_IDM_4_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_4Suite() {} + ~Test_TC_IDM_5_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121883,10 +122907,10 @@ class Test_TC_IDM_4_4Suite : public TestCommand } }; -class Test_TC_IDM_5_1Suite : public TestCommand +class Test_TC_IDM_5_2Suite : public TestCommand { public: - Test_TC_IDM_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_1", 0, credsIssuerConfig) + Test_TC_IDM_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121894,7 +122918,7 @@ class Test_TC_IDM_5_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_5_1Suite() {} + ~Test_TC_IDM_5_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121938,10 +122962,10 @@ class Test_TC_IDM_5_1Suite : public TestCommand } }; -class Test_TC_IDM_5_2Suite : public TestCommand +class Test_TC_IDM_6_1Suite : public TestCommand { public: - Test_TC_IDM_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_2", 0, credsIssuerConfig) + Test_TC_IDM_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121949,7 +122973,7 @@ class Test_TC_IDM_5_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_5_2Suite() {} + ~Test_TC_IDM_6_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121993,10 +123017,10 @@ class Test_TC_IDM_5_2Suite : public TestCommand } }; -class Test_TC_IDM_6_1Suite : public TestCommand +class Test_TC_IDM_6_2Suite : public TestCommand { public: - Test_TC_IDM_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_1", 0, credsIssuerConfig) + Test_TC_IDM_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122004,7 +123028,7 @@ class Test_TC_IDM_6_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_1Suite() {} + ~Test_TC_IDM_6_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -122048,10 +123072,10 @@ class Test_TC_IDM_6_1Suite : public TestCommand } }; -class Test_TC_IDM_6_2Suite : public TestCommand +class Test_TC_IDM_6_3Suite : public TestCommand { public: - Test_TC_IDM_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_2", 0, credsIssuerConfig) + Test_TC_IDM_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122059,7 +123083,7 @@ class Test_TC_IDM_6_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_2Suite() {} + ~Test_TC_IDM_6_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -122103,10 +123127,10 @@ class Test_TC_IDM_6_2Suite : public TestCommand } }; -class Test_TC_IDM_6_3Suite : public TestCommand +class Test_TC_IDM_6_4Suite : public TestCommand { public: - Test_TC_IDM_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_3", 0, credsIssuerConfig) + Test_TC_IDM_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122114,7 +123138,7 @@ class Test_TC_IDM_6_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_3Suite() {} + ~Test_TC_IDM_6_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -122158,10 +123182,10 @@ class Test_TC_IDM_6_3Suite : public TestCommand } }; -class Test_TC_IDM_6_4Suite : public TestCommand +class Test_TC_IDM_7_1Suite : public TestCommand { public: - Test_TC_IDM_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_4", 0, credsIssuerConfig) + Test_TC_IDM_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_7_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122169,7 +123193,7 @@ class Test_TC_IDM_6_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_4Suite() {} + ~Test_TC_IDM_7_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -122213,10 +123237,10 @@ class Test_TC_IDM_6_4Suite : public TestCommand } }; -class Test_TC_IDM_7_1Suite : public TestCommand +class Test_TC_IDM_8_1Suite : public TestCommand { public: - Test_TC_IDM_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_7_1", 0, credsIssuerConfig) + Test_TC_IDM_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_8_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122224,7 +123248,7 @@ class Test_TC_IDM_7_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_7_1Suite() {} + ~Test_TC_IDM_8_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -122268,10 +123292,10 @@ class Test_TC_IDM_7_1Suite : public TestCommand } }; -class Test_TC_IDM_8_1Suite : public TestCommand +class Test_TC_IDM_10_1Suite : public TestCommand { public: - Test_TC_IDM_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_8_1", 0, credsIssuerConfig) + Test_TC_IDM_10_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_10_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122279,7 +123303,62 @@ class Test_TC_IDM_8_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_8_1Suite() {} + ~Test_TC_IDM_10_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 + { + 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; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_IDM_11_1Suite : public TestCommand +{ +public: + Test_TC_IDM_11_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_11_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_IDM_11_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -126923,10 +128002,11 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand } }; -class Test_TC_MOD_1_2Suite : public TestCommand +class Test_TC_CADMIN_1_25Suite : public TestCommand { public: - Test_TC_MOD_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_2", 0, credsIssuerConfig) + Test_TC_CADMIN_1_25Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_25", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -126934,7 +128014,7 @@ class Test_TC_MOD_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_1_2Suite() {} + ~Test_TC_CADMIN_1_25Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -126978,10 +128058,11 @@ class Test_TC_MOD_1_2Suite : public TestCommand } }; -class Test_TC_MOD_1_3Suite : public TestCommand +class Test_TC_CADMIN_1_26Suite : public TestCommand { public: - Test_TC_MOD_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_3", 0, credsIssuerConfig) + Test_TC_CADMIN_1_26Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_26", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -126989,7 +128070,7 @@ class Test_TC_MOD_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_1_3Suite() {} + ~Test_TC_CADMIN_1_26Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127033,10 +128114,10 @@ class Test_TC_MOD_1_3Suite : public TestCommand } }; -class Test_TC_MOD_2_1Suite : public TestCommand +class Test_TC_MOD_1_2Suite : public TestCommand { public: - Test_TC_MOD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_1", 0, credsIssuerConfig) + Test_TC_MOD_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127044,7 +128125,7 @@ class Test_TC_MOD_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_2_1Suite() {} + ~Test_TC_MOD_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127088,10 +128169,10 @@ class Test_TC_MOD_2_1Suite : public TestCommand } }; -class Test_TC_MOD_2_2Suite : public TestCommand +class Test_TC_MOD_1_3Suite : public TestCommand { public: - Test_TC_MOD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_2", 0, credsIssuerConfig) + Test_TC_MOD_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127099,7 +128180,7 @@ class Test_TC_MOD_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_2_2Suite() {} + ~Test_TC_MOD_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127143,10 +128224,10 @@ class Test_TC_MOD_2_2Suite : public TestCommand } }; -class Test_TC_MOD_3_1Suite : public TestCommand +class Test_TC_MOD_2_1Suite : public TestCommand { public: - Test_TC_MOD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_1", 0, credsIssuerConfig) + Test_TC_MOD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127154,7 +128235,7 @@ class Test_TC_MOD_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_3_1Suite() {} + ~Test_TC_MOD_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127198,10 +128279,10 @@ class Test_TC_MOD_3_1Suite : public TestCommand } }; -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); @@ -127209,7 +128290,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 { @@ -127253,10 +128334,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); @@ -127264,7 +128345,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 { @@ -127308,10 +128389,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); @@ -127319,7 +128400,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 { @@ -127363,10 +128444,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); @@ -127374,7 +128455,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 { @@ -127418,10 +128499,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); @@ -127429,7 +128510,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 { @@ -127473,10 +128554,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); @@ -127484,7 +128565,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 { @@ -127528,10 +128609,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); @@ -127539,7 +128620,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 { @@ -127583,10 +128664,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); @@ -127594,7 +128675,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 { @@ -127638,10 +128719,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); @@ -127649,7 +128730,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 { @@ -127693,10 +128774,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); @@ -127704,7 +128785,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 { @@ -127748,10 +128829,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); @@ -127759,7 +128840,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 { @@ -127803,10 +128884,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); @@ -127814,7 +128895,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 { @@ -127858,10 +128939,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); @@ -127869,7 +128950,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 { @@ -127913,10 +128994,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); @@ -127924,7 +129005,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 { @@ -127968,10 +129049,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); @@ -127979,7 +129060,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 { @@ -128023,10 +129104,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); @@ -128034,7 +129115,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 { @@ -128078,10 +129159,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); @@ -128089,7 +129170,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 { @@ -128133,10 +129214,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); @@ -128144,7 +129225,117 @@ 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 + { + 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 + { + 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; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SU_4_1Suite : public TestCommand +{ +public: + Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_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_SU_4_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 + { + 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; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SU_4_2Suite : public TestCommand +{ +public: + Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_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_SU_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -132385,7 +133576,7 @@ class Test_TC_CC_3_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 13: { - LogStep(13, "TStep 2f: H reads CurrentHue attribute from DUT"); + LogStep(13, "Step 2f: H reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); @@ -132529,8 +133720,7 @@ class Test_TC_CC_3_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 27: { - LogStep(27, - "TStep 4b: H sends MoveToHue command to DUT with Hue=120, Direction=0x02 (up) and TransitionTime=300 (30s)"); + LogStep(27, "Step 4b: H sends MoveToHue command to DUT with Hue=120, Direction=0x02 (up) and TransitionTime=300 (30s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; @@ -135902,61 +137092,6 @@ class Test_TC_DRLK_3_2Suite : public TestCommand } }; -class Test_TC_DRLK_3_3Suite : public TestCommand -{ -public: - Test_TC_DRLK_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_3_3", 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_DRLK_3_3Suite() {} - - 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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_LCFG_2_1Suite : public TestCommand { public: @@ -136012,61 +137147,6 @@ class Test_TC_LCFG_2_1Suite : public TestCommand } }; -class Test_TC_LVL_8_1Suite : public TestCommand -{ -public: - Test_TC_LVL_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_8_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_LVL_8_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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_LWM_1_1Suite : public TestCommand { public: @@ -140935,10 +142015,10 @@ class Test_TC_TMP_2_2Suite : public TestCommand } }; -class Test_TC_TSTAT_3_1Suite : public TestCommand +class Test_TC_TSTAT_3_2Suite : public TestCommand { public: - Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) + Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -140946,7 +142026,7 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_1Suite() {} + ~Test_TC_TSTAT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -140990,10 +142070,11 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand } }; -class Test_TC_TSTAT_3_2Suite : public TestCommand +class Test_TC_DGTHREAD_2_5Suite : public TestCommand { public: - Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) + Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141001,7 +142082,7 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_2Suite() {} + ~Test_TC_DGTHREAD_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141045,11 +142126,10 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand } }; -class Test_TC_DGTHREAD_2_5Suite : public TestCommand +class Test_TC_ACT_2_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) + Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141057,7 +142137,7 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_2_5Suite() {} + ~Test_TC_ACT_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141101,10 +142181,10 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand } }; -class Test_TC_ACT_2_1Suite : public TestCommand +class Test_TC_ACT_2_2Suite : public TestCommand { public: - Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) + Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141112,7 +142192,7 @@ class Test_TC_ACT_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_1Suite() {} + ~Test_TC_ACT_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141156,10 +142236,10 @@ class Test_TC_ACT_2_1Suite : public TestCommand } }; -class Test_TC_ACT_2_2Suite : public TestCommand +class Test_TC_ACT_3_2Suite : public TestCommand { public: - Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) + Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141167,7 +142247,7 @@ class Test_TC_ACT_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_2Suite() {} + ~Test_TC_ACT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141211,10 +142291,10 @@ class Test_TC_ACT_2_2Suite : public TestCommand } }; -class Test_TC_ACT_3_2Suite : public TestCommand +class Test_TC_LTIME_3_1Suite : public TestCommand { public: - Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) + Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141222,7 +142302,7 @@ class Test_TC_ACT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_2Suite() {} + ~Test_TC_LTIME_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141266,10 +142346,10 @@ class Test_TC_ACT_3_2Suite : public TestCommand } }; -class Test_TC_LTIME_2_1Suite : public TestCommand +class Test_TC_BIND_2_1Suite : public TestCommand { public: - Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) + Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141277,7 +142357,7 @@ class Test_TC_LTIME_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_2_1Suite() {} + ~Test_TC_BIND_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141321,10 +142401,10 @@ class Test_TC_LTIME_2_1Suite : public TestCommand } }; -class Test_TC_LTIME_3_1Suite : public TestCommand +class Test_TC_BIND_2_2Suite : public TestCommand { public: - Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) + Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141332,173 +142412,7 @@ class Test_TC_LTIME_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TIMESYNC_2_15Suite : public TestCommand -{ -public: - Test_TC_TIMESYNC_2_15Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TIMESYNC_2_15", 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_TIMESYNC_2_15Suite() {} - - 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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BIND_2_1Suite : public TestCommand -{ -public: - Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_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_BIND_2_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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BIND_2_2Suite : public TestCommand -{ -public: - Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_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_BIND_2_2Suite() {} + ~Test_TC_BIND_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -142056,7 +142970,7 @@ class Test_TC_S_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "int8u")); } break; case 5: @@ -142065,7 +142979,7 @@ class Test_TC_S_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("nameSupport", value, 128U)); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "int8u")); } break; case 6: @@ -142074,7 +142988,7 @@ class Test_TC_S_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("nameSupport", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "int8u")); } break; case 7: @@ -142098,7 +143012,7 @@ class Test_TC_S_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); } break; default: @@ -142182,2409 +143096,6 @@ class Test_TC_S_2_1Suite : public TestCommand } }; -class Test_TC_S_2_2Suite : public TestCommand -{ -public: - Test_TC_S_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_2", 50, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_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; - - uint16_t maxScenes; - - 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 - { - 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)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - maxScenes = value; - } - 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))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), (maxScenes / 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("sceneCount", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentScene", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::GroupId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentGroup", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "group_id", "groupid")); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("sceneValid", value, true)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "uint8")); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - VerifyOrReturn(CheckValuePresent("transitionTime", value.transitionTime)); - VerifyOrReturn(CheckValue("transitionTime.Value()", value.transitionTime.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("extensionFieldSets", value.extensionFieldSets)); - { - auto iter_1 = value.extensionFieldSets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].clusterID", iter_1.GetValue().clusterID, 6UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 1UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 1)); - } - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].clusterID", iter_1.GetValue().clusterID, 8UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 100UL)); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeID", - iter_3.GetValue().attributeID, 1UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeValue", - iter_3.GetValue().attributeValue, 0UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 2)); - } - VerifyOrReturn( - CheckNoMoreListItems("extensionFieldSets.Value()", iter_1, 2)); - } - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - VerifyOrReturn(CheckValuePresent("transitionTime", value.transitionTime)); - VerifyOrReturn(CheckValue("transitionTime.Value()", value.transitionTime.Value(), 0U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 1))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 1U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 1)); - } - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), (maxScenes / 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 1))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 1U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 1)); - } - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), (maxScenes / 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 2U)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 1U)); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("sceneList.Value()[1]", iter_1.GetValue(), 2U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 2)); - } - } - break; - case 43: - 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))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 2U)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 2U)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 2U)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 2U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 3U)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 3))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 2U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 3U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 1)); - } - } - 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; - 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 sends a RemoveAllGroups command to DUT."); - VerifyOrDo(!ShouldSkip("G.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - 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 2: { - LogStep(2, "TH reads from the DUT the (0x0006) SceneTableSize attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneTableSize::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 0a: preparation step for using commands from Groups cluster: Add KeySet"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 0ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 0ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 0ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 1U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].groupId = 2U; - listHolder_0->mList[1].groupKeySetID = 417U; - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1a: TH sends a AddGroup command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("G.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 1U; - value.groupName = chip::Span("Group1garbage: not in length on purpose", 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 1b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveAllScenes::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 1c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "STep 2a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 100U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 2a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC1 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, - "Step 2b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::StoreScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::StoreScene::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Step 3a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 3a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, - "Step 3b: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Step 3c: TH reads the SceneCount attribute from DUT."); - VerifyOrDo(!ShouldSkip("S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneCount::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3c: TH reads the CurrentScene attribute from DUT."); - VerifyOrDo(!ShouldSkip("S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::CurrentScene::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 3c: TH reads the CurrentGroup attribute from DUT."); - VerifyOrDo(!ShouldSkip("S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::CurrentGroup::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Step 3c: TH reads the SceneValid attribute from DUT."); - VerifyOrDo(!ShouldSkip("S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneValid::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4a: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 4a: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 4c: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Step 4c: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, - "Step 4d: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - case 23: { - LogStep(23, - "Step 5: TH sends a ViewScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set to " - "0x01."); - VerifyOrDo(!ShouldSkip("S.S.C01.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::ViewScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::ViewScene::Id, value, - chip::NullOptional - - ); - } - case 24: { - LogStep(24, - "Step 5: TH sends a ViewScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set to " - "0x01."); - VerifyOrDo(!ShouldSkip("S.S.C01.Rsp && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::ViewScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::ViewScene::Id, value, - chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Step 6: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Step 7a: TH sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveAllScenes::Id, value, - chip::NullOptional - - ); - } - case 27: { - LogStep(27, "Step 7b: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 28: { - LogStep(28, - "Step 8a: TH sends a AddScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to " - "0x01, the TransitionTime field set to 0x0001 and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("S.S.C00.Rsp && && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::AddScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - value.transitionTime = 1U; - value.sceneName = chip::Span("Scene1garbage: not in length on purpose", 6); - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].clusterID = 6UL; - - { - auto * listHolder_2 = new ListHolder(1); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 1UL; - - listHolder_0->mList[0].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 1); - } - - listHolder_0->mList[1].clusterID = 8UL; - - { - auto * listHolder_2 = new ListHolder(2); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 100UL; - - listHolder_2->mList[1].attributeID = 1UL; - listHolder_2->mList[1].attributeValue = 0UL; - - listHolder_0->mList[1].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 2); - } - - value.extensionFieldSets = - chip::app::DataModel::List(listHolder_0->mList, - 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::AddScene::Id, value, chip::NullOptional - - ); - } - case 29: { - LogStep(29, - "Step 8a: TH sends a AddScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to " - "0x01, the TransitionTime field set to 0x0001 and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please execute the add scene command with extensionfieldsets in accordance with AC1 on DUT " - "and enter 'y' if the command is successfulgarbage: not in length on purpose", - 133); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 30: { - LogStep(30, "Step 8b: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 31: { - LogStep(31, - "Step 9a: TH sends a RemoveScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveScene::Id, value, - chip::NullOptional - - ); - } - case 32: { - LogStep(32, "Step 9b: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 33: { - LogStep(33, "Step 10a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Step 10a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 35: { - LogStep(35, - "Step 10b: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001 and the SceneID field " - "set to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - case 36: { - LogStep(36, "Step 11a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 100U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 37: { - LogStep(37, "Step 11a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC1 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 38: { - LogStep(38, - "Step 11b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::StoreScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::StoreScene::Id, value, - chip::NullOptional - - ); - } - case 39: { - LogStep(39, "Step 12a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 40: { - LogStep(40, "Step 12a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 41: { - LogStep(41, - "Step 12b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x02."); - VerifyOrDo(!ShouldSkip("S.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::StoreScene::Type value; - value.groupID = 1U; - value.sceneID = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::StoreScene::Id, value, - chip::NullOptional - - ); - } - case 42: { - LogStep(42, "Step 12c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 43: { - LogStep(43, "Step 13a: If capacity allows, TH sends a AddGroup command to DUT with the GroupID field set to 0x0002."); - VerifyOrDo(!ShouldSkip("G.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 2U; - value.groupName = chip::Span("Group2garbage: not in length on purpose", 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 44: { - LogStep(44, "Step 13b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0002."); - VerifyOrDo(!ShouldSkip("S.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type value; - value.groupID = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveAllScenes::Id, value, - chip::NullOptional - - ); - } - case 45: { - LogStep(45, "Step 13c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0002."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 46: { - LogStep(46, "Step 14a: TH configures AC3 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 1U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 47: { - LogStep(47, "Step 14a: TH configures AC3 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC3 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 48: { - LogStep(48, - "Step 14b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0002 and the SceneID field set " - "to 0x03."); - VerifyOrDo(!ShouldSkip("S.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::StoreScene::Type value; - value.groupID = 2U; - value.sceneID = 3U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::StoreScene::Id, value, - chip::NullOptional - - ); - } - case 49: { - LogStep(49, "Step 14c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0002."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_S_2_3Suite : public TestCommand -{ -public: - Test_TC_S_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_3", 24, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("G1", 0, UINT16_MAX, &mG1); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_2_3Suite() {} - - 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 mG1; - chip::Optional mTimeout; - - uint16_t maxScenes; - - 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 - { - 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)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - maxScenes = value; - } - 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)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), (maxScenes / 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 0)); - } - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - VerifyOrReturn(CheckValuePresent("transitionTime", value.transitionTime)); - VerifyOrReturn(CheckValue("transitionTime.Value()", value.transitionTime.Value(), 10U)); - VerifyOrReturn(CheckValuePresent("extensionFieldSets", value.extensionFieldSets)); - { - auto iter_1 = value.extensionFieldSets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].clusterID", iter_1.GetValue().clusterID, 6UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 1UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 1)); - } - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].clusterID", iter_1.GetValue().clusterID, 8UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 100UL)); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeID", - iter_3.GetValue().attributeID, 1UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeValue", - iter_3.GetValue().attributeValue, 0UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 2)); - } - VerifyOrReturn( - CheckNoMoreListItems("extensionFieldSets.Value()", iter_1, 2)); - } - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - VerifyOrReturn(CheckValuePresent("transitionTime", value.transitionTime)); - VerifyOrReturn(CheckValue("transitionTime.Value()", value.transitionTime.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("extensionFieldSets", value.extensionFieldSets)); - { - auto iter_1 = value.extensionFieldSets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].clusterID", iter_1.GetValue().clusterID, 6UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 1UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 1)); - } - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].clusterID", iter_1.GetValue().clusterID, 8UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 100UL)); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeID", - iter_3.GetValue().attributeID, 1UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeValue", - iter_3.GetValue().attributeValue, 0UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 2)); - } - VerifyOrReturn( - CheckNoMoreListItems("extensionFieldSets.Value()", iter_1, 2)); - } - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 1))); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 1U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 1)); - } - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupIdentifierFrom", value.groupIdentifierFrom, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValue("sceneIdentifierFrom", value.sceneIdentifierFrom, 1U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 1U)); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("sceneList.Value()[1]", iter_1.GetValue(), 2U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 2)); - } - } - 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; - 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 reads from the DUT the (0x0006) SceneTableSize attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneTableSize::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0a: preparation step for using commands from Groups cluster: Add KeySet"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 0ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 0ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 0ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = mG1.HasValue() ? mG1.Value() : 1U; - listHolder_0->mList[0].groupKeySetID = 417U; - 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, "Step 1a: TH sends a AddGroup command to DUT with the GroupID field set to G1."); - VerifyOrDo(!ShouldSkip("G.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.groupName = chip::Span("Group1garbage: not in length on purpose", 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 1b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to G1."); - VerifyOrDo(!ShouldSkip("S.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveAllScenes::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 1c: TH sends a GetSceneMembership command to DUT with the GroupID field set to G1."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, - "Step 2a: TH sends a EnhancedAddScene command to DUT with the GroupID field set to G1, the SceneID field set " - "to 0x01, the TransitionTime field set to 0x000a (1s) and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("S.S.C40.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneID = 1U; - value.transitionTime = 10U; - value.sceneName = chip::Span("Scene1garbage: not in length on purpose", 6); - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].clusterID = 6UL; - - { - auto * listHolder_2 = new ListHolder(1); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 1UL; - - listHolder_0->mList[0].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 1); - } - - listHolder_0->mList[1].clusterID = 8UL; - - { - auto * listHolder_2 = new ListHolder(2); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 100UL; - - listHolder_2->mList[1].attributeID = 1UL; - listHolder_2->mList[1].attributeValue = 0UL; - - listHolder_0->mList[1].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 2); - } - - value.extensionFieldSets = - chip::app::DataModel::List(listHolder_0->mList, - 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::EnhancedAddScene::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, - "Step 2a: TH sends a AddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, " - "the TransitionTime field set to 0x0001 (1s) and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("(!S.S.C40.Rsp) && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::AddScene::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneID = 1U; - value.transitionTime = 1U; - value.sceneName = chip::Span("Scene1garbage: not in length on purpose", 6); - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].clusterID = 6UL; - - { - auto * listHolder_2 = new ListHolder(1); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 1UL; - - listHolder_0->mList[0].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 1); - } - - listHolder_0->mList[1].clusterID = 8UL; - - { - auto * listHolder_2 = new ListHolder(2); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 100UL; - - listHolder_2->mList[1].attributeID = 1UL; - listHolder_2->mList[1].attributeValue = 0UL; - - listHolder_0->mList[1].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 2); - } - - value.extensionFieldSets = - chip::app::DataModel::List(listHolder_0->mList, - 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::AddScene::Id, value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, - "Step 2b: TH sends a EnhancedAddScene command to DUT with the GroupID field set to G1, the SceneID field set " - "to 0x01, the TransitionTime field set to 0x000a and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("S.S.C40.Rsp && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please execute the enhanced add scene command with extensionfieldsets in accordance with " - "AC1 on DUT and enter 'y' if the command is successfulgarbage: not in length on purpose", - 142); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, - "Step 2b: TH sends a AddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, " - "the TransitionTime field set to 0x0001 and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("(!S.S.C40.Rsp) && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please execute the add scene command with extensionfieldsets in accordance with AC1 on DUT " - "and enter 'y' if the command is successfulgarbage: not in length on purpose", - 133); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, - "Step 3a: TH sends a EnhancedViewScene command to DUT with the GroupID field set to G1 and the SceneID field " - "set to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C41.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::EnhancedViewScene::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep( - 12, - "Step 3a: TH sends a ViewScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01."); - VerifyOrDo(!ShouldSkip("(!S.S.C41.Rsp) && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::ViewScene::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::ViewScene::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, - "Step 3b: TH sends a EnhancedViewScene command to DUT with the GroupID field set to G1 and the SceneID field " - "set to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C41.Rsp && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please execute the ehanced-view-scene command and verify that the extensionfieldsets, status, groupID and SceneID " - "are in accordance with AC1 on DUT and enter 'y' if the command is successfulgarbage: not in length on purpose", - 190); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep( - 14, - "Step 3b: TH sends a ViewScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01."); - VerifyOrDo(!ShouldSkip("(!S.S.C41.Rsp) && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please execute the view-scene command and verify that the extensionfieldsets, status, groupID and SceneID are in " - "accordance with AC1 on DUT and enter 'y' if the command is successfulgarbage: not in length on purpose", - 182); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 4: TH sends a GetSceneMembership command to DUT with the GroupID field set to G1."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Step 5a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Step 5a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, - "Step 5b: TH sends a RecallScene command to group G1 with the GroupID field set to G1 and the scene ID field " - "set to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneID = 1U; - return SendGroupCommand(kIdentityAlpha, 1, Scenes::Id, Scenes::Commands::RecallScene::Id, value); - } - case 19: { - LogStep(19, "Wait 1s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "TH confirm the DUT reached AC1 (on level control cluster) after 1s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Verify DUT returns to AC1."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please confirm AC1 on DUT and enter 'y'.garbage: not in length on purpose", 40); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, - "Step 6a: TH sends a CopyScene command to DUT with the mode field set to 0x00, the group identifier from field " - "set to G1, the scene identifier from field set to 0x01, the group identifier to field set to G1 and the scene " - "identifier to field set to 0x02."); - VerifyOrDo(!ShouldSkip("S.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::CopyScene::Type value; - value.mode = static_cast>(0U); - value.groupIdentifierFrom = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneIdentifierFrom = 1U; - value.groupIdentifierTo = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneIdentifierTo = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::CopyScene::Id, value, - chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Step 6b: TH sends a GetSceneMembership command to DUT with the GroupID field set to G1."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_S_2_4Suite : public TestCommand -{ -public: - Test_TC_S_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_4", 27, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_2_4Suite() {} - - 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 - { - 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)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - 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; - 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 sends a RemoveAllGroups command to DUT."); - VerifyOrDo(!ShouldSkip("G.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - 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 2: { - LogStep(2, "Step 0a: preparation step for using commands from Groups cluster: Add KeySet"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 0ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 0ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 0ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 1U; - listHolder_0->mList[0].groupKeySetID = 417U; - 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, "Step 2a: TH sends a AddGroup command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("G.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 1U; - value.groupName = chip::Span("Group1garbage: not in length on purpose", 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 2b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveAllScenes::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, - "Step 3: TH sends a AddScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to " - "0x01, the TransitionTime field set to 0x0001 and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("S.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::AddScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - value.transitionTime = 20U; - value.sceneName = chip::Span("Scene1garbage: not in length on purpose", 6); - - value.extensionFieldSets = chip::app::DataModel::List(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::AddScene::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 4a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 100U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 4a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC1 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, - "Step 4b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::StoreScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::StoreScene::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 5a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Wait 1s for level to change"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "TH confirm the DUT reached AC2 (on level control cluster) after 1s, which is different from AC1"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 5a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, - "Step 5b: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01 and the TransitionTime field omitted."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Wait 20s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 20000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "TH confirm the DUT reached AC1 (on level control cluster) after 20s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "DUT transitions to AC1 over 20s."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please confirm that transition to AC1 was made over 20sgarbage: not in length on purpose", 55); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 19: { - LogStep(19, "TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, - "Step 6a: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to " - "0x01 and the TransitionTime field set to 0x0032 (5s)."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - value.transitionTime.Emplace(); - value.transitionTime.Value().SetNonNull(); - value.transitionTime.Value().Value() = 50U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Wait 5s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "TH confirm the DUT reached AC2 (on level control cluster) after 5s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, "DUT transitions to AC1 over 5."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please confirm that transition to AC1 was made over 5sgarbage: not in length on purpose", 54); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Step 7a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Step 7a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 26: { - LogStep(26, - "Step 7b: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to " - "0x01 and the TransitionTime field set to null (no transition time override)."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - value.transitionTime.Emplace(); - value.transitionTime.Value().SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_S_2_5Suite : public TestCommand { public: @@ -144695,61 +143206,6 @@ class Test_TC_S_2_6Suite : public TestCommand } }; -class Test_TC_S_3_1Suite : public TestCommand -{ -public: - Test_TC_S_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_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_S_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 - { - 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; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_BRBINFO_2_2Suite : public TestCommand { public: @@ -145243,6 +143699,7 @@ 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), @@ -145336,6 +143793,7 @@ 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), @@ -145483,6 +143941,7 @@ 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), @@ -145524,9 +143983,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), make_unique(credsIssuerConfig), @@ -145548,12 +144004,9 @@ 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), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -145574,6 +144027,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), @@ -145619,6 +144074,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), @@ -145683,9 +144140,7 @@ 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), make_unique(credsIssuerConfig), @@ -145731,26 +144186,19 @@ 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), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - 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/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 9de07fa1b127ee..bae08b8fa26891 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -111,6 +111,7 @@ class TestList : public Command { printf("Test_TC_CGEN_2_1\n"); printf("Test_TC_DGGEN_1_1\n"); printf("Test_TC_DGGEN_2_1\n"); + printf("Test_TC_GRPKEY_1_1\n"); printf("Test_TC_ICDM_1_1\n"); printf("Test_TC_ICDM_2_1\n"); printf("Test_TC_I_1_1\n"); @@ -196,6 +197,7 @@ class TestList : public Command { printf("Test_TC_SMOKECO_2_1\n"); printf("Test_TC_SMOKECO_2_6\n"); printf("Test_TC_SWTCH_1_1\n"); + printf("Test_TC_RVCOPSTATE_1_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); printf("Test_TC_TSTAT_1_1\n"); @@ -7350,6 +7352,10 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: @@ -7635,27 +7641,11 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() @@ -8815,6 +8805,10 @@ class Test_TC_CC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: read the global attribute: ClusterRevision\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: @@ -9764,25 +9758,11 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMap_2() @@ -16670,12 +16650,12 @@ class Test_TC_CC_4_3 : public TestCommandBridge { err = TestWait10s_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TStep 3c: H reads CurrentSaturation attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 3c: H reads CurrentSaturation attribute from DUT\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestTStep3cHReadsCurrentSaturationAttributeFromDut_19(); + err = TestStep3cHReadsCurrentSaturationAttributeFromDut_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 10s\n"); @@ -16744,12 +16724,12 @@ class Test_TC_CC_4_3 : public TestCommandBridge { err = TestStep4aThReadsColorModeAttributeFromDut_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TStep 4b: H reads EnhancedColorMode attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 4b: H reads EnhancedColorMode attribute from DUT\n"); if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { NextTest(); return; } - err = TestTStep4bHReadsEnhancedColorModeAttributeFromDut_28(); + err = TestStep4bHReadsEnhancedColorModeAttributeFromDut_28(); break; case 29: ChipLogProgress(chipTool, " ***** Test Step 29 : Turn off light that we turned on\n"); @@ -17211,7 +17191,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestTStep3cHReadsCurrentSaturationAttributeFromDut_19() + CHIP_ERROR TestStep3cHReadsCurrentSaturationAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -17219,7 +17199,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TStep 3c: H reads CurrentSaturation attribute from DUT Error: %@", err); + NSLog(@"Step 3c: H reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17374,7 +17354,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTStep4bHReadsEnhancedColorModeAttributeFromDut_28() + CHIP_ERROR TestStep4bHReadsEnhancedColorModeAttributeFromDut_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -17382,7 +17362,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TStep 4b: H reads EnhancedColorMode attribute from DUT Error: %@", err); + NSLog(@"Step 4b: H reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21500,12 +21480,12 @@ class Test_TC_CC_6_1 : public TestCommandBridge { err = TestStep0bThSendsOnCommandToDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TStep 1a: H reads ColorTempPhysicalMinMireds attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 1a: H reads ColorTempPhysicalMinMireds attribute from DUT\n"); if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestTStep1aHReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); + err = TestStep1aHReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 1b: TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); @@ -21797,7 +21777,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; - CHIP_ERROR TestTStep1aHReadsColorTempPhysicalMinMiredsAttributeFromDut_3() + CHIP_ERROR TestStep1aHReadsColorTempPhysicalMinMiredsAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -21805,7 +21785,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TStep 1a: H reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); + NSLog(@"Step 1a: H reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27593,258 +27573,257 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("CDOCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !CDOCONC.S.F00 && !CDOCONC.S.F01 && !CDOCONC.S.F02 && !CDOCONC.S.F03 && !CDOCONC.S.F04 && !CDOCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenCdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenCdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenCdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CDOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenCdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenCdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenCdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenCdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CDOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenCdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenCdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CDOCONC.S.F02 && CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenCdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenCdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CDOCONC.S.F02 && !CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenCdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenCdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CDOCONC.S.F03 && CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenCdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenCdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CDOCONC.S.F03 && !CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3jGivenCdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenCdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CDOCONC.S.F04 && CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenCdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenCdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CDOCONC.S.F04 && !CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3lGivenCdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenCdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CDOCONC.S.F05 && CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenCdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenCdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CDOCONC.S.F05 && !CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenCdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.A0007 && CDOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "CDOCONC.S.A0007 is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.A0007 && CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "CDOCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !CDOCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !CDOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when CDOCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when CDOCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !CDOCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when CDOCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when CDOCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !CDOCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !CDOCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("CDOCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("CDOCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -27944,6 +27923,9 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -27957,7 +27939,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -27998,7 +27980,33 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenCdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenCdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28019,7 +28027,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenCdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenCdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28040,7 +28048,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenCdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenCdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28061,7 +28069,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenCdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenCdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28082,7 +28090,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenCdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenCdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28103,7 +28111,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenCdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenCdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28124,7 +28132,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenCdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenCdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28145,7 +28153,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenCdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenCdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28166,7 +28174,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenCdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenCdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28187,7 +28195,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenCdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenCdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28208,7 +28216,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenCdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenCdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28229,7 +28237,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenCdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenCdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28250,7 +28258,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28279,7 +28287,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28307,7 +28315,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28330,7 +28338,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28356,7 +28364,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28385,7 +28393,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28414,7 +28422,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28441,7 +28449,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28467,7 +28475,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28494,7 +28502,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28520,7 +28528,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28543,7 +28551,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28567,7 +28575,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28593,7 +28601,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29122,258 +29130,257 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("CMOCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !CMOCONC.S.F00 && !CMOCONC.S.F01 && !CMOCONC.S.F02 && !CMOCONC.S.F03 && !CMOCONC.S.F04 && !CMOCONC.S.F05 ")) { NextTest(); return; } - err = TestStep3bGivenCmoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenCmoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenCmoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CMOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenCmoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenCmoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenCmoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenCmoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CMOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenCmoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenCmoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CMOCONC.S.F02 && CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenCmoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenCmoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CMOCONC.S.F02 && !CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenCmoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenCmoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CMOCONC.S.F03 && CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenCmoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenCmoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CMOCONC.S.F03 && !CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep3jGivenCmoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenCmoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CMOCONC.S.F04 && CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenCmoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenCmoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CMOCONC.S.F04 && !CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep3lGivenCmoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenCmoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CMOCONC.S.F05 && CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenCmoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenCmoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CMOCONC.S.F05 && !CMOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenCmoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.A0007 && CMOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "CMOCONC.S.A0007 is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.A0007 && CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "CMOCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !CMOCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !CMOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when CMOCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when CMOCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !CMOCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when CMOCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when CMOCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !CMOCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !CMOCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("CMOCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("CMOCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -29473,6 +29480,9 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -29486,7 +29496,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -29527,7 +29537,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenCmoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29537,10 +29547,15 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -29548,7 +29563,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenCmoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3bGivenCmoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29558,7 +29573,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29569,7 +29584,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenCmoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3cGivenCmoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29579,7 +29594,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29590,7 +29605,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenCmoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3dGivenCmoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29600,7 +29615,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29611,7 +29626,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenCmoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3eGivenCmoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29621,7 +29636,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29632,7 +29647,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenCmoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3fGivenCmoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29642,7 +29657,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29653,7 +29668,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenCmoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3gGivenCmoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29663,7 +29678,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29674,7 +29689,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenCmoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3hGivenCmoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29684,7 +29699,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29695,7 +29710,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenCmoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3iGivenCmoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29705,7 +29720,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29716,7 +29731,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenCmoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3jGivenCmoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29726,7 +29741,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29737,7 +29752,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenCmoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3kGivenCmoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29747,7 +29762,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29758,7 +29773,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenCmoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3lGivenCmoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29768,7 +29783,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29779,7 +29794,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep3mGivenCmoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29788,20 +29803,12 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -29826,6 +29833,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); @@ -29836,7 +29844,35 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29859,7 +29895,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29885,7 +29921,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29914,7 +29950,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29943,7 +29979,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29970,7 +30006,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29996,7 +30032,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30023,7 +30059,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30049,7 +30085,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30072,7 +30108,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30096,7 +30132,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30122,7 +30158,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30651,258 +30687,257 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("FLDCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !FLDCONC.S.F00 && !FLDCONC.S.F01 && !FLDCONC.S.F02 && !FLDCONC.S.F03 && !FLDCONC.S.F04 && !FLDCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenFldconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenFldconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenFldconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !FLDCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenFldconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenFldconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenFldconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenFldconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !FLDCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenFldconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenFldconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FLDCONC.S.F02 && FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenFldconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenFldconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !FLDCONC.S.F02 && !FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenFldconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenFldconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("FLDCONC.S.F03 && FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenFldconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenFldconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !FLDCONC.S.F03 && !FLDCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3jGivenFldconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenFldconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("FLDCONC.S.F04 && FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenFldconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenFldconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !FLDCONC.S.F04 && !FLDCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3lGivenFldconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenFldconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("FLDCONC.S.F05 && FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenFldconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenFldconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !FLDCONC.S.F05 && !FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenFldconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.A0007 && FLDCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "FLDCONC.S.A0007 is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.A0007 && FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "FLDCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !FLDCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !FLDCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when FLDCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when FLDCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !FLDCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when FLDCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when FLDCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !FLDCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !FLDCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("FLDCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("FLDCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -31002,6 +31037,9 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31015,7 +31053,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -31056,7 +31094,33 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenFldconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenFldconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31077,7 +31141,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenFldconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenFldconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31098,7 +31162,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenFldconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenFldconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31119,7 +31183,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenFldconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenFldconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31140,7 +31204,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenFldconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenFldconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31161,7 +31225,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenFldconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenFldconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31182,7 +31246,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenFldconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenFldconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31203,7 +31267,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenFldconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenFldconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31224,7 +31288,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenFldconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenFldconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31245,7 +31309,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenFldconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenFldconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31266,7 +31330,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenFldconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenFldconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31287,7 +31351,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenFldconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenFldconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31308,7 +31372,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31337,7 +31401,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31365,7 +31429,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31388,7 +31452,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31414,7 +31478,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31443,7 +31507,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31472,7 +31536,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31499,7 +31563,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31525,7 +31589,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31552,7 +31616,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31578,7 +31642,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31601,7 +31665,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31625,7 +31689,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31651,7 +31715,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32180,258 +32244,257 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("NDOCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !NDOCONC.S.F00 && !NDOCONC.S.F01 && !NDOCONC.S.F02 && !NDOCONC.S.F03 && !NDOCONC.S.F04 && !NDOCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenNdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenNdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenNdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !NDOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenNdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenNdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenNdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenNdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !NDOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenNdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenNdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("NDOCONC.S.F02 && NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenNdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenNdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !NDOCONC.S.F02 && !NDOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3hGivenNdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenNdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("NDOCONC.S.F03 && NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenNdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenNdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !NDOCONC.S.F03 && !NDOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3jGivenNdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenNdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("NDOCONC.S.F04 && NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenNdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenNdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !NDOCONC.S.F04 && NDOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3lGivenNdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenNdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("NDOCONC.S.F05 && NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenNdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenNdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !NDOCONC.S.F05 && !NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenNdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.A0007 && NDOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "NDOCONC.S.A0007 is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.A0007 && NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "NDOCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !NDOCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !NDOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when NDOCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when NDOCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !NDOCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when NDOCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.F05")) { NextTest(); return; } - err = TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F01")) { + " ***** Test Step 24 : Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when NDOCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !NDOCONC.S.F05 ")) { NextTest(); return; } - err = TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F01")) { + " ***** Test Step 25 : Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_25(); + err = TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !NDOCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("NDOCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("NDOCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -32531,6 +32594,9 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -32544,7 +32610,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -32585,7 +32651,33 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenNdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenNdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32606,7 +32698,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenNdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenNdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32627,7 +32719,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenNdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenNdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32648,7 +32740,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenNdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenNdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32669,7 +32761,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenNdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenNdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32690,7 +32782,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenNdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenNdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32711,7 +32803,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenNdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenNdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32732,7 +32824,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenNdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenNdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32753,7 +32845,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenNdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenNdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32774,7 +32866,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenNdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenNdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32795,7 +32887,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenNdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenNdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32816,7 +32908,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenNdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenNdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32837,7 +32929,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32866,7 +32958,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32894,7 +32986,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32917,7 +33009,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32943,7 +33035,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32972,7 +33064,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33001,7 +33093,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33028,7 +33120,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33054,7 +33146,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33081,7 +33173,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_23() + TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33107,7 +33199,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33130,7 +33222,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33154,7 +33246,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33180,7 +33272,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33709,256 +33801,253 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("OZCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip(" !OZCONC.S.F00 && !OZCONC.S.F01 && !OZCONC.S.F02 && !OZCONC.S.F03 && !OZCONC.S.F04 && !OZCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenOzconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("OZCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenOzconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenOzconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenOzconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenOzconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("OZCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenOzconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenOzconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenOzconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenOzconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("OZCONC.S.F02 && OZCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenOzconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenOzconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F02 && !OZCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenOzconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenOzconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("OZCONC.S.F03 && OZCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenOzconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenOzconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F03 && !OZCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3jGivenOzconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenOzconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("OZCONC.S.F04 && OZCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenOzconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenOzconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F04 && !OZCONC.S.F00")) { NextTest(); return; } - err = TestStep3lGivenOzconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenOzconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("OZCONC.S.F05 && OZCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenOzconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenOzconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F05 && !OZCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenOzconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.A0007 && OZCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "OZCONC.S.A0007 is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("OZCONC.S.A0007 && OZCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "OZCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !OZCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when OZCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("OZCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when OZCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !OZCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when OZCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("OZCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when OZCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !OZCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when OZCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("OZCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when OZCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !OZCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("OZCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !OZCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("OZCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("OZCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -34058,6 +34147,9 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -34071,7 +34163,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -34112,7 +34204,33 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenOzconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenOzconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34133,7 +34251,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenOzconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenOzconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34154,7 +34272,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenOzconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenOzconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34175,7 +34293,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenOzconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenOzconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34196,7 +34314,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenOzconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenOzconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34217,7 +34335,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenOzconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenOzconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34238,7 +34356,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenOzconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenOzconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34259,7 +34377,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenOzconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenOzconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34280,7 +34398,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenOzconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenOzconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34301,7 +34419,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenOzconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenOzconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34322,7 +34440,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenOzconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenOzconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34343,7 +34461,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenOzconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenOzconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34364,7 +34482,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34393,7 +34511,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34421,7 +34539,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34444,7 +34562,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34470,7 +34588,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34499,7 +34617,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34528,7 +34646,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34554,7 +34672,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_21() + CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34580,7 +34698,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34607,7 +34725,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34633,7 +34751,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34656,7 +34774,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34680,7 +34798,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34706,7 +34824,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35235,258 +35353,257 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PMHCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !PMHCONC.S.F00 && !PMHCONC.S.F01 && !PMHCONC.S.F02 && !PMHCONC.S.F03 && !PMHCONC.S.F04 && !PMHCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenPmhconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenPmhconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenPmhconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMHCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenPmhconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenPmhconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenPmhconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenPmhconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMHCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenPmhconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenPmhconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMHCONC.S.F02 && PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenPmhconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenPmhconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMHCONC.S.F02 && !PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenPmhconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenPmhconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMHCONC.S.F03 && PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenPmhconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenPmhconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMHCONC.S.F03 && !PMHCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3jGivenPmhconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenPmhconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMHCONC.S.F04 && PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenPmhconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenPmhconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMHCONC.S.F04 && PMHCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3lGivenPmhconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenPmhconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMHCONC.S.F05 && PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenPmhconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenPmhconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMHCONC.S.F05 && !PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenPmhconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.A0007 && PMHCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "PMHCONC.S.A0007 is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.A0007 && PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "PMHCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !PMHCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !PMHCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when PMHCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when PMHCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !PMHCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when PMHCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when PMHCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !PMHCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !PMHCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PMHCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PMHCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -35586,6 +35703,9 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -35599,7 +35719,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -35640,7 +35760,33 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenPmhconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenPmhconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35661,7 +35807,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenPmhconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenPmhconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35682,7 +35828,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenPmhconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenPmhconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35703,7 +35849,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenPmhconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenPmhconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35724,7 +35870,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenPmhconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenPmhconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35745,7 +35891,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenPmhconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenPmhconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35766,7 +35912,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenPmhconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenPmhconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35787,7 +35933,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenPmhconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenPmhconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35808,7 +35954,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenPmhconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenPmhconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35829,7 +35975,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenPmhconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenPmhconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35850,7 +35996,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenPmhconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenPmhconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35871,7 +36017,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenPmhconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenPmhconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35892,7 +36038,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35921,7 +36067,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35949,7 +36095,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35972,7 +36118,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35998,7 +36144,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36027,7 +36173,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36056,7 +36202,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36083,7 +36229,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36109,7 +36255,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36136,7 +36282,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36162,7 +36308,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36185,7 +36331,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36209,7 +36355,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36235,7 +36381,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36764,258 +36910,257 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PMICONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !PMICONC.S.F00 && !PMICONC.S.F01 && !PMICONC.S.F02 && !PMICONC.S.F03 && !PMICONC.S.F04 && !PMICONC.S.F05 ")) { NextTest(); return; } - err = TestStep3bGivenPmiconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMICONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenPmiconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenPmiconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMICONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenPmiconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenPmiconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMICONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenPmiconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenPmiconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMICONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenPmiconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenPmiconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMICONC.S.F02 && PMICONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenPmiconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenPmiconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMICONC.S.F02 && !PMICONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenPmiconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenPmiconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMICONC.S.F03 && PMICONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenPmiconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenPmiconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMICONC.S.F03 && !PMICONC.S.F01")) { NextTest(); return; } - err = TestStep3jGivenPmiconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenPmiconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMICONC.S.F04 && PMICONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenPmiconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenPmiconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMICONC.S.F04 && !PMICONC.S.F00 ")) { NextTest(); return; } - err = TestStep3lGivenPmiconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenPmiconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMICONC.S.F05 && PMICONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenPmiconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenPmiconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMICONC.S.F05 && !PMICONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenPmiconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.A0007 && PMICONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "PMICONC.S.A0007 is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("PMICONC.S.A0007 && PMICONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "PMICONC.S.A0007 is not set\n"); + if (ShouldSkip(" !PMICONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when PMICONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("PMICONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when PMICONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !PMICONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when PMICONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMICONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when PMICONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !PMICONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when PMICONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMICONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when PMICONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !PMICONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("PMICONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !PMICONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PMICONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PMICONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -37115,6 +37260,9 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -37128,7 +37276,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -37169,7 +37317,33 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenPmiconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenPmiconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37190,7 +37364,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenPmiconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenPmiconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37211,7 +37385,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenPmiconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenPmiconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37232,7 +37406,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenPmiconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenPmiconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37253,7 +37427,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenPmiconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenPmiconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37274,7 +37448,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenPmiconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenPmiconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37295,7 +37469,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenPmiconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenPmiconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37316,7 +37490,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenPmiconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenPmiconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37337,7 +37511,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenPmiconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenPmiconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37358,7 +37532,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenPmiconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenPmiconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37379,7 +37553,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenPmiconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenPmiconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37400,7 +37574,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenPmiconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenPmiconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37421,7 +37595,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37450,7 +37624,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37478,7 +37652,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37501,7 +37675,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37527,7 +37701,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37556,7 +37730,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37585,7 +37759,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37612,7 +37786,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37638,7 +37812,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37665,7 +37839,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37691,7 +37865,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37714,7 +37888,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37738,7 +37912,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37764,7 +37938,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38293,258 +38467,257 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PMKCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !PMKCONC.S.F00 && !PMKCONC.S.F01 && !PMKCONC.S.F02 && !PMKCONC.S.F03 && !PMKCONC.S.F04 && !PMKCONC.S.F05 ")) { NextTest(); return; } - err = TestStep3bGivenPmkconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenPmkconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenPmkconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMKCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenPmkconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenPmkconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenPmkconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenPmkconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMKCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenPmkconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenPmkconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMKCONC.S.F02 && PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenPmkconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenPmkconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMKCONC.S.F02 && !PMKCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3hGivenPmkconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenPmkconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMKCONC.S.F03 && PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenPmkconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenPmkconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMKCONC.S.F03 && !PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep3jGivenPmkconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenPmkconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMKCONC.S.F04 && PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenPmkconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenPmkconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMKCONC.S.F04 && !PMKCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3lGivenPmkconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenPmkconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMKCONC.S.F05 && PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenPmkconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenPmkconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMKCONC.S.F05 && !PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenPmkconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.A0007 && PMKCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "PMKCONC.S.A0007 is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.A0007 && PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "PMKCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !PMKCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !PMKCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when PMKCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when PMKCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !PMKCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when PMKCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when PMKCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !PMKCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !PMKCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PMKCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PMKCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -38644,6 +38817,9 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -38657,7 +38833,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -38698,7 +38874,33 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenPmkconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenPmkconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38719,7 +38921,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenPmkconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenPmkconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38740,7 +38942,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenPmkconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenPmkconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38761,7 +38963,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenPmkconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenPmkconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38782,7 +38984,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenPmkconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenPmkconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38803,7 +39005,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenPmkconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenPmkconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38824,7 +39026,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenPmkconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenPmkconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38845,7 +39047,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenPmkconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenPmkconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38866,7 +39068,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenPmkconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenPmkconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38887,7 +39089,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenPmkconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenPmkconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38908,7 +39110,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenPmkconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenPmkconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38929,7 +39131,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenPmkconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenPmkconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38950,7 +39152,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38979,7 +39181,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39007,7 +39209,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39030,7 +39232,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39056,7 +39258,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39085,7 +39287,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39114,7 +39316,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39141,7 +39343,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39167,7 +39369,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39194,7 +39396,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39220,7 +39422,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39243,7 +39445,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39267,7 +39469,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39293,7 +39495,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39822,256 +40024,253 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("RNCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip(" !RNCONC.S.F00 && !RNCONC.S.F01 && !RNCONC.S.F02 && !RNCONC.S.F03 && !RNCONC.S.F04 && !RNCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenRnconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("RNCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenRnconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenRnconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenRnconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenRnconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("RNCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenRnconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenRnconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenRnconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenRnconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("RNCONC.S.F02 && RNCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenRnconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenRnconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F02 && !RNCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenRnconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenRnconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("RNCONC.S.F03 && RNCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenRnconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenRnconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F03 && !RNCONC.S.F01")) { NextTest(); return; } - err = TestStep3jGivenRnconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenRnconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("RNCONC.S.F04 && RNCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenRnconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenRnconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F04 && RNCONC.S.F00")) { NextTest(); return; } - err = TestStep3lGivenRnconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenRnconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("RNCONC.S.F05 && RNCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenRnconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenRnconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F05 && !RNCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenRnconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.A0007 && RNCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "RNCONC.S.A0007 is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("RNCONC.S.A0007 && RNCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "RNCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !RNCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when RNCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("RNCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when RNCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !RNCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when RNCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("RNCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when RNCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !RNCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when RNCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("RNCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when RNCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !RNCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("RNCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !RNCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("RNCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("RNCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -40171,6 +40370,9 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -40184,7 +40386,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -40225,7 +40427,33 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenRnconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenRnconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40246,7 +40474,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenRnconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenRnconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40267,7 +40495,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenRnconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenRnconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40288,7 +40516,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenRnconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenRnconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40309,7 +40537,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenRnconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenRnconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40330,7 +40558,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenRnconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenRnconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40351,7 +40579,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenRnconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenRnconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40372,7 +40600,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenRnconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenRnconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40393,7 +40621,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenRnconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenRnconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40414,7 +40642,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenRnconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenRnconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40435,7 +40663,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenRnconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenRnconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40456,7 +40684,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenRnconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenRnconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40477,7 +40705,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40506,7 +40734,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40534,7 +40762,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40557,7 +40785,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40583,7 +40811,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40612,7 +40840,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40641,7 +40869,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40667,7 +40895,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_21() + CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40693,7 +40921,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40720,7 +40948,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40746,7 +40974,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40769,7 +40997,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40793,7 +41021,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40819,7 +41047,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41348,262 +41576,260 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("TVOCCONC.S.Afffd")) { + err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip(" !TVOCCONC.S.F00 && !TVOCCONC.S.F01 && !TVOCCONC.S.F02 && !TVOCCONC.S.F03 && !TVOCCONC.S.F04 && " + "!TVOCCONC.S.F05 ")) { NextTest(); return; } - err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; - case 2: + case 3: ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F00")) { + chipTool, " ***** Test Step 3 : Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep3bGivenTvocconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3bGivenTvocconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; - case 3: + case 4: ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit " + " ***** Test Step 4 : Step 3c: Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F00")) { + if (ShouldSkip(" !TVOCCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3cGivenTvocconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3cGivenTvocconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; - case 4: + case 5: ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F01")) { + chipTool, " ***** Test Step 5 : Step 3d: Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep3dGivenTvocconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3dGivenTvocconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; - case 5: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit " + " ***** Test Step 6 : Step 3e: Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F01")) { + if (ShouldSkip(" !TVOCCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3eGivenTvocconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3eGivenTvocconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; - case 6: + case 7: ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F02")) { + chipTool, " ***** Test Step 7 : Step 3f: Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TVOCCONC.S.F02 && TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep3fGivenTvocconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3fGivenTvocconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit " + " ***** Test Step 8 : Step 3g: Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F02")) { + if (ShouldSkip(" !TVOCCONC.S.F02 && !TVOCCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3gGivenTvocconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3gGivenTvocconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; - case 8: + case 9: ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F03")) { + chipTool, " ***** Test Step 9 : Step 3h: Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("TVOCCONC.S.F03 && TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenTvocconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3hGivenTvocconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; - case 9: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + " ***** Test Step 10 : Step 3i: Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F03")) { + if (ShouldSkip(" !TVOCCONC.S.F03 && !TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenTvocconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3iGivenTvocconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; - case 10: + case 11: ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F04")) { + chipTool, " ***** Test Step 11 : Step 3j: Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("TVOCCONC.S.F04 && TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep3jGivenTvocconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3jGivenTvocconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + " ***** Test Step 12 : Step 3k: Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F04")) { + if (ShouldSkip(" !TVOCCONC.S.F04 && !TVOCCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3kGivenTvocconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3kGivenTvocconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; - case 12: + case 13: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F05")) { + chipTool, " ***** Test Step 13 : Step 3l: Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("TVOCCONC.S.F05 && TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep3lGivenTvocconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3lGivenTvocconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; - case 13: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + " ***** Test Step 14 : Step 3m: Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F05")) { - NextTest(); - return; - } - err = TestStep3mGivenTvocconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb")) { + if (ShouldSkip(" !TVOCCONC.S.F05 && !TVOCCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenTvocconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.A0007 && TVOCCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "TVOCCONC.S.A0007 is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.A0007 && TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "TVOCCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !TVOCCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !TVOCCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when TVOCCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when TVOCCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !TVOCCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when TVOCCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when TVOCCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !TVOCCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5l: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !TVOCCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("TVOCCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5l: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("TVOCCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -41703,6 +41929,9 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -41716,7 +41945,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -41758,7 +41987,34 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenTvocconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenTvocconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41780,7 +42036,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenTvocconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenTvocconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41802,7 +42058,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenTvocconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenTvocconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41824,7 +42080,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenTvocconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenTvocconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41846,7 +42102,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenTvocconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenTvocconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41868,7 +42124,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenTvocconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenTvocconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41890,7 +42146,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenTvocconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenTvocconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41912,7 +42168,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenTvocconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenTvocconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41934,7 +42190,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenTvocconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenTvocconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41956,7 +42212,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenTvocconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenTvocconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41978,7 +42234,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenTvocconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenTvocconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42000,7 +42256,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenTvocconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenTvocconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42022,7 +42278,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42052,7 +42308,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42081,7 +42337,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42105,7 +42361,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42132,7 +42388,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42162,7 +42418,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42192,7 +42448,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42220,7 +42476,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42247,7 +42503,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42275,7 +42531,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42302,7 +42558,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42326,7 +42582,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42351,7 +42607,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42378,7 +42634,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45820,23 +46076,15 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("DESC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip("DESC.S.Afffc")) { - NextTest(); - return; - } err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DESC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -45844,7 +46092,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DESC.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -45858,7 +46106,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffb")) { + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } @@ -45871,7 +46119,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffa")) { + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } @@ -45884,7 +46132,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff9")) { + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } @@ -45897,7 +46145,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff8")) { + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } @@ -51649,13 +51897,12 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, - " ***** Test Step 2 : Step 3: TH writes TH writes to the DUT the a value less than or equal to the value read in " - "step 2\n"); + " ***** Test Step 2 : Step 3: TH writes to the DUT the a value less than or equal to the value read in step 2\n"); if (ShouldSkip("FAN.S.A0005")) { NextTest(); return; } - err = TestStep3ThWritesThWritesToTheDutTheAValueLessThanOrEqualToTheValueReadInStep2_2(); + err = TestStep3ThWritesToTheDutTheAValueLessThanOrEqualToTheValueReadInStep2_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 1000ms\n"); @@ -51666,20 +51913,20 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { err = TestWait1000ms_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads from the DUT the the SpeedSetting attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads from the DUT the SpeedSetting attribute\n"); if (ShouldSkip("FAN.S.A0005")) { NextTest(); return; } - err = TestStep4ThReadsFromTheDutTheTheSpeedSettingAttribute_4(); + err = TestStep4ThReadsFromTheDutTheSpeedSettingAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads from the DUT the the SpeedCurrent attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads from the DUT the SpeedCurrent attribute\n"); if (ShouldSkip("FAN.S.A0006")) { NextTest(); return; } - err = TestStep5ThReadsFromTheDutTheTheSpeedCurrentAttribute_5(); + err = TestStep5ThReadsFromTheDutTheSpeedCurrentAttribute_5(); break; } @@ -51761,7 +52008,7 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThWritesThWritesToTheDutTheAValueLessThanOrEqualToTheValueReadInStep2_2() + CHIP_ERROR TestStep3ThWritesToTheDutTheAValueLessThanOrEqualToTheValueReadInStep2_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51772,8 +52019,8 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { speedSettingArgument = [rSpeedMax copy]; [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument completion:^(NSError * _Nullable err) { - NSLog(@"Step 3: TH writes TH writes to the DUT the a value less than or equal to the " - @"value read in step 2 Error: %@", + NSLog(@"Step 3: TH writes to the DUT the a value less than or equal to the value " + @"read in step 2 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51792,7 +52039,7 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4ThReadsFromTheDutTheTheSpeedSettingAttribute_4() + CHIP_ERROR TestStep4ThReadsFromTheDutTheSpeedSettingAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51800,7 +52047,7 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: TH reads from the DUT the the SpeedSetting attribute Error: %@", err); + NSLog(@"Step 4: TH reads from the DUT the SpeedSetting attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51820,7 +52067,7 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ThReadsFromTheDutTheTheSpeedCurrentAttribute_5() + CHIP_ERROR TestStep5ThReadsFromTheDutTheSpeedCurrentAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51828,7 +52075,7 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5: TH reads from the DUT the the SpeedCurrent attribute Error: %@", err); + NSLog(@"Step 5: TH reads from the DUT the SpeedCurrent attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53870,11 +54117,11 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { } }; -class Test_TC_ICDM_1_1 : public TestCommandBridge { +class Test_TC_GRPKEY_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ICDM_1_1() - : TestCommandBridge("Test_TC_ICDM_1_1") + Test_TC_GRPKEY_1_1() + : TestCommandBridge("Test_TC_GRPKEY_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -53884,7 +54131,7 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ICDM_1_1() {} + ~Test_TC_GRPKEY_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -53892,11 +54139,11 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ICDM_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_GRPKEY_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ICDM_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GRPKEY_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -53913,103 +54160,561 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); + err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip("ICDM.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads the FeatureMap from DUT\n"); + if (ShouldSkip(" !GRPKEY.S.F00 ")) { NextTest(); return; } - err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); + err = TestStep3aThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !ICDM.S.F00 ")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestStep3ReadTheGlobalAttributeFeatureMap_3(); + err = TestStep3bGivenGrpkeysf00csEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_4(); + err = TestStep4aThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip(" !PICS_EVENT_LIST_ENABLED ")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_5(); + err = TestStep4aThReadsAttributeListFromDut_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 4b: Read the optional attribute(RegisteredClients) in AttributeList\n"); - if (ShouldSkip("ICDM.S.A0003")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 4b: The list SHALL NOT contain any additional values in the standard or scoped range: " + "(0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 3.TThe list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), " + "where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_6(); + err = TestStep4bTheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TTheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4c: Read the optional attribute(IcdCounter) in AttributeList\n"); - if (ShouldSkip("ICDM.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5a: TH1 reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_7(); - break; + NextTest(); + return; case 8: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList\n"); - if (ShouldSkip("ICDM.S.A0005")) { + " ***** Test Step 8 : Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_8(); + err = TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6a: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6aThReadsAcceptedCommandListFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " + "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " + "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " + "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " + "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - NextTest(); - return; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_10(); + err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); break; case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 6b: Read the optional command (StayActiveRequest) in AttributeList\n"); - if (ShouldSkip("ICDM.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestStep6bReadTheOptionalCommandStayActiveRequestInAttributeList_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7a: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7aThReadsGeneratedCommandListFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip(" !ICDM.S.F00 ")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("ICDM.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " + "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " + "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " + "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); + err = TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); + 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; + } + + // 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 = 13; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3aThReadsTheFeatureMapFromDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenGrpkeysf00csEnsureFeaturemapHasTheCorrectBitSet_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep4bTheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TTheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6a: TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep7aThReadsGeneratedCommandListFromDut_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7a: TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_ICDM_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ICDM_1_1() + : TestCommandBridge("Test_TC_ICDM_1_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_ICDM_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ICDM_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ICDM_1_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 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); + err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); + if (ShouldSkip("ICDM.S.F00")) { + NextTest(); + return; + } + err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !ICDM.S.F00 ")) { + NextTest(); + return; + } + err = TestStep3ReadTheGlobalAttributeFeatureMap_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_5(); + break; + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : Step 4b: Read the optional attribute(RegisteredClients) in AttributeList\n"); + if (ShouldSkip("ICDM.S.A0003")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4c: Read the optional attribute(IcdCounter) in AttributeList\n"); + if (ShouldSkip("ICDM.S.A0004")) { + NextTest(); + return; + } + err = TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList\n"); + if (ShouldSkip("ICDM.S.A0005")) { + NextTest(); + return; + } + err = TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 6b: Read the optional command (StayActiveRequest) in AttributeList\n"); + if (ShouldSkip("ICDM.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestStep6bReadTheOptionalCommandStayActiveRequestInAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip(" !ICDM.S.F00 ")) { + NextTest(); + return; + } + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("ICDM.S.F00")) { + NextTest(); + return; + } + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); break; } @@ -93324,6 +94029,478 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { } }; +class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_RVCOPSTATE_1_1() + : TestCommandBridge("Test_TC_RVCOPSTATE_1_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_RVCOPSTATE_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RVCOPSTATE_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RVCOPSTATE_1_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 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision attribute from the DUT\n"); + err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap attribute from the DUT\n"); + err = TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList " + "from the DUT\n"); + if (ShouldSkip("RVCOPSTATE.S.A0002")) { + NextTest(); + return; + } + err = TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5a: TH reads from the DUT the EventList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01")) { + NextTest(); + return; + } + NextTest(); + return; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6a: Read the optional command(Pause) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestStep6aReadTheOptionalCommandPauseInAcceptedCommandList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6b: Read the optional command(Stop) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6c: Read the optional command(Start) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestStep6cReadTheOptionalCommandStartInAcceptedCommandList_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6d: Read the optional command(Resume) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C03.Rsp || RVCOPSTATE.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip(" RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp || RVCOPSTATE.S.C03.Rsp ")) { + NextTest(); + return; + } + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); + 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; + } + + // 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 = 13; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads the FeatureMap attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog( + @"Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6aReadTheOptionalCommandPauseInAcceptedCommandList_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6a: Read the optional command(Pause) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6b: Read the optional command(Stop) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6cReadTheOptionalCommandStartInAcceptedCommandList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6c: Read the optional command(Start) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6d: Read the optional command(Resume) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_TMP_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -93968,6 +95145,10 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: @@ -94033,153 +95214,444 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { err = TestStep3gGivenTstatsf05autoEnsureFeaturemapHasTheCorrectBitSet_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given TSTAT.S.F06(LTNE) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TSTAT.S.F06")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_9(); + err = TestStep3hGivenTstatsf06ltneEnsureFeaturemapHasTheCorrectBitSet_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_10(); break; case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_11(); + break; + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); + " ***** Test Step 12 : Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_11(); + err = TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); + " ***** Test Step 13 : Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_12(); + err = TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_13(); break; - case 13: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); + " ***** Test Step 14 : Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_13(); + err = TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_14(); break; - case 14: + case 15: ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 15 : Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_14(); + err = TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_15(); break; - case 15: + case 16: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 16 : Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_15(); + err = TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_16(); break; - case 16: + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); + " ***** Test Step 17 : Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_16(); + err = TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); + " ***** Test Step 18 : Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_17(); + err = TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); + " ***** Test Step 19 : Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F04")) { NextTest(); return; } - err = TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_18(); + err = TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 20 : Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 5a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5aReadTheGlobalAttributeAcceptedCommandList_20(); + err = TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_20(); break; case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Step 4k: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0001")) { + NextTest(); + return; + } + err = TestStep4kReadTheOptionalAttributeInAttributeList_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Step 4l: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0009")) { + NextTest(); + return; + } + err = TestStep4lReadTheOptionalAttributeInAttributeList_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 4m: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0010")) { + NextTest(); + return; + } + err = TestStep4mReadTheOptionalAttributeInAttributeList_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Step 4n: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A001a")) { + NextTest(); + return; + } + err = TestStep4nReadTheOptionalAttributeInAttributeList_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4o: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A001d")) { + NextTest(); + return; + } + err = TestStep4oReadTheOptionalAttributeInAttributeList_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 4p: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0023")) { + NextTest(); + return; + } + err = TestStep4pReadTheOptionalAttributeInAttributeList_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 4q: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0024")) { + NextTest(); + return; + } + err = TestStep4qReadTheOptionalAttributeInAttributeList_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 4r: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0025")) { + NextTest(); + return; + } + err = TestStep4rReadTheOptionalAttributeInAttributeList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 4s: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0029")) { + NextTest(); + return; + } + err = TestStep4sReadTheOptionalAttributeInAttributeList_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Step 4t: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0030")) { + NextTest(); + return; + } + err = TestStep4tReadTheOptionalAttributeInAttributeList_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Step 4u: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0031")) { + NextTest(); + return; + } + err = TestStep4uReadTheOptionalAttributeInAttributeList_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Step 4x: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0032")) { + NextTest(); + return; + } + err = TestStep4xReadTheOptionalAttributeInAttributeList_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Step 5y: Read the optional attribute: AttributeList\n"); + if (ShouldSkip("TSTAT.S.A003a")) { + NextTest(); + return; + } + err = TestStep5yReadTheOptionalAttributeAttributeList_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Step 4z: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0040")) { + NextTest(); + return; + } + err = TestStep4zReadTheOptionalAttributeInAttributeList_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Step 4A: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0041")) { + NextTest(); + return; + } + err = TestStep4aReadTheOptionalAttributeInAttributeList_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Step 4B: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0042")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeInAttributeList_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Step 4C: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0043")) { + NextTest(); + return; + } + err = TestStep4cReadTheOptionalAttributeInAttributeList_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Step 5D: Read the optional attribute: AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0044")) { + NextTest(); + return; + } + err = TestStep5dReadTheOptionalAttributeAttributeList_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Step 4E: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0045")) { + NextTest(); + return; + } + err = TestStep4eReadTheOptionalAttributeInAttributeList_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Step 4F: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0046")) { + NextTest(); + return; + } + err = TestStep4fReadTheOptionalAttributeInAttributeList_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : Step 5G: Read the optional attribute: AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0047")) { + NextTest(); + return; + } + err = TestStep5gReadTheOptionalAttributeAttributeList_41(); + break; + case 42: + ChipLogProgress(chipTool, + " ***** Test Step 42 : Step 4H: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0003")) { + NextTest(); + return; + } + err = TestStep4hReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_42(); + break; + case 43: + ChipLogProgress(chipTool, + " ***** Test Step 43 : Step 4I: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0004")) { + NextTest(); + return; + } + err = TestStep4iReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_43(); + break; + case 44: + ChipLogProgress(chipTool, + " ***** Test Step 44 : Step 4J: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0008")) { + NextTest(); + return; + } + err = TestStep4jReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_44(); + break; + case 45: + ChipLogProgress(chipTool, + " ***** Test Step 45 : Step 4K: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { + NextTest(); + return; + } + err = TestStep4kReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_45(); + break; + case 46: + ChipLogProgress(chipTool, + " ***** Test Step 46 : Step 4L: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { + NextTest(); + return; + } + err = TestStep4lReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_46(); + break; + case 47: + ChipLogProgress(chipTool, + " ***** Test Step 47 : Step 4M: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0005")) { + NextTest(); + return; + } + err = TestStep4mReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_47(); + break; + case 48: + ChipLogProgress(chipTool, + " ***** Test Step 48 : Step 4N: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0007")) { + NextTest(); + return; + } + err = TestStep4nReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_48(); + break; + case 49: + ChipLogProgress(chipTool, + " ***** Test Step 49 : Step 4O: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0007")) { + NextTest(); + return; + } + err = TestStep4oReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_49(); + break; + case 50: + ChipLogProgress(chipTool, + " ***** Test Step 50 : Step 4P: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { + NextTest(); + return; + } + err = TestStep4pReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_50(); + break; + case 51: + ChipLogProgress(chipTool, + " ***** Test Step 51 : Step 4Q: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { + NextTest(); + return; + } + err = TestStep4qReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_51(); + break; + case 52: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList\n"); + " ***** Test Step 52 : Step 4R: Read the Feature dependent(TSTAT.S.F05(AUTO)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F05 && TSTAT.S.A001e")) { + NextTest(); + return; + } + err = TestStep4rReadTheFeatureDependentTSTATSF05AUTOOptionalAttributeInAttributeList_52(); + break; + case 53: + ChipLogProgress(chipTool, + " ***** Test Step 53 : Step 5a: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestStep5bReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_21(); + err = TestStep5aReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_53(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Step 6a: Read the global attribute: GeneratedCommandList\n"); + case 54: + ChipLogProgress(chipTool, " ***** Test Step 54 : Step 5b: Read the optional attribute: AcceptedCommandList\n"); + if (ShouldSkip("TSTAT.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestStep5bReadTheOptionalAttributeAcceptedCommandList_54(); + break; + case 55: + ChipLogProgress(chipTool, " ***** Test Step 55 : Step 6a: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip(" !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp ")) { NextTest(); return; } - err = TestStep6aReadTheGlobalAttributeGeneratedCommandList_22(); + err = TestStep6aReadTheGlobalAttributeGeneratedCommandList_55(); break; - case 23: + case 56: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList\n"); + " ***** Test Step 56 : Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_23(); + err = TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_56(); break; - case 24: + case 57: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList\n"); + " ***** Test Step 57 : Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList\n"); if (ShouldSkip("TSTAT.S.C04.Rsp")) { NextTest(); return; } - err = TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_24(); + err = TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_57(); break; - case 25: + case 58: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty " + " ***** Test Step 58 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty " "but it can contain manufacturer specific event IDs.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_25(); + err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_58(); break; } @@ -94270,6 +95742,105 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 53: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 54: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 55: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 56: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 57: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 58: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -94283,7 +95854,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 26; + const uint16_t mTestCount = 59; chip::Optional mNodeId; chip::Optional mCluster; @@ -94301,25 +95872,11 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMap_2() @@ -94460,7 +96017,26 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_9() + CHIP_ERROR TestStep3hGivenTstatsf06ltneEnsureFeaturemapHasTheCorrectBitSet_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3h: Given TSTAT.S.F06(LTNE) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94489,7 +96065,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_10() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94517,7 +96093,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_11() + CHIP_ERROR TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94538,7 +96114,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_12() + CHIP_ERROR TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94559,7 +96135,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_13() + CHIP_ERROR TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94580,7 +96156,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_14() + CHIP_ERROR TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94602,7 +96178,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_15() + CHIP_ERROR TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94624,7 +96200,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_16() + CHIP_ERROR TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94647,7 +96223,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_17() + CHIP_ERROR TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94670,7 +96246,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_18() + CHIP_ERROR TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94693,7 +96269,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_19() + CHIP_ERROR TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94717,20 +96293,671 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aReadTheGlobalAttributeAcceptedCommandList_20() + CHIP_ERROR TestStep4kReadTheOptionalAttributeInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5a: Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4k: Read the optional attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4lReadTheOptionalAttributeInAttributeList_22() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4l: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4mReadTheOptionalAttributeInAttributeList_23() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4m: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4nReadTheOptionalAttributeInAttributeList_24() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4n: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4oReadTheOptionalAttributeInAttributeList_25() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4o: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 29UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4pReadTheOptionalAttributeInAttributeList_26() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4p: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 35UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4qReadTheOptionalAttributeInAttributeList_27() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4q: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 36UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4rReadTheOptionalAttributeInAttributeList_28() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4r: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 37UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4sReadTheOptionalAttributeInAttributeList_29() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4s: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 41UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4tReadTheOptionalAttributeInAttributeList_30() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4t: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 48UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4uReadTheOptionalAttributeInAttributeList_31() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4u: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 49UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4xReadTheOptionalAttributeInAttributeList_32() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4x: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 50UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5yReadTheOptionalAttributeAttributeList_33() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5y: Read the optional attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 58UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4zReadTheOptionalAttributeInAttributeList_34() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4z: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 64UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aReadTheOptionalAttributeInAttributeList_35() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4A: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeInAttributeList_36() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4B: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 66UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4cReadTheOptionalAttributeInAttributeList_37() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4C: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 67UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5dReadTheOptionalAttributeAttributeList_38() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5D: Read the optional attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 68UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4eReadTheOptionalAttributeInAttributeList_39() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4E: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 69UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4fReadTheOptionalAttributeInAttributeList_40() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4F: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 70UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5gReadTheOptionalAttributeAttributeList_41() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5G: Read the optional attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 71UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4hReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_42() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4H: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4iReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_43() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4I: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4jReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_44() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4J: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4kReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_45() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4K: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4lReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_46() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4L: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4mReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_47() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4M: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4nReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_48() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4N: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4oReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_49() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4O: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4pReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_50() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4P: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4qReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_51() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4Q: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 24UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4rReadTheFeatureDependentTSTATSF05AUTOOptionalAttributeInAttributeList_52() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4R: Read the Feature dependent(TSTAT.S.F05(AUTO)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 30UL)); NextTest(); }]; @@ -94738,7 +96965,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5bReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_21() + CHIP_ERROR TestStep5aReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_53() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94746,7 +96973,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList Error: %@", err); + NSLog(@"Step 5a: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94762,7 +96989,28 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeGeneratedCommandList_22() + CHIP_ERROR TestStep5bReadTheOptionalAttributeAcceptedCommandList_54() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5b: Read the optional attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6aReadTheGlobalAttributeGeneratedCommandList_55() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94786,7 +97034,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_23() + CHIP_ERROR TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_56() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94807,7 +97055,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_24() + CHIP_ERROR TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_57() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94829,7 +97077,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_25() + TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_58() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -165908,12 +168156,12 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { err = TestStep9ThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TStep 10a: H reads the WrongCodeEntryLimit attribute from the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 10a: H reads the WrongCodeEntryLimit attribute from the DUT\n"); if (ShouldSkip("DRLK.S.A0030")) { NextTest(); return; } - err = TestTStep10aHReadsTheWrongCodeEntryLimitAttributeFromTheDut_16(); + err = TestStep10aHReadsTheWrongCodeEntryLimitAttributeFromTheDut_16(); break; case 17: ChipLogProgress(chipTool, @@ -166590,7 +168838,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTStep10aHReadsTheWrongCodeEntryLimitAttributeFromTheDut_16() + CHIP_ERROR TestStep10aHReadsTheWrongCodeEntryLimitAttributeFromTheDut_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -166598,7 +168846,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TStep 10a: H reads the WrongCodeEntryLimit attribute from the DUT Error: %@", err); + NSLog(@"Step 10a: H reads the WrongCodeEntryLimit attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -176380,37 +178628,56 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList\n"); - if (ShouldSkip("ACFREMON.S.A0002")) { + " ***** Test Step 9 : Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0003) in AttributeList\n"); + if (ShouldSkip("ACFREMON.S.A0003")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0002InAttributeList_9(); + err = TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0003InAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5: TH reads EventList attribute from DUT\n"); + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 4d: Read the optional attribute LastChangedTime (ACFREMON.S.A0004) in AttributeList\n"); + if (ShouldSkip("ACFREMON.S.A0004")) { + NextTest(); + return; + } + err = TestStep4dReadTheOptionalAttributeLastChangedTimeAcfremonsa0004InAttributeList_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 4e: Read the optional attribute ReplacementProductList (ACFREMON.S.F02) in " + "AttributeList\n"); + if (ShouldSkip("ACFREMON.S.F02")) { + NextTest(); + return; + } + err = TestStep4eReadTheOptionalAttributeReplacementProductListAcfremonsf02InAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5: TH reads EventList attribute from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_11(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_13(); break; - case 12: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 14 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); if (ShouldSkip("ACFREMON.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12(); + err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_15(); break; } @@ -176465,6 +178732,12 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -176478,7 +178751,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -176691,7 +178964,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0002InAttributeList_9() + CHIP_ERROR TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0003InAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176701,7 +178974,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList Error: %@", err); + NSLog(@"Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0003) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -176714,7 +178987,53 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_11() + CHIP_ERROR TestStep4dReadTheOptionalAttributeLastChangedTimeAcfremonsa0004InAttributeList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4d: Read the optional attribute LastChangedTime (ACFREMON.S.A0004) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4eReadTheOptionalAttributeReplacementProductListAcfremonsf02InAttributeList_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4e: Read the optional attribute ReplacementProductList (ACFREMON.S.F02) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176735,7 +179054,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12() + CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176758,7 +179077,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177175,47 +179494,67 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList\n"); + " ***** Test Step 8 : Step 4b: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList\n"); if (ShouldSkip("HEPAFREMON.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_8(); + err = TestStep4bReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_8(); break; case 9: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 4b: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in " + " ***** Test Step 9 : Step 4c: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0003) in " "AttributeList\n"); - if (ShouldSkip("HEPAFREMON.S.A0002")) { + if (ShouldSkip("HEPAFREMON.S.A0003")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0002InAttributeList_9(); + err = TestStep4cReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0003InAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5: TH reads EventList attribute from DUT\n"); + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 4d: Read the optional attribute LastChangedTime (HEPAFREMON.S.A0004) in " + "AttributeList\n"); + if (ShouldSkip("HEPAFREMON.S.A0004")) { + NextTest(); + return; + } + err = TestStep4dReadTheOptionalAttributeLastChangedTimeHepafremonsa0004InAttributeList_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 4e: Read the optional attribute ReplacementProductList (HEPAFREMON.S.F02) in " + "AttributeList\n"); + if (ShouldSkip("HEPAFREMON.S.F02")) { + NextTest(); + return; + } + err = TestStep4eReadTheOptionalAttributeReplacementProductListHepafremonsf02InAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5: TH reads EventList attribute from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_11(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_13(); break; - case 12: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 14 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); if (ShouldSkip("HEPAFREMON.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12(); + err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_15(); break; } @@ -177270,6 +179609,12 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -177283,7 +179628,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -177471,7 +179816,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_8() + CHIP_ERROR TestStep4bReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177481,7 +179826,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList Error: %@", err); + NSLog(@"Step 4b: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -177496,7 +179841,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0002InAttributeList_9() + CHIP_ERROR TestStep4cReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0003InAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177506,7 +179851,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in AttributeList Error: %@", err); + NSLog(@"Step 4c: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0003) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -177519,7 +179864,54 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_11() + CHIP_ERROR TestStep4dReadTheOptionalAttributeLastChangedTimeHepafremonsa0004InAttributeList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4d: Read the optional attribute LastChangedTime (HEPAFREMON.S.A0004) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4eReadTheOptionalAttributeReplacementProductListHepafremonsf02InAttributeList_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog( + @"Step 4e: Read the optional attribute ReplacementProductList (HEPAFREMON.S.F02) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177540,7 +179932,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12() + CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177563,7 +179955,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177965,6 +180357,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -178050,6 +180443,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index c7509b6750793a..85b6ca3fc694ae 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -23,10 +23,10 @@ #include -class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand { public: - Test_TC_ACT_3_1_SimulatedSuite() : TestCommand("Test_TC_ACT_3_1_Simulated", 6) + Test_TC_WNCV_5_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_5_1_Simulated", 5) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -34,7 +34,7 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_5_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -54,18 +54,6 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -82,64 +70,39 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: ActionList"); - VerifyOrDo(!ShouldSkip("ACT.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::ActionList::Id); + LogStep(0, "DUT reads the FeatureMap attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id); } case 1: { - LogStep(1, "Read attribute: EndpointLists"); - VerifyOrDo(!ShouldSkip("ACT.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::EndpointLists::Id); + LogStep(1, "DUT reads the Type attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Type::Id); } case 2: { - LogStep(2, "Read attribute: SetupURL"); - VerifyOrDo(!ShouldSkip("ACT.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::SetupURL::Id); + LogStep(2, "DUT reads the EndProductType attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id); } case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(3, "DUT reads the Mode attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Mode::Id); } case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACT.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACT.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads the ConfigStatus attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand +class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand { public: - Test_TC_BOOL_3_1_SimulatedSuite() : TestCommand("Test_TC_BOOL_3_1_Simulated", 4) + Test_TC_OCC_2_4_SimulatedSuite() : TestCommand("Test_TC_OCC_2_4_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -147,7 +110,7 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BOOL_3_1_SimulatedSuite() {} + ~Test_TC_OCC_2_4_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -167,18 +130,6 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -195,54 +146,24 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: StateValue"); - VerifyOrDo(!ShouldSkip("BOOL.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), BooleanState::Id, BooleanState::Attributes::StateValue::Id); + LogStep(0, "TH reads OccupancySensorType attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); } case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand +class Test_TC_DGSW_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DESC_2_2_SimulatedSuite() : TestCommand("Test_TC_DESC_2_2_Simulated", 5) + Test_TC_DGSW_3_2_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -250,7 +171,7 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_2_SimulatedSuite() {} + ~Test_TC_DGSW_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -270,10 +191,6 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -290,44 +207,19 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "DUT reads DeviceTypeList from TH."); - VerifyOrDo(!ShouldSkip("DESC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::DeviceTypeList::Id); - } - case 1: { - LogStep(1, "DUT reads ServerList from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ServerList::Id); - } - case 2: { - LogStep(2, "DUT reads ClientList attribute from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClientList::Id); - } - case 3: { - LogStep(3, "DUT reads PartsList attribute from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::PartsList::Id); - } - case 4: { - LogStep(4, "DUT reads TagList from the TH"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(0, "DUT sends ResetWatermarks to TH"); + VerifyOrDo(!ShouldSkip("DGSW.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Commands::ResetWatermarks::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand +class Test_TC_DGETH_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DGETH_3_1_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_1_Simulated", 9) + Test_TC_DGETH_3_2_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -335,7 +227,7 @@ class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_1_SimulatedSuite() {} + ~Test_TC_DGETH_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -371,68 +263,20 @@ class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: PHYRate"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id); - } - case 1: { - LogStep(1, "Read attribute: FullDuplex"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::FullDuplex::Id); - } - case 2: { - LogStep(2, "Read attribute: PacketRxCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id); - } - case 3: { - LogStep(3, "Read attribute: PacketTxCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id); - } - case 4: { - LogStep(4, "Read attribute: TxErrCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TxErrCount::Id); - } - case 5: { - LogStep(5, "Read attribute: CollisionCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CollisionCount::Id); - } - case 6: { - LogStep(6, "Read attribute: OverrunCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::OverrunCount::Id); - } - case 7: { - LogStep(7, "Read attribute: CarrierDetect"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id); - } - case 8: { - LogStep(8, "Read attribute: TimeSinceReset"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id); + LogStep(0, "DUT sends ResetCounts to TH"); + VerifyOrDo(!ShouldSkip("DGETH.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Commands::ResetCounts::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand +class Test_TC_DGWIFI_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DGSW_3_1_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_1_Simulated", 4) + Test_TC_DGWIFI_3_2_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -440,7 +284,7 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGSW_3_1_SimulatedSuite() {} + ~Test_TC_DGWIFI_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -476,35 +320,19 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: ThreadMetrics"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::ThreadMetrics::Id); - } - case 1: { - LogStep(1, "Read attribute: CurrentHeapFree"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id); - } - case 2: { - LogStep(2, "Read attribute: CurrentHeapUsed"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id); - } - case 3: { - LogStep(3, "Read attribute: CurrentHeapHighWatermark"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id); + LogStep(0, "DUT sends ResetCounts command to TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Commands::ResetCounts::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_6_1_SimulatedSuite : public TestCommand { public: - Test_TC_DGWIFI_3_1_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_1_Simulated", 13) + Test_TC_WNCV_6_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_6_1_Simulated", 3) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -512,7 +340,7 @@ class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGWIFI_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_6_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -548,85 +376,29 @@ class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: BSSID"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Bssid::Id); + LogStep(0, "DUT sends UpOrOpen command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id); } case 1: { - LogStep(1, "Read attribute: SecurityType"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::SecurityType::Id); + LogStep(1, "DUT sends DownOrClose command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id); } case 2: { - LogStep(2, "Read attribute: WiFiVersion"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id); - } - case 3: { - LogStep(3, "Read attribute: ChannelNumber"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id); - } - case 4: { - LogStep(4, "Read attribute: RSSI"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Rssi::Id); - } - case 5: { - LogStep(5, "Read attribute: BeaconLostCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id); - } - case 6: { - LogStep(6, "Read attribute: BeaconRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id); - } - case 7: { - LogStep(7, "Read attribute: PacketMulticastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id); - } - case 8: { - LogStep(8, "Read attribute: PacketMulticastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id); - } - case 9: { - LogStep(9, "Read attribute: PacketUnicastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id); - } - case 10: { - LogStep(10, "Read attribute: PacketUnicastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id); - } - case 11: { - LogStep(11, "Read attribute: CurrentMaxRate"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id); - } - case 12: { - LogStep(12, "Read attribute: OverrunCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::OverrunCount::Id); + LogStep(2, "DUT sends StopMotion command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_7_1_SimulatedSuite : public TestCommand { public: - Test_TC_FLW_3_1_SimulatedSuite() : TestCommand("Test_TC_FLW_3_1_Simulated", 7) + Test_TC_WNCV_7_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_7_1_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -634,7 +406,7 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_FLW_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_7_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -654,18 +426,6 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -682,83 +442,40 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "If (PA_LF & LF) DUT sends GoToLiftPercentage command with 50% to DUT"); + VerifyOrDo(!ShouldSkip("WNCV.C.C05.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("FLW.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && FLW.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, "If (PA_TL & TL) DUT sends GoToTiltPercentage command with 50% to DUT"); + VerifyOrDo(!ShouldSkip("WNCV.C.C08.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_G_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_3_4_SimulatedSuite : public TestCommand { public: - Test_TC_G_3_1_SimulatedSuite() : TestCommand("Test_TC_G_3_1_Simulated", 1) + Test_TC_CC_3_4_SimulatedSuite() : TestCommand("Test_TC_CC_3_4_Simulated", 16) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_G_3_1_SimulatedSuite() {} + ~Test_TC_CC_3_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -772,71 +489,19 @@ class Test_TC_G_3_1_SimulatedSuite : public TestCommand 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads NameSupport attribute value from TH"); - VerifyOrDo(!ShouldSkip("G.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_I_3_1_SimulatedSuite() : TestCommand("Test_TC_I_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_3_1_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -856,83 +521,121 @@ class Test_TC_I_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: identifytype"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyType::Id); + LogStep(1, "DUT sends MoveToHue command to TH an Hue with _TransitionTime 300"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id); } case 2: { - LogStep(2, "write attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(2, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 3: { - LogStep(3, "Readback attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "DUT sends MoveHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id); } case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 7: { + LogStep(7, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 9: { + LogStep(9, "DUT sends StepHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id); + } + case 10: { + LogStep(10, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 11: { + LogStep(11, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 13: { + LogStep(13, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); + } + case 14: { + LogStep(14, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 15: { + LogStep(15, "Over TransitionTime, DUT reads CurrentHue attribute from TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_4_5_SimulatedSuite : public TestCommand { public: - Test_TC_PRS_3_1_SimulatedSuite() : TestCommand("Test_TC_PRS_3_1_Simulated", 12) + Test_TC_CC_4_5_SimulatedSuite() : TestCommand("Test_TC_CC_4_5_Simulated", 22) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_PRS_3_1_SimulatedSuite() {} + ~Test_TC_CC_4_5_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -946,11 +649,11 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 9: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -958,6 +661,14 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -974,3183 +685,154 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinMeasuredValue::Id); + LogStep(1, "DUT sends MoveToSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id); } case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxMeasuredValue::Id); + LogStep(2, "DUT reads CurrentSaturation attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 3: { - LogStep(3, "Read attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Tolerance::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Read attribute: ScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledValue::Id); + LogStep(4, "DUT reads CurrentSaturation attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 5: { - LogStep(5, "Read attribute: MinScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinScaledValue::Id); + LogStep(5, "DUT sends MoveSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id); } case 6: { - LogStep(6, "Read attribute: MaxScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxScaledValue::Id); + LogStep(6, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 7: { - LogStep(7, "Read attribute: ScaledTolerance"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledTolerance::Id); + LogStep(7, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { - LogStep(8, "Read attribute: Scale"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Scale::Id); + LogStep(8, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 9: { - LogStep(9, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(9, "DUT sends StepSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id); } case 10: { - LogStep(10, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(10, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 11: { - LogStep(11, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_PSCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_PSCFG_3_1_Simulated", 4) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PSCFG_3_1_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: Sources"); - VerifyOrDo(!ShouldSkip("PSCFG.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PowerSourceConfiguration::Id, PowerSourceConfiguration::Attributes::Sources::Id); - } - case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RH_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_RH_3_1_SimulatedSuite() : TestCommand("Test_TC_RH_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RH_3_1_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute MeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute Tolerance"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_SWTCH_3_1_SimulatedSuite() : TestCommand("Test_TC_SWTCH_3_1_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_1_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Read NumberOfPositions attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::NumberOfPositions::Id); - } - case 1: { - LogStep(1, "Read CurrentPosition attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::CurrentPosition::Id); - } - case 2: { - LogStep(2, "Read MultiPressMax attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::MultiPressMax::Id); - } - case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && SWTCH.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_5_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_5_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_5_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads the FeatureMap attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id); - } - case 1: { - LogStep(1, "DUT reads the Type attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Type::Id); - } - case 2: { - LogStep(2, "DUT reads the EndProductType attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id); - } - case 3: { - LogStep(3, "DUT reads the Mode attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Mode::Id); - } - case 4: { - LogStep(4, "DUT reads the ConfigStatus attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LCFG_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_LCFG_3_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_3_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads SupportedLocales attribute from TH"); - VerifyOrDo(!ShouldSkip("LCFG.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::SupportedLocales::Id); - } - case 1: { - LogStep(1, "DUT reads ActiveLocale attribute from TH"); - VerifyOrDo(!ShouldSkip("LCFG.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::ActiveLocale::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_1_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LUNIT_1_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_1_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_1_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT read (0xFFFD) ClusterRevision attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::ClusterRevision::Id); - } - case 1: { - LogStep(1, "DUT read (0xFFFC) FeatureMap attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id); - } - case 2: { - LogStep(2, "DUT read (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AttributeList::Id); - } - case 3: { - LogStep(3, "DUT read (0xFFF9) AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AcceptedCommandList::Id); - } - case 4: { - LogStep(4, "DUT read (0xFFF8) GeneratedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::GeneratedCommandList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_2_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LUNIT_2_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_2_1_Simulated", 3) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_2_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads TemperatureUnit attribute from TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - case 1: { - LogStep(1, "DUT writes 2 to TemperatureUnit attribute on TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - case 2: { - LogStep(2, "DUT reads TemperatureUnit attribute from TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OCC_2_2_SimulatedSuite() : TestCommand("Test_TC_OCC_2_2_Simulated", 12) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_2_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads from the TH the (0x0000) Occupancy attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id); - } - case 1: { - LogStep(1, "DUT reads from the TH the (0x0001) OccupancySensorType attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); - } - case 2: { - LogStep(2, "DUT reads from the TH the (0x0002) OccupancySensorTypeBitmap attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); - } - case 3: { - LogStep(3, "DUT reads from the TH the (0x0010) PIROccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id); - } - case 4: { - LogStep(4, "DUT reads from the TH the (0x0011) PIRUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id); - } - case 5: { - LogStep(5, "DUT reads from the TH the (0x0012) PIRUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id); - } - case 6: { - LogStep(6, "DUT reads from the TH the (0x0020) UltrasonicOccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id); - } - case 7: { - LogStep(7, "DUT reads from the TH the (0x0021) UltrasonicUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id); - } - case 8: { - LogStep(8, "DUT reads from the TH the (0x0022) UltrasonicUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id); - } - case 9: { - LogStep(9, "DUT reads from the TH the (0x0030) PhysicalContactOccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id); - } - case 10: { - LogStep(10, "DUT reads from the TH the (0x0031) PhysicalContactUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id); - } - case 11: { - LogStep(11, "DUT reads from the TH the (0x0032) PhysicalContactUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OCC_2_4_SimulatedSuite() : TestCommand("Test_TC_OCC_2_4_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_4_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "TH reads OccupancySensorType attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); - } - case 1: { - LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_ULABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_ULABEL_3_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_3_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Read attribute: LabelList"); - VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id); - } - case 1: { - LogStep(1, "Step 2: write attribute: LabelList"); - VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLABEL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_FLABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_FLABEL_3_1_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLABEL_3_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads LabelList from the TH"); - VerifyOrDo(!ShouldSkip("FLABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LTIME_1_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LTIME_1_1_SimulatedSuite() : TestCommand("Test_TC_LTIME_1_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LTIME_1_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT read (0xFFFD) ClusterRevision attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::ClusterRevision::Id); - } - case 1: { - LogStep(1, "DUT read (0xFFFC) FeatureMap attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::FeatureMap::Id); - } - case 2: { - LogStep(2, "DUT read (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id); - } - case 3: { - LogStep(3, "DUT read (0xFFF9) AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::AcceptedCommandList::Id); - } - case 4: { - LogStep(4, "DUT read (0xFFF8) GeneratedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::GeneratedCommandList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ILL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_ILL_3_1_SimulatedSuite() : TestCommand("Test_TC_ILL_3_1_Simulated", 8) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ILL_3_1_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, "Read attribute: LightSensorType"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::LightSensorType::Id); - } - case 5: { - LogStep(5, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGSW_3_2_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_3_2_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetWatermarks to TH"); - VerifyOrDo(!ShouldSkip("DGSW.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Commands::ResetWatermarks::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGETH_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGETH_3_2_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGETH_3_2_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts to TH"); - VerifyOrDo(!ShouldSkip("DGETH.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGWIFI_3_2_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_3_2_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts command to TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_6_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_6_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_6_1_Simulated", 3) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_6_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends UpOrOpen command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id); - } - case 1: { - LogStep(1, "DUT sends DownOrClose command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id); - } - case 2: { - LogStep(2, "DUT sends StopMotion command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_7_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_7_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_7_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_7_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "If (PA_LF & LF) DUT sends GoToLiftPercentage command with 50% to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.C.C05.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id); - } - case 1: { - LogStep(1, "If (PA_TL & TL) DUT sends GoToTiltPercentage command with 50% to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.C.C08.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_3_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_3_4_SimulatedSuite() : TestCommand("Test_TC_CC_3_4_Simulated", 16) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_3_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mConfigTransitionTime; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToHue command to TH an Hue with _TransitionTime 300"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 5: { - LogStep(5, "DUT sends MoveHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 9: { - LogStep(9, "DUT sends StepHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id); - } - case 10: { - LogStep(10, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 13: { - LogStep(13, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 14: { - LogStep(14, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Over TransitionTime, DUT reads CurrentHue attribute from TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_4_5_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_4_5_SimulatedSuite() : TestCommand("Test_TC_CC_4_5_Simulated", 22) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_4_5_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mConfigTransitionTime; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentSaturation attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads CurrentSaturation attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 5: { - LogStep(5, "DUT sends MoveSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 9: { - LogStep(9, "DUT sends StepSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id); - } - case 10: { - LogStep(10, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 13: { - LogStep(13, "DUT sends MoveToHueAndSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id); - } - case 14: { - LogStep(14, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Over TransitionTime, DUT reads CurrentSaturation attribute from TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_5_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_5_4_SimulatedSuite() : TestCommand("Test_TC_CC_5_4_Simulated", 25) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_5_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 3: { - LogStep(3, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 4: { - LogStep(4, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 7: { - LogStep(7, "DUT sends MoveColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id); - } - case 8: { - LogStep(8, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 9: { - LogStep(9, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 10: { - LogStep(10, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 12: { - LogStep(12, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 13: { - LogStep(13, "DUT sends StepColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id); - } - case 14: { - LogStep(14, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 21: { - LogStep(21, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 22: { - LogStep(22, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 24: { - LogStep( - 24, - "DUT reads CurrentY attribute from ConfiguredTime: type: int16u defaultValue: 30000TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_6_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_6_4_SimulatedSuite() : TestCommand("Test_TC_CC_6_4_Simulated", 18) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_6_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, - "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " - "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " - "attribute ColorTempPhysicalMinMireds from TH"); - VerifyOrDo(!ShouldSkip("CC.C.A400b && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); - } - case 2: { - LogStep(2, - "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " - "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " - "attribute ColorTempPhysicalMaxMireds from TH"); - VerifyOrDo(!ShouldSkip("CC.C.A400c && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); - } - case 3: { - LogStep(3, "DUT sends MoveToColorTemperature command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id); - } - case 4: { - LogStep(4, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 5: { - LogStep(5, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 7: { - LogStep(7, "DUT sends MoveColorTemperatureMireds command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id); - } - case 8: { - LogStep(8, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 9: { - LogStep(9, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 11: { - LogStep(11, "DUT sends StepColorTemperature command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id); - } - case 12: { - LogStep(12, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 13: { - LogStep(13, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 15: { - LogStep(15, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_5_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_7_5_SimulatedSuite() : TestCommand("Test_TC_CC_7_5_Simulated", 23) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_7_5_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToEnhancedHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id); - } - case 2: { - LogStep(2, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 5: { - LogStep(5, "DUT sends MoveEnhanced Hue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id); - } - case 6: { - LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 9: { - LogStep(9, "DUT sends StepEnhanced command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id); - } - case 10: { - LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 13: { - LogStep(13, "DUT sends EnhancedMoveToHueAndSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id); - } - case 14: { - LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 21: { - LogStep(21, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_9_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_9_4_SimulatedSuite() : TestCommand("Test_TC_CC_9_4_Simulated", 19) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - } - - ~Test_TC_CC_9_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mCluster; - chip::Optional mEndpoint; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends ColorLoopSet command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C44.Tx && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id); - } - case 2: { - LogStep(2, "DUT reads ColorLoopActive attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4002 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); - } - case 3: { - LogStep(3, "DUT reads ColorLoopDirection attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4003 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); - } - case 4: { - LogStep(4, "DUT reads ColorLoopTime attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4004 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); - } - case 5: { - LogStep(5, "DUT reads ColorLoopStartEnhancedHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4005 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); - } - case 6: { - LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 7: { - LogStep(7, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 9: { - LogStep(9, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 13: { - LogStep(13, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 15: { - LogStep(15, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 17: { - LogStep(17, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_2_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_2_Simulated", 17) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_2_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads TxTotalCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id); - } - case 1: { - LogStep(1, "DUT reads TxUnicastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id); - } - case 2: { - LogStep(2, "DUT reads TxBroadcastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id); - } - case 3: { - LogStep(3, "DUT reads TxAckRequestedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id); - } - case 4: { - LogStep(4, "DUT reads TxAckedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id); - } - case 5: { - LogStep(5, "DUT reads TxNoAckRequestedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id); - } - case 6: { - LogStep(6, "DUT reads TxDataCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDataCount::Id); - } - case 7: { - LogStep(7, "DUT reads TxDataPollCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id); - } - case 8: { - LogStep(8, "DUT reads TxBeaconCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id); - } - case 9: { - LogStep(9, "DUT reads TxBeaconRequestCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id); - } - case 10: { - LogStep(10, "DUT reads TxOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id); - } - case 11: { - LogStep(11, "DUT reads TxRetryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id); - } - case 12: { - LogStep(12, "DUT reads TxDirectMaxRetryExpiryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id); - } - case 13: { - LogStep(13, "DUT reads TxIndirectMaxRetryExpiryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id); - } - case 14: { - LogStep(14, "DUT reads TxErrCcaCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id); - } - case 15: { - LogStep(15, "DUT reads TxErrAbortCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id); - } - case 16: { - LogStep(16, "DUT reads TxErrBusyChannelCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_3_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_3_Simulated", 17) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_3_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads RxTotalCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id); - } - case 1: { - LogStep(1, "DUT reads RxUnicastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id); - } - case 2: { - LogStep(2, "DUT reads RxBroadcastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id); - } - case 3: { - LogStep(3, "DUT reads RxDataCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataCount::Id); - } - case 4: { - LogStep(4, "DUT reads RxDataPollCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id); - } - case 5: { - LogStep(5, "DUT reads RxBeaconCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id); - } - case 6: { - LogStep(6, "DUT reads RxBeaconRequestCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id); - } - case 7: { - LogStep(7, "DUT reads RxOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id); - } - case 8: { - LogStep(8, "DUT reads RxAddressFilteredCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id); - } - case 9: { - LogStep(9, "DUT reads RxDestAddrFilteredCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id); - } - case 10: { - LogStep(10, "DUT reads RxDuplicatedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id); - } - case 11: { - LogStep(11, "DUT reads RxErrNoFrameCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id); - } - case 12: { - LogStep(12, "DUT reads RxErrUnknownNeighborCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id); - } - case 13: { - LogStep(13, "DUT reads RxErrInvalidSrcAddrCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id); - } - case 14: { - LogStep(14, "DUT reads RxErrSecCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id); - } - case 15: { - LogStep(15, "DUT reads RxErrFcsCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id); - } - case 16: { - LogStep(16, "DUT reads RxErrOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_4_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_4_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_4_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts command to TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Commands::ResetCounts::Id); - } - case 1: { - LogStep(1, "DUT reads OverrunCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_2_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LVL_2_3_SimulatedSuite() : TestCommand("Test_TC_LVL_2_3_Simulated", 24) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_2_3_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Read mandatory attribute CurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id); - } - case 1: { - LogStep(1, "Read mandatory attribute OnLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); - } - case 2: { - LogStep(2, "Read mandatory attribute Options"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); - } - case 3: { - LogStep(3, "Read optional attribute RemainingTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::RemainingTime::Id); - } - case 4: { - LogStep(4, "Read optional attribute StartUpCurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); - } - case 5: { - LogStep(5, "Read optional attribute CurrentFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id); - } - case 6: { - LogStep(6, "Read optional attribute MinFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinFrequency::Id); - } - case 7: { - LogStep(7, "Read optional attribute MaxFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxFrequency::Id); - } - case 8: { - LogStep(8, "Read optional attribute MinLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id); - } - case 9: { - LogStep(9, "Read optional attribute MaxLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id); - } - case 10: { - LogStep(10, "Read optional attribute OnOffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); - } - case 11: { - LogStep(11, "Read optional attribute OnTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); - } - case 12: { - LogStep(12, "Read optional attribute OffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); + case 12: { + LogStep(12, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 13: { - LogStep(13, "Read optional attribute DefaultMoveRate"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); + LogStep(13, "DUT sends MoveToHueAndSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id); } case 14: { - LogStep(14, "Write mandatory attribute OnLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); + LogStep(14, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 15: { - LogStep(15, "Write mandatory attribute Options"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); + LogStep(15, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 16: { - LogStep(16, "Write optional attribute OnOffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); + LogStep(16, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "Write optional attribute OnTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); + LogStep(17, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 18: { - LogStep(18, "Write optional attribute OffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); + LogStep(18, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 19: { - LogStep(19, "Write optional attribute DefaultMoveRate"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } case 20: { - LogStep(20, "Write optional attribute StartUpCurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); - } - case 21: { - LogStep(21, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 21: { + LogStep(21, "Over TransitionTime, DUT reads CurrentSaturation attribute from TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_OO_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_5_4_SimulatedSuite : public TestCommand { public: - Test_TC_OO_3_1_SimulatedSuite() : TestCommand("Test_TC_OO_3_1_Simulated", 11) + Test_TC_CC_5_4_SimulatedSuite() : TestCommand("Test_TC_CC_5_4_Simulated", 25) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_OO_3_1_SimulatedSuite() {} + ~Test_TC_CC_5_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4164,15 +846,19 @@ class Test_TC_OO_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 8: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4192,176 +878,164 @@ class Test_TC_OO_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute OnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute GlobalSceneControl"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id); + LogStep(1, "DUT sends MoveToColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id); } case 2: { - LogStep(2, "Read attribute OnTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id); + LogStep(2, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 3: { - LogStep(3, "Read attribute OffWaitTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id); + LogStep(3, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 4: { - LogStep(4, "Read attribute StartUpOnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id); + LogStep(4, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Write attribute OnTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id); + LogStep(5, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 6: { - LogStep(6, "Write attribute OffWaitTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id); + LogStep(6, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 7: { - LogStep(7, "Write attribute StartUpOnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id); + LogStep(7, "DUT sends MoveColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id); } case 8: { - LogStep(8, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(8, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 9: { - LogStep(9, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(9, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 10: { - LogStep(10, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } + case 11: { + LogStep(11, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OO_3_2_SimulatedSuite() : TestCommand("Test_TC_OO_3_2_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_3_2_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 12: { + LogStep(12, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 13: { + LogStep(13, "DUT sends StepColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT issues an Off command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id); + case 14: { + LogStep(14, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - case 1: { - LogStep(1, "DUT issues an On command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); + case 15: { + LogStep(15, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); + } + case 16: { + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); + } + case 18: { + LogStep(18, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); + } + case 19: { + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } - case 2: { - LogStep(2, "DUT issues an Toggle command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Toggle::Id); + case 20: { + LogStep(20, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - case 3: { - LogStep(3, "DUT issues an OffWithEffect command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id); + case 21: { + LogStep(21, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } - case 4: { - LogStep(4, "DUT issues an OnWithRecallGlobalScene command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id); + case 22: { + LogStep(22, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 5: { - LogStep(5, "DUT issues an OnWithTimedOff command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id); + case 23: { + LogStep(23, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); + } + case 24: { + LogStep( + 24, + "DUT reads CurrentY attribute from ConfiguredTime: type: int16u defaultValue: 30000TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_6_4_SimulatedSuite : public TestCommand { public: - Test_TC_TSUIC_3_1_SimulatedSuite() : TestCommand("Test_TC_TSUIC_3_1_Simulated", 9) + Test_TC_CC_6_4_SimulatedSuite() : TestCommand("Test_TC_CC_6_4_Simulated", 18) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_TSUIC_3_1_SimulatedSuite() {} + ~Test_TC_CC_6_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4375,15 +1049,19 @@ class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4403,93 +1081,133 @@ class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "DUT reads TemperatureDisplayMode attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "DUT reads KeypadLockout attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id); + LogStep(1, + "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " + "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " + "attribute ColorTempPhysicalMinMireds from TH"); + VerifyOrDo(!ShouldSkip("CC.C.A400b && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); } case 2: { - LogStep(2, "DUT reads ScheduleProgrammingVisibility attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id); + LogStep(2, + "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " + "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " + "attribute ColorTempPhysicalMaxMireds from TH"); + VerifyOrDo(!ShouldSkip("CC.C.A400c && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); } case 3: { - LogStep(3, "DUT writes TemperatureDisplayMode attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id); + LogStep(3, "DUT sends MoveToColorTemperature command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id); } case 4: { - LogStep(4, "DUT writes KeypadLockout attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id); + LogStep(4, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } case 5: { - LogStep(5, "DUT writes ScheduleProgrammingVisibility attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id); + LogStep(5, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { - LogStep(6, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(6, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } case 7: { - LogStep(7, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(7, "DUT sends MoveColorTemperatureMireds command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id); } case 8: { - LogStep(8, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 9: { + LogStep(9, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 11: { + LogStep(11, "DUT sends StepColorTemperature command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id); + } + case 12: { + LogStep(12, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 13: { + LogStep(13, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 15: { + LogStep(15, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); + } + case 16: { + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_7_5_SimulatedSuite : public TestCommand { public: - Test_TC_PCC_3_1_SimulatedSuite() : TestCommand("Test_TC_PCC_3_1_Simulated", 30) + Test_TC_CC_7_5_SimulatedSuite() : TestCommand("Test_TC_CC_7_5_Simulated", 23) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_PCC_3_1_SimulatedSuite() {} + ~Test_TC_CC_7_5_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4503,15 +1221,23 @@ class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 27: + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4531,225 +1257,152 @@ class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute MaxPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxPressure::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute MaxSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxSpeed::Id); + LogStep(1, "DUT sends MoveToEnhancedHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id); } case 2: { - LogStep(2, "Read attribute MaxFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxFlow::Id); + LogStep(2, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 3: { - LogStep(3, "Read attribute EffectiveOperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Read attribute EffectiveControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id); + LogStep(4, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 5: { - LogStep(5, "Read attribute Capacity"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Capacity::Id); + LogStep(5, "DUT sends MoveEnhanced Hue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id); } case 6: { - LogStep(6, "Read attribute OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id); + LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 7: { - LogStep(7, "Read attribute MinConstPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstPressure::Id); + LogStep(7, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { - LogStep(8, "Read attribute MaxConstPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstPressure::Id); + LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 9: { - LogStep(9, "Read attribute MinCompPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinCompPressure::Id); + LogStep(9, "DUT sends StepEnhanced command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id); } case 10: { - LogStep(10, "Read attribute MaxCompPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxCompPressure::Id); + LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 11: { - LogStep(11, "Read attribute MinConstSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstSpeed::Id); + LogStep(11, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 12: { - LogStep(12, "Read attribute MaxConstSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id); + LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 13: { - LogStep(13, "Read attribute MinConstFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstFlow::Id); + LogStep(13, "DUT sends EnhancedMoveToHueAndSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id); } case 14: { - LogStep(14, "Read attribute MaxConstFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstFlow::Id); + LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 15: { - LogStep(15, "Read attribute MinConstTemp"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstTemp::Id); + LogStep(15, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 16: { - LogStep(16, "Read attribute MaxConstTemp"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstTemp::Id); + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "Read attribute PumpStatus"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::PumpStatus::Id); + LogStep(17, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 18: { - LogStep(18, "Read attribute Speed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Speed::Id); + LogStep(18, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 19: { - LogStep(19, "Read attribute LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id); + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } case 20: { - LogStep(20, "Read attribute Power"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Power::Id); + LogStep(20, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 21: { - LogStep(21, "Read attribute LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id); - } - case 22: { - LogStep(22, "Read attribute ControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id); - } - case 23: { - LogStep(23, "Write attribute LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id); - } - case 24: { - LogStep(24, "Write attribute LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id); - } - case 25: { - LogStep(25, "Write attribute OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id); - } - case 26: { - LogStep(26, "Write attribute ControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id); - } - case 27: { - LogStep(27, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 22: { + LogStep(22, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_9_4_SimulatedSuite : public TestCommand { public: - Test_TC_TMP_3_1_SimulatedSuite() : TestCommand("Test_TC_TMP_3_1_Simulated", 7) + Test_TC_CC_9_4_SimulatedSuite() : TestCommand("Test_TC_CC_9_4_Simulated", 19) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TMP_3_1_SimulatedSuite() {} + ~Test_TC_CC_9_4_SimulatedSuite() {} private: chip::Optional mNodeId; + chip::Optional mTimeout; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4763,15 +1416,27 @@ class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4791,67 +1456,126 @@ class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id); + LogStep(1, "DUT sends ColorLoopSet command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C44.Tx && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id); } case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id); + LogStep(2, "DUT reads ColorLoopActive attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4002 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); } case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::Tolerance::Id); + LogStep(3, "DUT reads ColorLoopDirection attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4003 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); } case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads ColorLoopTime attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4004 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); } case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "DUT reads ColorLoopStartEnhancedHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4005 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); } case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 7: { + LogStep(7, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 9: { + LogStep(9, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 11: { + LogStep(11, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 13: { + LogStep(13, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 15: { + LogStep(15, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 17: { + LogStep(17, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_CC_2_2_SimulatedSuite : public TestCommand +class Test_TC_DGTHREAD_3_4_SimulatedSuite : public TestCommand { public: - Test_TC_CC_2_2_SimulatedSuite() : TestCommand("Test_TC_CC_2_2_Simulated", 52) + Test_TC_DGTHREAD_3_4_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_4_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -4859,7 +1583,7 @@ class Test_TC_CC_2_2_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_2_2_SimulatedSuite() {} + ~Test_TC_DGTHREAD_3_4_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -4889,280 +1613,31 @@ class Test_TC_CC_2_2_SimulatedSuite : public TestCommand } } - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads from the TH the (0x0000) CurrentHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 1: { - LogStep(1, "DUT reads from the TH the (0x0001) CurrentSaturation attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 2: { - LogStep(2, "DUT reads from the TH the Optional (0x0002) RemainingTime attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::RemainingTime::Id); - } - case 3: { - LogStep(3, "DUT reads from the TH the (0x0003) CurrentX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 4: { - LogStep(4, "DUT reads from the TH the (0x0004) CurrentY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 5: { - LogStep(5, "DUT reads from the TH the Optional (0x0005) DriftCompensation attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::DriftCompensation::Id); - } - case 6: { - LogStep(6, "DUT reads from the TH the Optional (0x0006) CompensationText attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CompensationText::Id); - } - case 7: { - LogStep(7, "DUT reads from the TH the (0x0007) ColorTemperatureMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 8: { - LogStep(8, "DUT reads from the TH the (0x0008) ColorMode attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id); - } - case 9: { - LogStep(9, "DUT reads from the TH the (0x000f) Options attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id); - } - case 10: { - LogStep(10, "DUT reads from the TH the (0x4000) EnhancedCurrentHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "DUT reads from the TH the (0x4001) EnhancedColorMode attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id); - } - case 12: { - LogStep(12, "DUT reads from the TH the (0x4002) ColorLoopActive attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); - } - case 13: { - LogStep(13, "DUT reads from the TH the (0x4003) ColorLoopDirection attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); - } - case 14: { - LogStep(14, "DUT reads from the TH the (0x4004) ColorLoopTime attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); - } - case 15: { - LogStep(15, "DUT reads from the TH the (0x4005) ColorLoopStartEnhancedHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); - } - case 16: { - LogStep(16, "DUT reads from the TH the (0x4006) ColorLoopStoredEnhancedHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id); - } - case 17: { - LogStep(17, "DUT reads from the TH the (0x400a) ColorCapabilities attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorCapabilities::Id); - } - case 18: { - LogStep(18, "DUT reads from the TH the (0x400b) ColorTempPhysicalMinMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); - } - case 19: { - LogStep(19, "DUT reads from the TH the (0x400c) ColorTempPhysicalMaxMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); - } - case 20: { - LogStep(20, "DUT reads from the TH the (0x400d) CoupleColorTempToLevelMinMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id); - } - case 21: { - LogStep(21, "DUT reads from the TH the (0x4010) StartUpColorTemperatureMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::StartUpColorTemperatureMireds::Id); - } - case 22: { - LogStep(22, "DUT reads from the TH the (0x0010) NumberOfPrimaries attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::NumberOfPrimaries::Id); - } - case 23: { - LogStep(23, "DUT reads from the TH the (0x0011) Primary1X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1X::Id); + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "DUT sends ResetCounts command to TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Commands::ResetCounts::Id); } - case 24: { - LogStep(24, "DUT reads from the TH the (0x0012) Primary1Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Y::Id); - } - case 25: { - LogStep(25, "DUT reads from the TH the (0x0013) Primary1Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Intensity::Id); - } - case 26: { - LogStep(26, "DUT reads from the TH the (0x0015) Primary2X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2X::Id); - } - case 27: { - LogStep(27, "DUT reads from the TH the (0x0016) Primary2Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Y::Id); - } - case 28: { - LogStep(28, "DUT reads from the TH the (0x0017) Primary2Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Intensity::Id); - } - case 29: { - LogStep(29, "DUT reads from the TH the (0x0019) Primary3X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3X::Id); - } - case 30: { - LogStep(30, "DUT reads from the TH the (0x001a) Primary3Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Y::Id); - } - case 31: { - LogStep(31, "DUT reads from the TH the (0x001b) Primary3Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Intensity::Id); - } - case 32: { - LogStep(32, "DUT reads from the TH the (0x0020) Primary4X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4X::Id); - } - case 33: { - LogStep(33, "DUT reads from the TH the (0x0021) Primary4Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Y::Id); - } - case 34: { - LogStep(34, "DUT reads from the TH the (0x0022) Primary4Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Intensity::Id); - } - case 35: { - LogStep(35, "DUT reads from the TH the (0x0024) Primary5X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5X::Id); - } - case 36: { - LogStep(36, "DUT reads from the TH the (0x0025) Primary5Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Y::Id); - } - case 37: { - LogStep(37, "DUT reads from the TH the (0x0026) Primary5Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Intensity::Id); - } - case 38: { - LogStep(38, "DUT reads from the TH the (0x0028) Primary6X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6X::Id); - } - case 39: { - LogStep(39, "DUT reads from the TH the (0x0029) Primary6Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Y::Id); - } - case 40: { - LogStep(40, "DUT reads from the TH the (0x002a) Primary6Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Intensity::Id); - } - case 41: { - LogStep(41, "DUT reads from the TH the Optional (0x0030) WhitePointX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointX::Id); - } - case 42: { - LogStep(42, "DUT reads from the TH the Optional (0x0031) WhitePointY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointY::Id); - } - case 43: { - LogStep(43, "DUT reads from the TH the Optional (0x0032) ColorPointRX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRX::Id); - } - case 44: { - LogStep(44, "DUT reads from the TH the Optional (0x0033) ColorPointRY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRY::Id); - } - case 45: { - LogStep(45, "DUT reads from the TH the Optional (0x0034) ColorPointRIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRIntensity::Id); - } - case 46: { - LogStep(46, "DUT reads from the TH the Optional (0x0036) ColorPointGX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGX::Id); - } - case 47: { - LogStep(47, "DUT reads from the TH the Optional (0x0037) ColorPointGY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGY::Id); - } - case 48: { - LogStep(48, "DUT reads from the TH the Optional (0x0038) ColorPointGIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGIntensity::Id); - } - case 49: { - LogStep(49, "DUT reads from the TH the Optional (0x003a) ColorPointBX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBX::Id); - } - case 50: { - LogStep(50, "DUT reads from the TH the Optional (0x003b) ColorPointBY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBY::Id); - } - case 51: { - LogStep(51, "DUT reads from the TH the Optional (0x003c) ColorPointBIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBIntensity::Id); + case 1: { + LogStep(1, "DUT reads OverrunCount attribute value from TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand +class Test_TC_LVL_2_3_SimulatedSuite : public TestCommand { public: - Test_TC_DGTHREAD_3_1_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_1_Simulated", 30) + Test_TC_LVL_2_3_SimulatedSuite() : TestCommand("Test_TC_LVL_2_3_Simulated", 24) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -5170,7 +1645,7 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_1_SimulatedSuite() {} + ~Test_TC_LVL_2_3_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -5190,7 +1665,15 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 0: + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -5210,190 +1693,133 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); + LogStep(0, "Read mandatory attribute CurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id); } case 1: { - LogStep(1, "DUT reads Channel attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Channel::Id); + LogStep(1, "Read mandatory attribute OnLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); } case 2: { - LogStep(2, "DUT reads RoutingRole attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RoutingRole::Id); + LogStep(2, "Read mandatory attribute Options"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); } case 3: { - LogStep(3, "DUT reads NetworkName attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::NetworkName::Id); + LogStep(3, "Read optional attribute RemainingTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::RemainingTime::Id); } case 4: { - LogStep(4, "DUT reads PanId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::PanId::Id); + LogStep(4, "Read optional attribute StartUpCurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); } case 5: { - LogStep(5, "DUT reads ExtendedPanId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id); + LogStep(5, "Read optional attribute CurrentFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id); } case 6: { - LogStep(6, "DUT reads MeshLocalPrefix attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id); + LogStep(6, "Read optional attribute MinFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinFrequency::Id); } case 7: { - LogStep(7, "DUT reads OverrunCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); + LogStep(7, "Read optional attribute MaxFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxFrequency::Id); } case 8: { - LogStep(8, "DUT reads NeighborTable attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::NeighborTable::Id); + LogStep(8, "Read optional attribute MinLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id); } case 9: { - LogStep(9, "DUT reads RouteTable attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RouteTable::Id); + LogStep(9, "Read optional attribute MaxLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id); } case 10: { - LogStep(10, "DUT reads PartitionId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PartitionId::Id); + LogStep(10, "Read optional attribute OnOffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); } case 11: { - LogStep(11, "DUT reads Weighting attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Weighting::Id); + LogStep(11, "Read optional attribute OnTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); } case 12: { - LogStep(12, "DUT reads DataVersion attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::DataVersion::Id); + LogStep(12, "Read optional attribute OffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); } case 13: { - LogStep(13, "DUT reads StableDataVersion attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id); + LogStep(13, "Read optional attribute DefaultMoveRate"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); } case 14: { - LogStep(14, "DUT reads LeaderRouterId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id); + LogStep(14, "Write mandatory attribute OnLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); } case 15: { - LogStep(15, "DUT reads DetachedRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id); + LogStep(15, "Write mandatory attribute Options"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); } case 16: { - LogStep(16, "DUT reads ChildRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id); + LogStep(16, "Write optional attribute OnOffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); } case 17: { - LogStep(17, "DUT reads RouterRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id); + LogStep(17, "Write optional attribute OnTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); } case 18: { - LogStep(18, "DUT reads LeaderRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id); + LogStep(18, "Write optional attribute OffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); } case 19: { - LogStep(19, "DUT reads AttachAttemptCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id); + LogStep(19, "Write optional attribute DefaultMoveRate"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); } case 20: { - LogStep(20, "DUT reads PartitionIdChangeCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id); + LogStep(20, "Write optional attribute StartUpCurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); } case 21: { - LogStep(21, "DUT reads BetterPartitionAttachAttemptCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id); + LogStep(21, + "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " + "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " + "DUT to TH again"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 22: { - LogStep(22, "DUT reads ParentChangeCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id); + LogStep(22, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 23: { - LogStep(23, "DUT reads ActiveTimestamp attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id); - } - case 24: { - LogStep(24, "DUT reads PendingTimestamp attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id); - } - case 25: { - LogStep(25, "DUT reads Delay attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Delay::Id); - } - case 26: { - LogStep(26, "DUT reads SecurityPolicy attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id); - } - case 27: { - LogStep(27, "DUT reads ChannelPage0Mask attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id); - } - case 28: { - LogStep(28, "DUT reads OperationalDatasetComponents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id); - } - case 29: { - LogStep(29, "DUT reads ActiveNetworkFaults attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id); + LogStep(23, + "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " + "specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; } }; -class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand +class Test_TC_OO_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DRLK_3_1_SimulatedSuite() : TestCommand("Test_TC_DRLK_3_1_Simulated", 37) + Test_TC_OO_3_2_SimulatedSuite() : TestCommand("Test_TC_OO_3_2_Simulated", 6) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -5401,7 +1827,7 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DRLK_3_1_SimulatedSuite() {} + ~Test_TC_OO_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -5421,10 +1847,6 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -5441,190 +1863,34 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); + LogStep(0, "DUT issues an Off command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id); } case 1: { - LogStep(1, "DUT reads LockState attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LockState::Id); + LogStep(1, "DUT issues an On command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 2: { - LogStep(2, "DUT reads LockType attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LockType::Id); + LogStep(2, "DUT issues an Toggle command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Toggle::Id); } case 3: { - LogStep(3, "DUT reads ActuatorEnabled attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::ActuatorEnabled::Id); + LogStep(3, "DUT issues an OffWithEffect command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id); } case 4: { - LogStep(4, "DUT reads DoorState attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorState::Id); + LogStep(4, "DUT issues an OnWithRecallGlobalScene command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id); } case 5: { - LogStep(5, "DUT reads DoorOpenEvents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorOpenEvents::Id); - } - case 6: { - LogStep(6, "DUT reads DoorClosedEvents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorClosedEvents::Id); - } - case 7: { - LogStep(7, "DUT reads OpenPeriod attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::OpenPeriod::Id); - } - case 8: { - LogStep(8, "DUT reads NumberOfTotalUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfTotalUsersSupported::Id); - } - case 9: { - LogStep(9, "DUT reads NumberofPINUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfPINUsersSupported::Id); - } - case 10: { - LogStep(10, "DUT reads NumberofRFIDUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfRFIDUsersSupported::Id); - } - case 11: { - LogStep(11, "DUT reads NumberofWeekDaysSchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id); - } - case 12: { - LogStep(12, "DUT reads NumberofYearDaysSchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id); - } - case 13: { - LogStep(13, "DUT reads NumberofHolidaySchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id); - } - case 14: { - LogStep(14, "DUT reads MaxPINCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MaxPINCodeLength::Id); - } - case 15: { - LogStep(15, "DUT reads MinPINCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MinPINCodeLength::Id); - } - case 16: { - LogStep(16, "DUT reads MaxRFIDCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MaxRFIDCodeLength::Id); - } - case 17: { - LogStep(17, "DUT reads MinRFIDCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MinRFIDCodeLength::Id); - } - case 18: { - LogStep(18, "DUT reads CredentialRulesSupport attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::CredentialRulesSupport::Id); - } - case 19: { - LogStep(19, "DUT reads Language attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::Language::Id); - } - case 20: { - LogStep(20, "DUT reads LEDSettings attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LEDSettings::Id); - } - case 21: { - LogStep(21, "DUT reads AutoRelockTime attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::AutoRelockTime::Id); - } - case 22: { - LogStep(22, "DUT reads SoundVolume attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SoundVolume::Id); - } - case 23: { - LogStep(23, "DUT reads OperatingMode attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::OperatingMode::Id); - } - case 24: { - LogStep(24, "DUT reads SupportedOperatingModes attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SupportedOperatingModes::Id); - } - case 25: { - LogStep(25, "DUT reads DefaultConfigurationRegister attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DefaultConfigurationRegister::Id); - } - case 26: { - LogStep(26, "DUT reads EnableLocalProgramming attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableLocalProgramming::Id); - } - case 27: { - LogStep(27, "DUT reads EnableOneTouchLocking attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableOneTouchLocking::Id); - } - case 28: { - LogStep(28, "DUT reads EnableInsideStatusLED attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableInsideStatusLED::Id); - } - case 29: { - LogStep(29, "DUT reads EnablePrivacyModeButton attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnablePrivacyModeButton::Id); - } - case 30: { - LogStep(30, "DUT reads LocalProgrammingFeatures attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LocalProgrammingFeatures::Id); - } - case 31: { - LogStep(31, "DUT reads WrongCodeEntryLimit attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id); - } - case 32: { - LogStep(32, "DUT reads UserCodeTemporaryDisableTime attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::UserCodeTemporaryDisableTime::Id); - } - case 33: { - LogStep(33, "DUT reads SendPINOverTheAir attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SendPINOverTheAir::Id); - } - case 34: { - LogStep(34, "DUT reads RequirePINForRemoteOperation attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::RequirePINforRemoteOperation::Id); - } - case 35: { - LogStep(35, "DUT reads ExpiringUserTimeOut attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::ExpiringUserTimeout::Id); - } - case 36: { - LogStep(36, "DUT reads NumberOfCredentialsSupportedPerUser attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id); + LogStep(5, "DUT issues an OnWithTimedOff command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id); } } return CHIP_NO_ERROR; @@ -5633,98 +1899,14 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand std::unique_ptr GetTestCommand(std::string testName) { - if (testName == "Test_TC_ACT_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ACT_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_BOOL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_BOOL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DESC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_DESC_2_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGETH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGETH_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DGSW_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGSW_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DGWIFI_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGWIFI_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_FLW_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_FLW_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_G_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_G_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_I_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_I_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PRS_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PRS_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PSCFG_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PSCFG_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_RH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_RH_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_SWTCH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_SWTCH_3_1_SimulatedSuite()); - } if (testName == "Test_TC_WNCV_5_1_Simulated") { return std::unique_ptr(new Test_TC_WNCV_5_1_SimulatedSuite()); } - if (testName == "Test_TC_LCFG_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_LCFG_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_LUNIT_1_1_Simulated") - { - return std::unique_ptr(new Test_TC_LUNIT_1_1_SimulatedSuite()); - } - if (testName == "Test_TC_LUNIT_2_1_Simulated") - { - return std::unique_ptr(new Test_TC_LUNIT_2_1_SimulatedSuite()); - } - if (testName == "Test_TC_OCC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_OCC_2_2_SimulatedSuite()); - } if (testName == "Test_TC_OCC_2_4_Simulated") { return std::unique_ptr(new Test_TC_OCC_2_4_SimulatedSuite()); } - if (testName == "Test_TC_ULABEL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ULABEL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_FLABEL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_FLABEL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_LTIME_1_1_Simulated") - { - return std::unique_ptr(new Test_TC_LTIME_1_1_SimulatedSuite()); - } - if (testName == "Test_TC_ILL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ILL_3_1_SimulatedSuite()); - } if (testName == "Test_TC_DGSW_3_2_Simulated") { return std::unique_ptr(new Test_TC_DGSW_3_2_SimulatedSuite()); @@ -5769,14 +1951,6 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_CC_9_4_SimulatedSuite()); } - if (testName == "Test_TC_DGTHREAD_3_2_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGTHREAD_3_3_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_3_SimulatedSuite()); - } if (testName == "Test_TC_DGTHREAD_3_4_Simulated") { return std::unique_ptr(new Test_TC_DGTHREAD_3_4_SimulatedSuite()); @@ -5785,38 +1959,10 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_LVL_2_3_SimulatedSuite()); } - if (testName == "Test_TC_OO_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_OO_3_1_SimulatedSuite()); - } if (testName == "Test_TC_OO_3_2_Simulated") { return std::unique_ptr(new Test_TC_OO_3_2_SimulatedSuite()); } - if (testName == "Test_TC_TSUIC_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_TSUIC_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PCC_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PCC_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_TMP_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_TMP_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_CC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_CC_2_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGTHREAD_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DRLK_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DRLK_3_1_SimulatedSuite()); - } return nullptr; } @@ -5824,29 +1970,8 @@ std::unique_ptr GetTestCommand(std::string testName) void PrintTestCommands() { ChipLogError(chipTool, "Supported commands:"); - ChipLogError(chipTool, "\t* Test_TC_ACT_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_BOOL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DESC_2_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGETH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGSW_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_FLW_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_G_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_I_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PRS_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PSCFG_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_RH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_SWTCH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_WNCV_5_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LCFG_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LUNIT_1_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LUNIT_2_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_OCC_2_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_FLABEL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LTIME_1_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_ILL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGSW_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGETH_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_2_Simulated"); @@ -5858,16 +1983,7 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_CC_6_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_CC_7_5_Simulated"); ChipLogError(chipTool, "\t* Test_TC_CC_9_4_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_3_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_LVL_2_3_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_OO_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_OO_3_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_TSUIC_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PCC_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_TMP_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_CC_2_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DRLK_3_1_Simulated"); } diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index c7509b6750793a..85b6ca3fc694ae 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -23,10 +23,10 @@ #include -class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand { public: - Test_TC_ACT_3_1_SimulatedSuite() : TestCommand("Test_TC_ACT_3_1_Simulated", 6) + Test_TC_WNCV_5_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_5_1_Simulated", 5) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -34,7 +34,7 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_5_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -54,18 +54,6 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -82,64 +70,39 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: ActionList"); - VerifyOrDo(!ShouldSkip("ACT.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::ActionList::Id); + LogStep(0, "DUT reads the FeatureMap attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id); } case 1: { - LogStep(1, "Read attribute: EndpointLists"); - VerifyOrDo(!ShouldSkip("ACT.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::EndpointLists::Id); + LogStep(1, "DUT reads the Type attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Type::Id); } case 2: { - LogStep(2, "Read attribute: SetupURL"); - VerifyOrDo(!ShouldSkip("ACT.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::SetupURL::Id); + LogStep(2, "DUT reads the EndProductType attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id); } case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(3, "DUT reads the Mode attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Mode::Id); } case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACT.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACT.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads the ConfigStatus attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand +class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand { public: - Test_TC_BOOL_3_1_SimulatedSuite() : TestCommand("Test_TC_BOOL_3_1_Simulated", 4) + Test_TC_OCC_2_4_SimulatedSuite() : TestCommand("Test_TC_OCC_2_4_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -147,7 +110,7 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BOOL_3_1_SimulatedSuite() {} + ~Test_TC_OCC_2_4_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -167,18 +130,6 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -195,54 +146,24 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: StateValue"); - VerifyOrDo(!ShouldSkip("BOOL.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), BooleanState::Id, BooleanState::Attributes::StateValue::Id); + LogStep(0, "TH reads OccupancySensorType attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); } case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand +class Test_TC_DGSW_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DESC_2_2_SimulatedSuite() : TestCommand("Test_TC_DESC_2_2_Simulated", 5) + Test_TC_DGSW_3_2_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -250,7 +171,7 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_2_SimulatedSuite() {} + ~Test_TC_DGSW_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -270,10 +191,6 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -290,44 +207,19 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "DUT reads DeviceTypeList from TH."); - VerifyOrDo(!ShouldSkip("DESC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::DeviceTypeList::Id); - } - case 1: { - LogStep(1, "DUT reads ServerList from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ServerList::Id); - } - case 2: { - LogStep(2, "DUT reads ClientList attribute from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClientList::Id); - } - case 3: { - LogStep(3, "DUT reads PartsList attribute from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::PartsList::Id); - } - case 4: { - LogStep(4, "DUT reads TagList from the TH"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(0, "DUT sends ResetWatermarks to TH"); + VerifyOrDo(!ShouldSkip("DGSW.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Commands::ResetWatermarks::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand +class Test_TC_DGETH_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DGETH_3_1_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_1_Simulated", 9) + Test_TC_DGETH_3_2_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -335,7 +227,7 @@ class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_1_SimulatedSuite() {} + ~Test_TC_DGETH_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -371,68 +263,20 @@ class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: PHYRate"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id); - } - case 1: { - LogStep(1, "Read attribute: FullDuplex"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::FullDuplex::Id); - } - case 2: { - LogStep(2, "Read attribute: PacketRxCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id); - } - case 3: { - LogStep(3, "Read attribute: PacketTxCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id); - } - case 4: { - LogStep(4, "Read attribute: TxErrCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TxErrCount::Id); - } - case 5: { - LogStep(5, "Read attribute: CollisionCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CollisionCount::Id); - } - case 6: { - LogStep(6, "Read attribute: OverrunCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::OverrunCount::Id); - } - case 7: { - LogStep(7, "Read attribute: CarrierDetect"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id); - } - case 8: { - LogStep(8, "Read attribute: TimeSinceReset"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id); + LogStep(0, "DUT sends ResetCounts to TH"); + VerifyOrDo(!ShouldSkip("DGETH.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Commands::ResetCounts::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand +class Test_TC_DGWIFI_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DGSW_3_1_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_1_Simulated", 4) + Test_TC_DGWIFI_3_2_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -440,7 +284,7 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGSW_3_1_SimulatedSuite() {} + ~Test_TC_DGWIFI_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -476,35 +320,19 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: ThreadMetrics"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::ThreadMetrics::Id); - } - case 1: { - LogStep(1, "Read attribute: CurrentHeapFree"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id); - } - case 2: { - LogStep(2, "Read attribute: CurrentHeapUsed"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id); - } - case 3: { - LogStep(3, "Read attribute: CurrentHeapHighWatermark"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id); + LogStep(0, "DUT sends ResetCounts command to TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Commands::ResetCounts::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_6_1_SimulatedSuite : public TestCommand { public: - Test_TC_DGWIFI_3_1_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_1_Simulated", 13) + Test_TC_WNCV_6_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_6_1_Simulated", 3) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -512,7 +340,7 @@ class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGWIFI_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_6_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -548,85 +376,29 @@ class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: BSSID"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Bssid::Id); + LogStep(0, "DUT sends UpOrOpen command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id); } case 1: { - LogStep(1, "Read attribute: SecurityType"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::SecurityType::Id); + LogStep(1, "DUT sends DownOrClose command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id); } case 2: { - LogStep(2, "Read attribute: WiFiVersion"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id); - } - case 3: { - LogStep(3, "Read attribute: ChannelNumber"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id); - } - case 4: { - LogStep(4, "Read attribute: RSSI"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Rssi::Id); - } - case 5: { - LogStep(5, "Read attribute: BeaconLostCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id); - } - case 6: { - LogStep(6, "Read attribute: BeaconRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id); - } - case 7: { - LogStep(7, "Read attribute: PacketMulticastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id); - } - case 8: { - LogStep(8, "Read attribute: PacketMulticastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id); - } - case 9: { - LogStep(9, "Read attribute: PacketUnicastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id); - } - case 10: { - LogStep(10, "Read attribute: PacketUnicastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id); - } - case 11: { - LogStep(11, "Read attribute: CurrentMaxRate"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id); - } - case 12: { - LogStep(12, "Read attribute: OverrunCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::OverrunCount::Id); + LogStep(2, "DUT sends StopMotion command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_7_1_SimulatedSuite : public TestCommand { public: - Test_TC_FLW_3_1_SimulatedSuite() : TestCommand("Test_TC_FLW_3_1_Simulated", 7) + Test_TC_WNCV_7_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_7_1_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -634,7 +406,7 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_FLW_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_7_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -654,18 +426,6 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -682,83 +442,40 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "If (PA_LF & LF) DUT sends GoToLiftPercentage command with 50% to DUT"); + VerifyOrDo(!ShouldSkip("WNCV.C.C05.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("FLW.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && FLW.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, "If (PA_TL & TL) DUT sends GoToTiltPercentage command with 50% to DUT"); + VerifyOrDo(!ShouldSkip("WNCV.C.C08.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_G_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_3_4_SimulatedSuite : public TestCommand { public: - Test_TC_G_3_1_SimulatedSuite() : TestCommand("Test_TC_G_3_1_Simulated", 1) + Test_TC_CC_3_4_SimulatedSuite() : TestCommand("Test_TC_CC_3_4_Simulated", 16) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_G_3_1_SimulatedSuite() {} + ~Test_TC_CC_3_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -772,71 +489,19 @@ class Test_TC_G_3_1_SimulatedSuite : public TestCommand 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads NameSupport attribute value from TH"); - VerifyOrDo(!ShouldSkip("G.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_I_3_1_SimulatedSuite() : TestCommand("Test_TC_I_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_3_1_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -856,83 +521,121 @@ class Test_TC_I_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: identifytype"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyType::Id); + LogStep(1, "DUT sends MoveToHue command to TH an Hue with _TransitionTime 300"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id); } case 2: { - LogStep(2, "write attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(2, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 3: { - LogStep(3, "Readback attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "DUT sends MoveHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id); } case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 7: { + LogStep(7, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 9: { + LogStep(9, "DUT sends StepHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id); + } + case 10: { + LogStep(10, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 11: { + LogStep(11, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 13: { + LogStep(13, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); + } + case 14: { + LogStep(14, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 15: { + LogStep(15, "Over TransitionTime, DUT reads CurrentHue attribute from TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_4_5_SimulatedSuite : public TestCommand { public: - Test_TC_PRS_3_1_SimulatedSuite() : TestCommand("Test_TC_PRS_3_1_Simulated", 12) + Test_TC_CC_4_5_SimulatedSuite() : TestCommand("Test_TC_CC_4_5_Simulated", 22) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_PRS_3_1_SimulatedSuite() {} + ~Test_TC_CC_4_5_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -946,11 +649,11 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 9: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -958,6 +661,14 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -974,3183 +685,154 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinMeasuredValue::Id); + LogStep(1, "DUT sends MoveToSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id); } case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxMeasuredValue::Id); + LogStep(2, "DUT reads CurrentSaturation attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 3: { - LogStep(3, "Read attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Tolerance::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Read attribute: ScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledValue::Id); + LogStep(4, "DUT reads CurrentSaturation attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 5: { - LogStep(5, "Read attribute: MinScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinScaledValue::Id); + LogStep(5, "DUT sends MoveSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id); } case 6: { - LogStep(6, "Read attribute: MaxScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxScaledValue::Id); + LogStep(6, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 7: { - LogStep(7, "Read attribute: ScaledTolerance"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledTolerance::Id); + LogStep(7, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { - LogStep(8, "Read attribute: Scale"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Scale::Id); + LogStep(8, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 9: { - LogStep(9, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(9, "DUT sends StepSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id); } case 10: { - LogStep(10, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(10, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 11: { - LogStep(11, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_PSCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_PSCFG_3_1_Simulated", 4) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PSCFG_3_1_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: Sources"); - VerifyOrDo(!ShouldSkip("PSCFG.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PowerSourceConfiguration::Id, PowerSourceConfiguration::Attributes::Sources::Id); - } - case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RH_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_RH_3_1_SimulatedSuite() : TestCommand("Test_TC_RH_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RH_3_1_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute MeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute Tolerance"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_SWTCH_3_1_SimulatedSuite() : TestCommand("Test_TC_SWTCH_3_1_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_1_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Read NumberOfPositions attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::NumberOfPositions::Id); - } - case 1: { - LogStep(1, "Read CurrentPosition attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::CurrentPosition::Id); - } - case 2: { - LogStep(2, "Read MultiPressMax attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::MultiPressMax::Id); - } - case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && SWTCH.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_5_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_5_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_5_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads the FeatureMap attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id); - } - case 1: { - LogStep(1, "DUT reads the Type attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Type::Id); - } - case 2: { - LogStep(2, "DUT reads the EndProductType attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id); - } - case 3: { - LogStep(3, "DUT reads the Mode attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Mode::Id); - } - case 4: { - LogStep(4, "DUT reads the ConfigStatus attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LCFG_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_LCFG_3_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_3_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads SupportedLocales attribute from TH"); - VerifyOrDo(!ShouldSkip("LCFG.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::SupportedLocales::Id); - } - case 1: { - LogStep(1, "DUT reads ActiveLocale attribute from TH"); - VerifyOrDo(!ShouldSkip("LCFG.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::ActiveLocale::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_1_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LUNIT_1_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_1_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_1_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT read (0xFFFD) ClusterRevision attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::ClusterRevision::Id); - } - case 1: { - LogStep(1, "DUT read (0xFFFC) FeatureMap attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id); - } - case 2: { - LogStep(2, "DUT read (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AttributeList::Id); - } - case 3: { - LogStep(3, "DUT read (0xFFF9) AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AcceptedCommandList::Id); - } - case 4: { - LogStep(4, "DUT read (0xFFF8) GeneratedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::GeneratedCommandList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_2_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LUNIT_2_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_2_1_Simulated", 3) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_2_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads TemperatureUnit attribute from TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - case 1: { - LogStep(1, "DUT writes 2 to TemperatureUnit attribute on TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - case 2: { - LogStep(2, "DUT reads TemperatureUnit attribute from TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OCC_2_2_SimulatedSuite() : TestCommand("Test_TC_OCC_2_2_Simulated", 12) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_2_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads from the TH the (0x0000) Occupancy attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id); - } - case 1: { - LogStep(1, "DUT reads from the TH the (0x0001) OccupancySensorType attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); - } - case 2: { - LogStep(2, "DUT reads from the TH the (0x0002) OccupancySensorTypeBitmap attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); - } - case 3: { - LogStep(3, "DUT reads from the TH the (0x0010) PIROccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id); - } - case 4: { - LogStep(4, "DUT reads from the TH the (0x0011) PIRUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id); - } - case 5: { - LogStep(5, "DUT reads from the TH the (0x0012) PIRUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id); - } - case 6: { - LogStep(6, "DUT reads from the TH the (0x0020) UltrasonicOccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id); - } - case 7: { - LogStep(7, "DUT reads from the TH the (0x0021) UltrasonicUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id); - } - case 8: { - LogStep(8, "DUT reads from the TH the (0x0022) UltrasonicUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id); - } - case 9: { - LogStep(9, "DUT reads from the TH the (0x0030) PhysicalContactOccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id); - } - case 10: { - LogStep(10, "DUT reads from the TH the (0x0031) PhysicalContactUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id); - } - case 11: { - LogStep(11, "DUT reads from the TH the (0x0032) PhysicalContactUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OCC_2_4_SimulatedSuite() : TestCommand("Test_TC_OCC_2_4_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_4_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "TH reads OccupancySensorType attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); - } - case 1: { - LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_ULABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_ULABEL_3_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_3_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Read attribute: LabelList"); - VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id); - } - case 1: { - LogStep(1, "Step 2: write attribute: LabelList"); - VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLABEL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_FLABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_FLABEL_3_1_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLABEL_3_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads LabelList from the TH"); - VerifyOrDo(!ShouldSkip("FLABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LTIME_1_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LTIME_1_1_SimulatedSuite() : TestCommand("Test_TC_LTIME_1_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LTIME_1_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT read (0xFFFD) ClusterRevision attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::ClusterRevision::Id); - } - case 1: { - LogStep(1, "DUT read (0xFFFC) FeatureMap attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::FeatureMap::Id); - } - case 2: { - LogStep(2, "DUT read (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id); - } - case 3: { - LogStep(3, "DUT read (0xFFF9) AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::AcceptedCommandList::Id); - } - case 4: { - LogStep(4, "DUT read (0xFFF8) GeneratedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::GeneratedCommandList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ILL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_ILL_3_1_SimulatedSuite() : TestCommand("Test_TC_ILL_3_1_Simulated", 8) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ILL_3_1_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, "Read attribute: LightSensorType"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::LightSensorType::Id); - } - case 5: { - LogStep(5, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGSW_3_2_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_3_2_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetWatermarks to TH"); - VerifyOrDo(!ShouldSkip("DGSW.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Commands::ResetWatermarks::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGETH_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGETH_3_2_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGETH_3_2_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts to TH"); - VerifyOrDo(!ShouldSkip("DGETH.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGWIFI_3_2_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_3_2_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts command to TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_6_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_6_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_6_1_Simulated", 3) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_6_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends UpOrOpen command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id); - } - case 1: { - LogStep(1, "DUT sends DownOrClose command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id); - } - case 2: { - LogStep(2, "DUT sends StopMotion command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_7_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_7_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_7_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_7_1_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "If (PA_LF & LF) DUT sends GoToLiftPercentage command with 50% to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.C.C05.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id); - } - case 1: { - LogStep(1, "If (PA_TL & TL) DUT sends GoToTiltPercentage command with 50% to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.C.C08.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_3_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_3_4_SimulatedSuite() : TestCommand("Test_TC_CC_3_4_Simulated", 16) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_3_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mConfigTransitionTime; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToHue command to TH an Hue with _TransitionTime 300"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 5: { - LogStep(5, "DUT sends MoveHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 9: { - LogStep(9, "DUT sends StepHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id); - } - case 10: { - LogStep(10, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 13: { - LogStep(13, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 14: { - LogStep(14, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Over TransitionTime, DUT reads CurrentHue attribute from TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_4_5_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_4_5_SimulatedSuite() : TestCommand("Test_TC_CC_4_5_Simulated", 22) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_4_5_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mConfigTransitionTime; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentSaturation attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads CurrentSaturation attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 5: { - LogStep(5, "DUT sends MoveSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 9: { - LogStep(9, "DUT sends StepSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id); - } - case 10: { - LogStep(10, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 13: { - LogStep(13, "DUT sends MoveToHueAndSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id); - } - case 14: { - LogStep(14, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Over TransitionTime, DUT reads CurrentSaturation attribute from TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_5_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_5_4_SimulatedSuite() : TestCommand("Test_TC_CC_5_4_Simulated", 25) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_5_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 3: { - LogStep(3, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 4: { - LogStep(4, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 7: { - LogStep(7, "DUT sends MoveColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id); - } - case 8: { - LogStep(8, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 9: { - LogStep(9, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 10: { - LogStep(10, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 12: { - LogStep(12, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 13: { - LogStep(13, "DUT sends StepColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id); - } - case 14: { - LogStep(14, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 21: { - LogStep(21, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 22: { - LogStep(22, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 24: { - LogStep( - 24, - "DUT reads CurrentY attribute from ConfiguredTime: type: int16u defaultValue: 30000TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_6_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_6_4_SimulatedSuite() : TestCommand("Test_TC_CC_6_4_Simulated", 18) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_6_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, - "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " - "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " - "attribute ColorTempPhysicalMinMireds from TH"); - VerifyOrDo(!ShouldSkip("CC.C.A400b && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); - } - case 2: { - LogStep(2, - "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " - "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " - "attribute ColorTempPhysicalMaxMireds from TH"); - VerifyOrDo(!ShouldSkip("CC.C.A400c && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); - } - case 3: { - LogStep(3, "DUT sends MoveToColorTemperature command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id); - } - case 4: { - LogStep(4, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 5: { - LogStep(5, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 7: { - LogStep(7, "DUT sends MoveColorTemperatureMireds command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id); - } - case 8: { - LogStep(8, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 9: { - LogStep(9, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 11: { - LogStep(11, "DUT sends StepColorTemperature command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id); - } - case 12: { - LogStep(12, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 13: { - LogStep(13, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 15: { - LogStep(15, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_5_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_7_5_SimulatedSuite() : TestCommand("Test_TC_CC_7_5_Simulated", 23) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_7_5_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToEnhancedHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id); - } - case 2: { - LogStep(2, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 5: { - LogStep(5, "DUT sends MoveEnhanced Hue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id); - } - case 6: { - LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 9: { - LogStep(9, "DUT sends StepEnhanced command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id); - } - case 10: { - LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 13: { - LogStep(13, "DUT sends EnhancedMoveToHueAndSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id); - } - case 14: { - LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 21: { - LogStep(21, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_9_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_9_4_SimulatedSuite() : TestCommand("Test_TC_CC_9_4_Simulated", 19) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - } - - ~Test_TC_CC_9_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mCluster; - chip::Optional mEndpoint; - - 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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends ColorLoopSet command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C44.Tx && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id); - } - case 2: { - LogStep(2, "DUT reads ColorLoopActive attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4002 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); - } - case 3: { - LogStep(3, "DUT reads ColorLoopDirection attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4003 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); - } - case 4: { - LogStep(4, "DUT reads ColorLoopTime attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4004 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); - } - case 5: { - LogStep(5, "DUT reads ColorLoopStartEnhancedHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4005 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); - } - case 6: { - LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 7: { - LogStep(7, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 9: { - LogStep(9, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 13: { - LogStep(13, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 15: { - LogStep(15, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 17: { - LogStep(17, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_2_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_2_Simulated", 17) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_2_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads TxTotalCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id); - } - case 1: { - LogStep(1, "DUT reads TxUnicastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id); - } - case 2: { - LogStep(2, "DUT reads TxBroadcastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id); - } - case 3: { - LogStep(3, "DUT reads TxAckRequestedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id); - } - case 4: { - LogStep(4, "DUT reads TxAckedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id); - } - case 5: { - LogStep(5, "DUT reads TxNoAckRequestedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id); - } - case 6: { - LogStep(6, "DUT reads TxDataCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDataCount::Id); - } - case 7: { - LogStep(7, "DUT reads TxDataPollCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id); - } - case 8: { - LogStep(8, "DUT reads TxBeaconCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id); - } - case 9: { - LogStep(9, "DUT reads TxBeaconRequestCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id); - } - case 10: { - LogStep(10, "DUT reads TxOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id); - } - case 11: { - LogStep(11, "DUT reads TxRetryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id); - } - case 12: { - LogStep(12, "DUT reads TxDirectMaxRetryExpiryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id); - } - case 13: { - LogStep(13, "DUT reads TxIndirectMaxRetryExpiryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id); - } - case 14: { - LogStep(14, "DUT reads TxErrCcaCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id); - } - case 15: { - LogStep(15, "DUT reads TxErrAbortCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id); - } - case 16: { - LogStep(16, "DUT reads TxErrBusyChannelCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_3_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_3_Simulated", 17) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_3_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads RxTotalCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id); - } - case 1: { - LogStep(1, "DUT reads RxUnicastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id); - } - case 2: { - LogStep(2, "DUT reads RxBroadcastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id); - } - case 3: { - LogStep(3, "DUT reads RxDataCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataCount::Id); - } - case 4: { - LogStep(4, "DUT reads RxDataPollCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id); - } - case 5: { - LogStep(5, "DUT reads RxBeaconCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id); - } - case 6: { - LogStep(6, "DUT reads RxBeaconRequestCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id); - } - case 7: { - LogStep(7, "DUT reads RxOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id); - } - case 8: { - LogStep(8, "DUT reads RxAddressFilteredCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id); - } - case 9: { - LogStep(9, "DUT reads RxDestAddrFilteredCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id); - } - case 10: { - LogStep(10, "DUT reads RxDuplicatedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id); - } - case 11: { - LogStep(11, "DUT reads RxErrNoFrameCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id); - } - case 12: { - LogStep(12, "DUT reads RxErrUnknownNeighborCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id); - } - case 13: { - LogStep(13, "DUT reads RxErrInvalidSrcAddrCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id); - } - case 14: { - LogStep(14, "DUT reads RxErrSecCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id); - } - case 15: { - LogStep(15, "DUT reads RxErrFcsCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id); - } - case 16: { - LogStep(16, "DUT reads RxErrOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_4_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_4_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_4_SimulatedSuite() {} - -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 - { - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts command to TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Commands::ResetCounts::Id); - } - case 1: { - LogStep(1, "DUT reads OverrunCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_2_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LVL_2_3_SimulatedSuite() : TestCommand("Test_TC_LVL_2_3_Simulated", 24) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_2_3_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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; - switch (testIndex) - { - case 0: { - LogStep(0, "Read mandatory attribute CurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id); - } - case 1: { - LogStep(1, "Read mandatory attribute OnLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); - } - case 2: { - LogStep(2, "Read mandatory attribute Options"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); - } - case 3: { - LogStep(3, "Read optional attribute RemainingTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::RemainingTime::Id); - } - case 4: { - LogStep(4, "Read optional attribute StartUpCurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); - } - case 5: { - LogStep(5, "Read optional attribute CurrentFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id); - } - case 6: { - LogStep(6, "Read optional attribute MinFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinFrequency::Id); - } - case 7: { - LogStep(7, "Read optional attribute MaxFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxFrequency::Id); - } - case 8: { - LogStep(8, "Read optional attribute MinLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id); - } - case 9: { - LogStep(9, "Read optional attribute MaxLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id); - } - case 10: { - LogStep(10, "Read optional attribute OnOffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); - } - case 11: { - LogStep(11, "Read optional attribute OnTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); - } - case 12: { - LogStep(12, "Read optional attribute OffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); + case 12: { + LogStep(12, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 13: { - LogStep(13, "Read optional attribute DefaultMoveRate"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); + LogStep(13, "DUT sends MoveToHueAndSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id); } case 14: { - LogStep(14, "Write mandatory attribute OnLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); + LogStep(14, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 15: { - LogStep(15, "Write mandatory attribute Options"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); + LogStep(15, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 16: { - LogStep(16, "Write optional attribute OnOffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); + LogStep(16, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "Write optional attribute OnTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); + LogStep(17, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 18: { - LogStep(18, "Write optional attribute OffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); + LogStep(18, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 19: { - LogStep(19, "Write optional attribute DefaultMoveRate"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } case 20: { - LogStep(20, "Write optional attribute StartUpCurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); - } - case 21: { - LogStep(21, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 21: { + LogStep(21, "Over TransitionTime, DUT reads CurrentSaturation attribute from TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_OO_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_5_4_SimulatedSuite : public TestCommand { public: - Test_TC_OO_3_1_SimulatedSuite() : TestCommand("Test_TC_OO_3_1_Simulated", 11) + Test_TC_CC_5_4_SimulatedSuite() : TestCommand("Test_TC_CC_5_4_Simulated", 25) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_OO_3_1_SimulatedSuite() {} + ~Test_TC_CC_5_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4164,15 +846,19 @@ class Test_TC_OO_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 8: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4192,176 +878,164 @@ class Test_TC_OO_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute OnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute GlobalSceneControl"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id); + LogStep(1, "DUT sends MoveToColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id); } case 2: { - LogStep(2, "Read attribute OnTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id); + LogStep(2, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 3: { - LogStep(3, "Read attribute OffWaitTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id); + LogStep(3, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 4: { - LogStep(4, "Read attribute StartUpOnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id); + LogStep(4, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Write attribute OnTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id); + LogStep(5, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 6: { - LogStep(6, "Write attribute OffWaitTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id); + LogStep(6, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 7: { - LogStep(7, "Write attribute StartUpOnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id); + LogStep(7, "DUT sends MoveColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id); } case 8: { - LogStep(8, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(8, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 9: { - LogStep(9, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(9, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 10: { - LogStep(10, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } + case 11: { + LogStep(11, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OO_3_2_SimulatedSuite() : TestCommand("Test_TC_OO_3_2_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_3_2_SimulatedSuite() {} - -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 - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 12: { + LogStep(12, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 13: { + LogStep(13, "DUT sends StepColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT issues an Off command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id); + case 14: { + LogStep(14, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - case 1: { - LogStep(1, "DUT issues an On command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); + case 15: { + LogStep(15, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); + } + case 16: { + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); + } + case 18: { + LogStep(18, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); + } + case 19: { + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } - case 2: { - LogStep(2, "DUT issues an Toggle command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Toggle::Id); + case 20: { + LogStep(20, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - case 3: { - LogStep(3, "DUT issues an OffWithEffect command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id); + case 21: { + LogStep(21, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } - case 4: { - LogStep(4, "DUT issues an OnWithRecallGlobalScene command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id); + case 22: { + LogStep(22, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 5: { - LogStep(5, "DUT issues an OnWithTimedOff command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id); + case 23: { + LogStep(23, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); + } + case 24: { + LogStep( + 24, + "DUT reads CurrentY attribute from ConfiguredTime: type: int16u defaultValue: 30000TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_6_4_SimulatedSuite : public TestCommand { public: - Test_TC_TSUIC_3_1_SimulatedSuite() : TestCommand("Test_TC_TSUIC_3_1_Simulated", 9) + Test_TC_CC_6_4_SimulatedSuite() : TestCommand("Test_TC_CC_6_4_Simulated", 18) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_TSUIC_3_1_SimulatedSuite() {} + ~Test_TC_CC_6_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4375,15 +1049,19 @@ class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4403,93 +1081,133 @@ class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "DUT reads TemperatureDisplayMode attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "DUT reads KeypadLockout attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id); + LogStep(1, + "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " + "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " + "attribute ColorTempPhysicalMinMireds from TH"); + VerifyOrDo(!ShouldSkip("CC.C.A400b && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); } case 2: { - LogStep(2, "DUT reads ScheduleProgrammingVisibility attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id); + LogStep(2, + "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " + "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " + "attribute ColorTempPhysicalMaxMireds from TH"); + VerifyOrDo(!ShouldSkip("CC.C.A400c && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); } case 3: { - LogStep(3, "DUT writes TemperatureDisplayMode attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id); + LogStep(3, "DUT sends MoveToColorTemperature command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id); } case 4: { - LogStep(4, "DUT writes KeypadLockout attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id); + LogStep(4, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } case 5: { - LogStep(5, "DUT writes ScheduleProgrammingVisibility attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id); + LogStep(5, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { - LogStep(6, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(6, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } case 7: { - LogStep(7, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(7, "DUT sends MoveColorTemperatureMireds command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id); } case 8: { - LogStep(8, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 9: { + LogStep(9, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 11: { + LogStep(11, "DUT sends StepColorTemperature command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id); + } + case 12: { + LogStep(12, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 13: { + LogStep(13, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 15: { + LogStep(15, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); + } + case 16: { + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_7_5_SimulatedSuite : public TestCommand { public: - Test_TC_PCC_3_1_SimulatedSuite() : TestCommand("Test_TC_PCC_3_1_Simulated", 30) + Test_TC_CC_7_5_SimulatedSuite() : TestCommand("Test_TC_CC_7_5_Simulated", 23) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_PCC_3_1_SimulatedSuite() {} + ~Test_TC_CC_7_5_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4503,15 +1221,23 @@ class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 27: + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4531,225 +1257,152 @@ class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute MaxPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxPressure::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute MaxSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxSpeed::Id); + LogStep(1, "DUT sends MoveToEnhancedHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id); } case 2: { - LogStep(2, "Read attribute MaxFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxFlow::Id); + LogStep(2, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 3: { - LogStep(3, "Read attribute EffectiveOperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Read attribute EffectiveControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id); + LogStep(4, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 5: { - LogStep(5, "Read attribute Capacity"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Capacity::Id); + LogStep(5, "DUT sends MoveEnhanced Hue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id); } case 6: { - LogStep(6, "Read attribute OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id); + LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 7: { - LogStep(7, "Read attribute MinConstPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstPressure::Id); + LogStep(7, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { - LogStep(8, "Read attribute MaxConstPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstPressure::Id); + LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 9: { - LogStep(9, "Read attribute MinCompPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinCompPressure::Id); + LogStep(9, "DUT sends StepEnhanced command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id); } case 10: { - LogStep(10, "Read attribute MaxCompPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxCompPressure::Id); + LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 11: { - LogStep(11, "Read attribute MinConstSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstSpeed::Id); + LogStep(11, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 12: { - LogStep(12, "Read attribute MaxConstSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id); + LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 13: { - LogStep(13, "Read attribute MinConstFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstFlow::Id); + LogStep(13, "DUT sends EnhancedMoveToHueAndSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id); } case 14: { - LogStep(14, "Read attribute MaxConstFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstFlow::Id); + LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 15: { - LogStep(15, "Read attribute MinConstTemp"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstTemp::Id); + LogStep(15, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 16: { - LogStep(16, "Read attribute MaxConstTemp"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstTemp::Id); + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "Read attribute PumpStatus"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::PumpStatus::Id); + LogStep(17, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 18: { - LogStep(18, "Read attribute Speed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Speed::Id); + LogStep(18, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 19: { - LogStep(19, "Read attribute LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id); + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } case 20: { - LogStep(20, "Read attribute Power"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Power::Id); + LogStep(20, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 21: { - LogStep(21, "Read attribute LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id); - } - case 22: { - LogStep(22, "Read attribute ControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id); - } - case 23: { - LogStep(23, "Write attribute LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id); - } - case 24: { - LogStep(24, "Write attribute LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id); - } - case 25: { - LogStep(25, "Write attribute OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id); - } - case 26: { - LogStep(26, "Write attribute ControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id); - } - case 27: { - LogStep(27, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 22: { + LogStep(22, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_9_4_SimulatedSuite : public TestCommand { public: - Test_TC_TMP_3_1_SimulatedSuite() : TestCommand("Test_TC_TMP_3_1_Simulated", 7) + Test_TC_CC_9_4_SimulatedSuite() : TestCommand("Test_TC_CC_9_4_Simulated", 19) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TMP_3_1_SimulatedSuite() {} + ~Test_TC_CC_9_4_SimulatedSuite() {} private: chip::Optional mNodeId; + chip::Optional mTimeout; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4763,15 +1416,27 @@ class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4791,67 +1456,126 @@ class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id); + LogStep(1, "DUT sends ColorLoopSet command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C44.Tx && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id); } case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id); + LogStep(2, "DUT reads ColorLoopActive attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4002 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); } case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::Tolerance::Id); + LogStep(3, "DUT reads ColorLoopDirection attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4003 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); } case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads ColorLoopTime attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4004 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); } case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "DUT reads ColorLoopStartEnhancedHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4005 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); } case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 7: { + LogStep(7, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 9: { + LogStep(9, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 11: { + LogStep(11, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 13: { + LogStep(13, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 15: { + LogStep(15, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 17: { + LogStep(17, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_CC_2_2_SimulatedSuite : public TestCommand +class Test_TC_DGTHREAD_3_4_SimulatedSuite : public TestCommand { public: - Test_TC_CC_2_2_SimulatedSuite() : TestCommand("Test_TC_CC_2_2_Simulated", 52) + Test_TC_DGTHREAD_3_4_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_4_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -4859,7 +1583,7 @@ class Test_TC_CC_2_2_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_2_2_SimulatedSuite() {} + ~Test_TC_DGTHREAD_3_4_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -4889,280 +1613,31 @@ class Test_TC_CC_2_2_SimulatedSuite : public TestCommand } } - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads from the TH the (0x0000) CurrentHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 1: { - LogStep(1, "DUT reads from the TH the (0x0001) CurrentSaturation attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 2: { - LogStep(2, "DUT reads from the TH the Optional (0x0002) RemainingTime attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::RemainingTime::Id); - } - case 3: { - LogStep(3, "DUT reads from the TH the (0x0003) CurrentX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 4: { - LogStep(4, "DUT reads from the TH the (0x0004) CurrentY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 5: { - LogStep(5, "DUT reads from the TH the Optional (0x0005) DriftCompensation attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::DriftCompensation::Id); - } - case 6: { - LogStep(6, "DUT reads from the TH the Optional (0x0006) CompensationText attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CompensationText::Id); - } - case 7: { - LogStep(7, "DUT reads from the TH the (0x0007) ColorTemperatureMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 8: { - LogStep(8, "DUT reads from the TH the (0x0008) ColorMode attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id); - } - case 9: { - LogStep(9, "DUT reads from the TH the (0x000f) Options attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id); - } - case 10: { - LogStep(10, "DUT reads from the TH the (0x4000) EnhancedCurrentHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "DUT reads from the TH the (0x4001) EnhancedColorMode attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id); - } - case 12: { - LogStep(12, "DUT reads from the TH the (0x4002) ColorLoopActive attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); - } - case 13: { - LogStep(13, "DUT reads from the TH the (0x4003) ColorLoopDirection attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); - } - case 14: { - LogStep(14, "DUT reads from the TH the (0x4004) ColorLoopTime attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); - } - case 15: { - LogStep(15, "DUT reads from the TH the (0x4005) ColorLoopStartEnhancedHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); - } - case 16: { - LogStep(16, "DUT reads from the TH the (0x4006) ColorLoopStoredEnhancedHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id); - } - case 17: { - LogStep(17, "DUT reads from the TH the (0x400a) ColorCapabilities attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorCapabilities::Id); - } - case 18: { - LogStep(18, "DUT reads from the TH the (0x400b) ColorTempPhysicalMinMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); - } - case 19: { - LogStep(19, "DUT reads from the TH the (0x400c) ColorTempPhysicalMaxMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); - } - case 20: { - LogStep(20, "DUT reads from the TH the (0x400d) CoupleColorTempToLevelMinMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id); - } - case 21: { - LogStep(21, "DUT reads from the TH the (0x4010) StartUpColorTemperatureMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::StartUpColorTemperatureMireds::Id); - } - case 22: { - LogStep(22, "DUT reads from the TH the (0x0010) NumberOfPrimaries attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::NumberOfPrimaries::Id); - } - case 23: { - LogStep(23, "DUT reads from the TH the (0x0011) Primary1X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1X::Id); + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "DUT sends ResetCounts command to TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Commands::ResetCounts::Id); } - case 24: { - LogStep(24, "DUT reads from the TH the (0x0012) Primary1Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Y::Id); - } - case 25: { - LogStep(25, "DUT reads from the TH the (0x0013) Primary1Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Intensity::Id); - } - case 26: { - LogStep(26, "DUT reads from the TH the (0x0015) Primary2X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2X::Id); - } - case 27: { - LogStep(27, "DUT reads from the TH the (0x0016) Primary2Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Y::Id); - } - case 28: { - LogStep(28, "DUT reads from the TH the (0x0017) Primary2Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Intensity::Id); - } - case 29: { - LogStep(29, "DUT reads from the TH the (0x0019) Primary3X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3X::Id); - } - case 30: { - LogStep(30, "DUT reads from the TH the (0x001a) Primary3Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Y::Id); - } - case 31: { - LogStep(31, "DUT reads from the TH the (0x001b) Primary3Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Intensity::Id); - } - case 32: { - LogStep(32, "DUT reads from the TH the (0x0020) Primary4X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4X::Id); - } - case 33: { - LogStep(33, "DUT reads from the TH the (0x0021) Primary4Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Y::Id); - } - case 34: { - LogStep(34, "DUT reads from the TH the (0x0022) Primary4Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Intensity::Id); - } - case 35: { - LogStep(35, "DUT reads from the TH the (0x0024) Primary5X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5X::Id); - } - case 36: { - LogStep(36, "DUT reads from the TH the (0x0025) Primary5Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Y::Id); - } - case 37: { - LogStep(37, "DUT reads from the TH the (0x0026) Primary5Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Intensity::Id); - } - case 38: { - LogStep(38, "DUT reads from the TH the (0x0028) Primary6X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6X::Id); - } - case 39: { - LogStep(39, "DUT reads from the TH the (0x0029) Primary6Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Y::Id); - } - case 40: { - LogStep(40, "DUT reads from the TH the (0x002a) Primary6Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Intensity::Id); - } - case 41: { - LogStep(41, "DUT reads from the TH the Optional (0x0030) WhitePointX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointX::Id); - } - case 42: { - LogStep(42, "DUT reads from the TH the Optional (0x0031) WhitePointY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointY::Id); - } - case 43: { - LogStep(43, "DUT reads from the TH the Optional (0x0032) ColorPointRX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRX::Id); - } - case 44: { - LogStep(44, "DUT reads from the TH the Optional (0x0033) ColorPointRY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRY::Id); - } - case 45: { - LogStep(45, "DUT reads from the TH the Optional (0x0034) ColorPointRIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRIntensity::Id); - } - case 46: { - LogStep(46, "DUT reads from the TH the Optional (0x0036) ColorPointGX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGX::Id); - } - case 47: { - LogStep(47, "DUT reads from the TH the Optional (0x0037) ColorPointGY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGY::Id); - } - case 48: { - LogStep(48, "DUT reads from the TH the Optional (0x0038) ColorPointGIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGIntensity::Id); - } - case 49: { - LogStep(49, "DUT reads from the TH the Optional (0x003a) ColorPointBX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBX::Id); - } - case 50: { - LogStep(50, "DUT reads from the TH the Optional (0x003b) ColorPointBY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBY::Id); - } - case 51: { - LogStep(51, "DUT reads from the TH the Optional (0x003c) ColorPointBIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBIntensity::Id); + case 1: { + LogStep(1, "DUT reads OverrunCount attribute value from TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand +class Test_TC_LVL_2_3_SimulatedSuite : public TestCommand { public: - Test_TC_DGTHREAD_3_1_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_1_Simulated", 30) + Test_TC_LVL_2_3_SimulatedSuite() : TestCommand("Test_TC_LVL_2_3_Simulated", 24) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -5170,7 +1645,7 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_1_SimulatedSuite() {} + ~Test_TC_LVL_2_3_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -5190,7 +1665,15 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 0: + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -5210,190 +1693,133 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); + LogStep(0, "Read mandatory attribute CurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id); } case 1: { - LogStep(1, "DUT reads Channel attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Channel::Id); + LogStep(1, "Read mandatory attribute OnLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); } case 2: { - LogStep(2, "DUT reads RoutingRole attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RoutingRole::Id); + LogStep(2, "Read mandatory attribute Options"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); } case 3: { - LogStep(3, "DUT reads NetworkName attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::NetworkName::Id); + LogStep(3, "Read optional attribute RemainingTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::RemainingTime::Id); } case 4: { - LogStep(4, "DUT reads PanId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::PanId::Id); + LogStep(4, "Read optional attribute StartUpCurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); } case 5: { - LogStep(5, "DUT reads ExtendedPanId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id); + LogStep(5, "Read optional attribute CurrentFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id); } case 6: { - LogStep(6, "DUT reads MeshLocalPrefix attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id); + LogStep(6, "Read optional attribute MinFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinFrequency::Id); } case 7: { - LogStep(7, "DUT reads OverrunCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); + LogStep(7, "Read optional attribute MaxFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxFrequency::Id); } case 8: { - LogStep(8, "DUT reads NeighborTable attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::NeighborTable::Id); + LogStep(8, "Read optional attribute MinLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id); } case 9: { - LogStep(9, "DUT reads RouteTable attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RouteTable::Id); + LogStep(9, "Read optional attribute MaxLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id); } case 10: { - LogStep(10, "DUT reads PartitionId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PartitionId::Id); + LogStep(10, "Read optional attribute OnOffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); } case 11: { - LogStep(11, "DUT reads Weighting attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Weighting::Id); + LogStep(11, "Read optional attribute OnTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); } case 12: { - LogStep(12, "DUT reads DataVersion attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::DataVersion::Id); + LogStep(12, "Read optional attribute OffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); } case 13: { - LogStep(13, "DUT reads StableDataVersion attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id); + LogStep(13, "Read optional attribute DefaultMoveRate"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); } case 14: { - LogStep(14, "DUT reads LeaderRouterId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id); + LogStep(14, "Write mandatory attribute OnLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); } case 15: { - LogStep(15, "DUT reads DetachedRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id); + LogStep(15, "Write mandatory attribute Options"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); } case 16: { - LogStep(16, "DUT reads ChildRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id); + LogStep(16, "Write optional attribute OnOffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); } case 17: { - LogStep(17, "DUT reads RouterRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id); + LogStep(17, "Write optional attribute OnTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); } case 18: { - LogStep(18, "DUT reads LeaderRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id); + LogStep(18, "Write optional attribute OffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); } case 19: { - LogStep(19, "DUT reads AttachAttemptCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id); + LogStep(19, "Write optional attribute DefaultMoveRate"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); } case 20: { - LogStep(20, "DUT reads PartitionIdChangeCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id); + LogStep(20, "Write optional attribute StartUpCurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); } case 21: { - LogStep(21, "DUT reads BetterPartitionAttachAttemptCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id); + LogStep(21, + "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " + "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " + "DUT to TH again"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 22: { - LogStep(22, "DUT reads ParentChangeCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id); + LogStep(22, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 23: { - LogStep(23, "DUT reads ActiveTimestamp attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id); - } - case 24: { - LogStep(24, "DUT reads PendingTimestamp attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id); - } - case 25: { - LogStep(25, "DUT reads Delay attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Delay::Id); - } - case 26: { - LogStep(26, "DUT reads SecurityPolicy attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id); - } - case 27: { - LogStep(27, "DUT reads ChannelPage0Mask attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id); - } - case 28: { - LogStep(28, "DUT reads OperationalDatasetComponents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id); - } - case 29: { - LogStep(29, "DUT reads ActiveNetworkFaults attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id); + LogStep(23, + "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " + "specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; } }; -class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand +class Test_TC_OO_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DRLK_3_1_SimulatedSuite() : TestCommand("Test_TC_DRLK_3_1_Simulated", 37) + Test_TC_OO_3_2_SimulatedSuite() : TestCommand("Test_TC_OO_3_2_Simulated", 6) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -5401,7 +1827,7 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DRLK_3_1_SimulatedSuite() {} + ~Test_TC_OO_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -5421,10 +1847,6 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -5441,190 +1863,34 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); + LogStep(0, "DUT issues an Off command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id); } case 1: { - LogStep(1, "DUT reads LockState attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LockState::Id); + LogStep(1, "DUT issues an On command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 2: { - LogStep(2, "DUT reads LockType attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LockType::Id); + LogStep(2, "DUT issues an Toggle command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Toggle::Id); } case 3: { - LogStep(3, "DUT reads ActuatorEnabled attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::ActuatorEnabled::Id); + LogStep(3, "DUT issues an OffWithEffect command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id); } case 4: { - LogStep(4, "DUT reads DoorState attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorState::Id); + LogStep(4, "DUT issues an OnWithRecallGlobalScene command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id); } case 5: { - LogStep(5, "DUT reads DoorOpenEvents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorOpenEvents::Id); - } - case 6: { - LogStep(6, "DUT reads DoorClosedEvents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorClosedEvents::Id); - } - case 7: { - LogStep(7, "DUT reads OpenPeriod attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::OpenPeriod::Id); - } - case 8: { - LogStep(8, "DUT reads NumberOfTotalUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfTotalUsersSupported::Id); - } - case 9: { - LogStep(9, "DUT reads NumberofPINUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfPINUsersSupported::Id); - } - case 10: { - LogStep(10, "DUT reads NumberofRFIDUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfRFIDUsersSupported::Id); - } - case 11: { - LogStep(11, "DUT reads NumberofWeekDaysSchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id); - } - case 12: { - LogStep(12, "DUT reads NumberofYearDaysSchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id); - } - case 13: { - LogStep(13, "DUT reads NumberofHolidaySchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id); - } - case 14: { - LogStep(14, "DUT reads MaxPINCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MaxPINCodeLength::Id); - } - case 15: { - LogStep(15, "DUT reads MinPINCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MinPINCodeLength::Id); - } - case 16: { - LogStep(16, "DUT reads MaxRFIDCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MaxRFIDCodeLength::Id); - } - case 17: { - LogStep(17, "DUT reads MinRFIDCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MinRFIDCodeLength::Id); - } - case 18: { - LogStep(18, "DUT reads CredentialRulesSupport attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::CredentialRulesSupport::Id); - } - case 19: { - LogStep(19, "DUT reads Language attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::Language::Id); - } - case 20: { - LogStep(20, "DUT reads LEDSettings attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LEDSettings::Id); - } - case 21: { - LogStep(21, "DUT reads AutoRelockTime attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::AutoRelockTime::Id); - } - case 22: { - LogStep(22, "DUT reads SoundVolume attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SoundVolume::Id); - } - case 23: { - LogStep(23, "DUT reads OperatingMode attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::OperatingMode::Id); - } - case 24: { - LogStep(24, "DUT reads SupportedOperatingModes attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SupportedOperatingModes::Id); - } - case 25: { - LogStep(25, "DUT reads DefaultConfigurationRegister attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DefaultConfigurationRegister::Id); - } - case 26: { - LogStep(26, "DUT reads EnableLocalProgramming attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableLocalProgramming::Id); - } - case 27: { - LogStep(27, "DUT reads EnableOneTouchLocking attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableOneTouchLocking::Id); - } - case 28: { - LogStep(28, "DUT reads EnableInsideStatusLED attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableInsideStatusLED::Id); - } - case 29: { - LogStep(29, "DUT reads EnablePrivacyModeButton attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnablePrivacyModeButton::Id); - } - case 30: { - LogStep(30, "DUT reads LocalProgrammingFeatures attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LocalProgrammingFeatures::Id); - } - case 31: { - LogStep(31, "DUT reads WrongCodeEntryLimit attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id); - } - case 32: { - LogStep(32, "DUT reads UserCodeTemporaryDisableTime attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::UserCodeTemporaryDisableTime::Id); - } - case 33: { - LogStep(33, "DUT reads SendPINOverTheAir attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SendPINOverTheAir::Id); - } - case 34: { - LogStep(34, "DUT reads RequirePINForRemoteOperation attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::RequirePINforRemoteOperation::Id); - } - case 35: { - LogStep(35, "DUT reads ExpiringUserTimeOut attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::ExpiringUserTimeout::Id); - } - case 36: { - LogStep(36, "DUT reads NumberOfCredentialsSupportedPerUser attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id); + LogStep(5, "DUT issues an OnWithTimedOff command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id); } } return CHIP_NO_ERROR; @@ -5633,98 +1899,14 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand std::unique_ptr GetTestCommand(std::string testName) { - if (testName == "Test_TC_ACT_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ACT_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_BOOL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_BOOL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DESC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_DESC_2_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGETH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGETH_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DGSW_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGSW_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DGWIFI_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGWIFI_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_FLW_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_FLW_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_G_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_G_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_I_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_I_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PRS_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PRS_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PSCFG_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PSCFG_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_RH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_RH_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_SWTCH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_SWTCH_3_1_SimulatedSuite()); - } if (testName == "Test_TC_WNCV_5_1_Simulated") { return std::unique_ptr(new Test_TC_WNCV_5_1_SimulatedSuite()); } - if (testName == "Test_TC_LCFG_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_LCFG_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_LUNIT_1_1_Simulated") - { - return std::unique_ptr(new Test_TC_LUNIT_1_1_SimulatedSuite()); - } - if (testName == "Test_TC_LUNIT_2_1_Simulated") - { - return std::unique_ptr(new Test_TC_LUNIT_2_1_SimulatedSuite()); - } - if (testName == "Test_TC_OCC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_OCC_2_2_SimulatedSuite()); - } if (testName == "Test_TC_OCC_2_4_Simulated") { return std::unique_ptr(new Test_TC_OCC_2_4_SimulatedSuite()); } - if (testName == "Test_TC_ULABEL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ULABEL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_FLABEL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_FLABEL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_LTIME_1_1_Simulated") - { - return std::unique_ptr(new Test_TC_LTIME_1_1_SimulatedSuite()); - } - if (testName == "Test_TC_ILL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ILL_3_1_SimulatedSuite()); - } if (testName == "Test_TC_DGSW_3_2_Simulated") { return std::unique_ptr(new Test_TC_DGSW_3_2_SimulatedSuite()); @@ -5769,14 +1951,6 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_CC_9_4_SimulatedSuite()); } - if (testName == "Test_TC_DGTHREAD_3_2_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGTHREAD_3_3_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_3_SimulatedSuite()); - } if (testName == "Test_TC_DGTHREAD_3_4_Simulated") { return std::unique_ptr(new Test_TC_DGTHREAD_3_4_SimulatedSuite()); @@ -5785,38 +1959,10 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_LVL_2_3_SimulatedSuite()); } - if (testName == "Test_TC_OO_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_OO_3_1_SimulatedSuite()); - } if (testName == "Test_TC_OO_3_2_Simulated") { return std::unique_ptr(new Test_TC_OO_3_2_SimulatedSuite()); } - if (testName == "Test_TC_TSUIC_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_TSUIC_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PCC_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PCC_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_TMP_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_TMP_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_CC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_CC_2_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGTHREAD_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DRLK_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DRLK_3_1_SimulatedSuite()); - } return nullptr; } @@ -5824,29 +1970,8 @@ std::unique_ptr GetTestCommand(std::string testName) void PrintTestCommands() { ChipLogError(chipTool, "Supported commands:"); - ChipLogError(chipTool, "\t* Test_TC_ACT_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_BOOL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DESC_2_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGETH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGSW_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_FLW_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_G_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_I_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PRS_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PSCFG_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_RH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_SWTCH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_WNCV_5_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LCFG_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LUNIT_1_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LUNIT_2_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_OCC_2_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_FLABEL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LTIME_1_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_ILL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGSW_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGETH_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_2_Simulated"); @@ -5858,16 +1983,7 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_CC_6_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_CC_7_5_Simulated"); ChipLogError(chipTool, "\t* Test_TC_CC_9_4_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_3_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_LVL_2_3_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_OO_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_OO_3_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_TSUIC_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PCC_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_TMP_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_CC_2_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DRLK_3_1_Simulated"); }